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
Post a Comment