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