Reputation: 12897
I have a span like this
<span class='class_name'> blah blah </span>
I want to select the class name of this span. for that iam using this.className its working fine in firefox. but for explorer its not...
How can i fix that??
Upvotes: 1
Views: 938
Reputation: 1039588
Is the variable this
pointing to the same node in IE and Firefox? You could verify that by putting an alert(this.tagName)
or alert(this.id)
.
Upvotes: 3
Reputation: 488744
That should be working in Explorer too. You could try, though:
$(this).attr('class');
Upvotes: 2