jquery get class name
snippet in javascript

jquery get class name

user6132

//jQuery get class name of element 
var className=$('#myElementID').attr('class');

how to get class name in jquery

user353

var className = $('#sidebar').attr('class');