I want to perform some action on elements that are not direct child of the body. How can I check a particular element to know whether its partent is the body.
Thanks!
You can test the tag name this way :
jQuery('#urDivId').parent().is('body')