1//jQuery get class name of element
2var className=$('#myElementID').attr('class');
3
1var classList = $('#divId').attr('class').split(/\s+/);
2$.each(classList, function(index, item) {
3 if (item === 'someClass') {
4 //do something
5 }
6});
1$('#elementID').prop('classList').add('yourClassName')
2$('#elementID').prop('classList').remove('yourClassName')