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

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

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

asp.net mvc - breakpoint on javascript in CSHTML? -