TOP
EL EN
Selectors - ID selector
15 September 2024 Published by Aristotelis Pitaridis
Tools used for this tutorial
jQuery 3.7.1
SHARE

With jQuery we can select one element using its id. The following example demonstrates how to select the element which has the id MyDiv.

var element = $('#MyDiv');