Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to get the class name dynamically using jquery

$(document).ready(function () {
    var $allClasses = $("[name='submit']").attr('class').split(' ');
    for(var i=0; i < $allClasses.length; i++)
    {
        // Check $allClasses[i] here.
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #class #dynamically #jquery
ADD COMMENT
Topic
Name
1+4 =