12
I am using Jquery to find a class by variable. So,
var className = "whatever";
$("#container ul li") if contains element with className, do this
How do I write the above code?
Is it
$("#container ul li").find("."+ className).each(function(){
console.log("I found one");
});
Obviously the code doesn't work