anam anam - 2 months ago 27x
jQuery Question

Remove All classes From Div

is there any way to Remove All classes From div ... on click of image i want to remove all the classes from it .

Please Help,

$(document).ready(function () {
var pos=$('img', this).attr('alt');
alert('i am imageFlip'+this.alt);

console.log('i am Image Flip');
var t = $(this);


Here in my code i want to remove all classes from $(this).

Thanks and Regards,


You don't need to wrap this in a jQuery selector to complete this job.

To remove all classes from the element

this.className = '';