ID attribute play very important rule in web page.
In a web page every web element must have unique id.

Ex-<input type=”text” name=”text1” id=”text1”/>
<input type=”text” name=”text2” id=”text2”/>

To  get value of above  textbox from #id selector using jquery need to write below code.

var value=$(“# text1”).val();

another example, To apply css on #myDivId element use below code.

$(“#myDivId”).css(“border”,”3px solid red”);

eXTReMe Tracker