class name a in jquery code example Example: how to get class name in jquery var className = $('#sidebar').attr('class');