first element selector jquery code example
Example 1: select the first elemnt have class in jquery
$( ".box" ).first().css( "font-style", "bold" );
Example 2: javascript select first element
// example:
document.querySelector('.message')
// syntax:
// document.querySelector('.<class-name>')