I am having this code to check if the element has the certain class:
var p3div = $("#portlet1 #showhide");
if (p3div.attr('class').indexOf('ui-icon-plusthick') > 0) {
//do something here.
}
However in IE7 .attr() is not supported and this code will throw an error. Is there any other way to get the class of an element by not using the attr() method?
Thanks,
hasClass()function.#portlet #showhide, this will be way slower.