JQuery access element using id

Viewed 44

jQuery("#allSelectedItems") - When we use this jquery will check for a element with id "allSelectedItems" and will return the element if it finds a element with the id

jQuery("#allSelectedItems").css({width : 100%});
jQuery("#allSelectedItems").prop("checked");

In this case at line 1 jquery will search for the element in the page and will return the element. while executing the second line will is search for the element once again or does jQuery supports some kind of memoization technique to return the element without searching for the element ??

0 Answers
Related