jQuery obtenir le nom de classe
//jQuery get class name of element
var className=$('#myElementID').attr('class');
Grepper
//jQuery get class name of element
var className=$('#myElementID').attr('class');
$('#elementID').prop('classList');
var classList = $('#divId').attr('class').split(/\s+/);
$.each(classList, function(index, item) {
if (item === 'someClass') {
//do something
}
});
$('#elementID').prop('classList').add('yourClassName')
$('#elementID').prop('classList').remove('yourClassName')