jquery if page has class code example
Example 1: jquery check if a class exists
if ($(".mydivclass")[0]){
// Do something if class exists
} else {
// Do something if class does not exist
}
Example 2: how to find a name of class from page in jquery
if ($('.Mandatory').length > 0) {
//do your thing
}
Example 3: how to find a name of class from page in jquery
$('.Mandatory').each(function(){
//do your thing
});