JQuery :not:has gives Type Error -


i have problem jquery selector.

$('#test').keyup(function(){     var val = $('#test').val();     $('p').hide();     $("p:has(b):contains(" + val + ")").show().next().show();     $("p:not:has(p):contains(" + val + ")").show();     }); 

$("p:not:has(p)").show(); select given types,

$("p:not:has(p):contains(" + val + ")").show(); 

gives type error.

$("p").not(":has(p):contains(" + val + ")").show(); 

gives error too. how can use :contains()?

edit: there fiddle https://jsfiddle.net/ev1v0cwa/

the p:not:has(p):contains gives in firefox typeerror: undefined , in fiddle error selector undefined??

try $("p:not(:has(b)):contains(" + val + ")").show().prev().show();

see fiddle


Comments

Popular posts from this blog

shopping cart - Page redirect not working PHP -

php - How to modify a menu to show sub-menus -

python - Installing PyDev in eclipse is failed -