Object doesn't support this property or method for jquery.min.js

I’m developing a website and am testing in IE 8 and am getting an error “Object doesn’t support this property or method” for https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js when I click on the error message on the lower-left of the browser window.

This error comes on only when I am at the home page, then if I click on Lawn Care on the right. It is supposed to highlight the word and scroll to it. It is fine if I’m already on the Maintenance page.

The site works in all browsers except IE 8. Please go to http://serenitylandscapes.net to view it.

When I look up the error message on google, people suggested to reset IE, but that doesn’t seem to solve the issue.

Thanks!

WebKite console says that a certain object has no method replace(). It seems it might be the following line:

var myLocation = document.location.hash.replace("#","");

Sorry for not providing some additional input, I’m way too tired and about to pass out but this should put you on track :slight_smile:

No it’s not that line, because you’ve commented out that code.

The error comes from jQuery itself, on line 100 of the minified code. The replace part of that code is:


k=function(m,p,q,u){p=p||t;m=m.replace(/\\=\\s*([^'"\\]]*)\\s*\\]/g,"='$1']");

Using the unminified version of jQuery’s code, the above translates to:


Sizzle = function( query, context, extra, seed ) {
	context = context || document;

	// Make sure that attribute selectors are quoted
	query = query.replace(/\\=\\s*([^'"\\]]*)\\s*\\]/g, "='$1']");

So, it’s a selector of some kind, that’s causing the problem.

Setting a breakpoint at line 17 of the php page

$('#col1s').jScrollPane();

gets in before the error occurs.

Line 18 is too late, the error occurs before we get there. So, it’s jScrollPane somehow causing the problem.

Further stepping through the code causes us to see that the error occurs at this code here:

if (e.length && pane.find(e)) {

Where e is a jQuery object that contains the linked-to element, and the error occurs during the pane.find(e) part of the code.