javascript - How to check two parametrs in li:contains metod -


i using metod change css

$("#allproducts li:contains('" + product + "')").css("background", "white"); 

this works fine need check 2 parametrs when chagne css think this

$("#allproducts li:contains('" + product + "')&&('" + icategory + "') ").css("background", "white"); 

but not working.i cant check if contains product , if icategory need them bee in same object.

i think looking like this. short answer, try this:

$("#allproducts li:contains('" + product + "'):contains('" + icategory + "') ") 

Comments

Popular posts from this blog

php - Passing multiple values in a url using checkbox -

compilation - PHP install fails on Ubuntu 14 (make: *** [sapi/cli/php] Error 1) PHP 5.6.20 -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -