KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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
Tags (comma-separated)
Save Edits
Cancel