performance - Will jQuery run faster if the HTML element name is added with the ID? -
below snippet of code use added data table when div clicked on: $(document).on("click", "div#pos_product_id_<?php echo $row['id']; ?>", function() { $("table#pos_till_products_list").each(function() { searchrow = $(this).find("tr#product_id_<?php echo $row['id']; ?>").html(); if (searchrow == null) { $("#pos_till_products_list tbody:first").prepend("<?php echo $product_build; ?>"); } else { var qty = $(this).find("tr#product_id_<?php echo $row['id']; ?> .qty").html(); qty++; $("tr#product_id_<?php echo $row['id']; ?> .qty").html(qty); } }); }); i'm new using js/jquery, can see i've added html element in front of id's. know if adding html element, make jquery perform faster? think would, adding elements name stops jquery searching other html...