How do I select an item using class or id?
* This code selects an element with an id of "myDivId". Since id's are unique this expression always selects 1 element, or none if the id does not exist.
$('#myDivId')
* This code selects an element with a class of "myCssClass". Since any number of elements can have the same class, this expression will select any number of elements.
$('.myCssClass')
A selected element can be assigned to a javascript variable like this
var myDivElement = $('#myDivId');
Usually selected elements are acted on by other JQuery functions:
var myValue = $('#myDivId').val(); // get the value of an element
$('#myDivId').val("hello world"); // set the value of an element