Computer Magic Logo
ID selector

Thursday, January 12, 2017

Published by Aristotelis Pitaridis

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');