Pkira
3/24/2016 - 9:53 AM

jQuery Get Element Functions

jQuery Get Element Functions

//Get
var value = $('#myId').val();

//Set
$('#myId').val('value');
// by id
$( "#myId" )

// by Class Name
$( ".myClass" );

// by Attribute
$( "input[name='first_name']" );

// by Compound CSS Selector
$( "#contents ul.people li" );

// by List of Selectors
$( "div.myClass, ul.people" );