need help with parent and not / filter
Hi all, I would to achieve the same result of the below function without using callbacks .
the function is:
- $("#user-options-menu").find('a').each(function() {
- // now I want to filter any <a> tag with <li> parent
- if (!($(this).parent().is('li'))) {
- $(this).button();
- }
- });
I've tried with $("#user-options-menu").find('a:not(li:parent)') but without result.
Any suggestion ?
Thank you