I am using a jquery context menu plugin (http://www.trendskitchens.co.nz/jquery/contextmenu/) which works fine but I want to work for all children of a selector currently I have the below but it only applies to divs with class area and I need it to apply on div's with class area and all its 开发者_JAVA百科children.
$('#container-area .area').contextMenu()
Any ideas on wildcard jquery selectors tried * with no luck
Lee
This should work, using .andSelf()
(documentation):
$('#container-area .area').children("div").andSelf().contextMenu();
$('#container-area .area').contextMenu().find('*').contextMenu()
精彩评论