Skip to content

Subquery on a Query set in jQuery

Imagine you already you are on a pretty low level in the DOM using jQuery queries, and then want to perform another subquery in it. You can do that using the .find() function for that:

var productBMarkup = $("p.texts").children().find("#product-b").html();

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.