Thursday, 22 August 2013

jQuery get the actual class of element

jQuery get the actual class of element

This gives me a list of classes the clicked element has:
$("#nav li ul li").click(function(e){
var cla=$(this).attr('class')
});
I only want the actual class written beside the element, I don't want the
others.

No comments:

Post a Comment