When trying to determine if an element exists in the page with a particular class using the following code I keep getting the dreaded "Object doesn't support this property or method"
$(function () {
if ($(".expandCollapse").length > 0) {
$(".expandCollapse").click(function () {
//Some code here
});
}
});
Any ideas?
If it helps, I'm running the latest jQuery release (1.7.2) and in the non minified version the error is being thrown at line 4185: