I am trying to use the jQuery hasClass function. It doesn't seem to work when I use it like that. I would appreciate it if anyone could decide how to use hasClass in this situation.
The error I get is
numValueElement.hasClass is not a function if($(numValueElement.hasClass("tag")))
The key line throwing this error is if($(numValueElement.hasClass("tag")))
$(".numberValue").click ( function () { var numValueElement = this; var propertyId = numValueElement.id; $(".numberBounds").filter("#"+propertyId).toggle(); if($(numValueElement.hasClass("tag"))) { } } );
source share