Friday, December 8, 2017

How do I select elements when I already have a DOM element in jQuery

var myDomElement = document.getElementById( "foo" ); // A plain DOM element.
$( myDomElement ).find( "a" ); // Finds all anchors inside the DOM element.

No comments:

Post a Comment