SyntaxFix
Write A Post
Hire A Developer
Questions
This gets parent if it is a div. Then it gets class.
var div = $(this).parent("div"); var _class = div.attr("class");