John K John K - 1 year ago 60
jQuery Question

Looking for jQuery find(..) method that includes the current node

The jQuery find(..) traversal method doesn't include the current node - it starts with the children of the current node. What is the best way to call a find operation that includes the current node in its matching algorithm? Looking through the docs nothing immediately jumps out at me.

Answer Source

For jQuery 1.8 and up, andSelf is deprecated and you can use addBack instead. It takes a selector so you don't need to filter the result:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download