I have a simple functions that takes a class name and adds it to an element like this:
function foo() {
var className = prompt("Give a class name");
$("#FOO").addClass(className);
}
Can I check if the class the user gave exists in any stylesheet in the current document?The answer linked to my question does not help at all.It refers to some documentation but that's all.