jquery - Finding parent class using .parent and .hasClass -


how can find parent class of clicked element?

currently running on .click event of element called .cross

i want find parent classnames:

var status = $(this).parent(this).hasclass();         console.log(status); 

the code above outputs false in console rather classname.

how can find parent class of clicked element?

$(this).parent().attr("class") 

Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -