Answers for "first or default in jquery selector"

1

select first option in dropdown jquery

myElement.find('option:eq(0)').prop('selected', true);
Posted by: Guest on October-08-2020
1

select the first elemnt have class in jquery

$( ".box" ).first().css( "font-style", "bold" );
Posted by: Guest on November-01-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language