Answers for "how to get elements with class name in jquery"

8

jquery get class name

//jQuery get class name of element 
var className=$('#myElementID').attr('class');
Posted by: Guest on July-31-2019
0

how to find a name of class from page in jquery

if ($(".Mandatory").length > 0) {
    // Do stuff with $(".Mandatory")
    $(".Mandatory").each(function() {
        // "this" points to current item in looping through all elements with
        // class="Mandatory"
        $(this).doSomejQueryWithElement();
    }); 
}
Posted by: Guest on October-17-2020

Code answers related to "how to get elements with class name in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language