views:

982

answers:

2

I'm getting an "Object does not support this property or method" error on the following line...

$("ul.sf-menu").superfish({ 
        pathClass: 'current-subs'
    });

My understanding is that superfish.js should have defined that method. It's embarrassing to ask for help since it's likely to be something really dumb, but probably due to my ignorance of jQuery I'm not able to get a handle on it.

A: 

Is your superfish JS file included like this?

<script type="text/javascript" src="superfish.js"></script>
//                                                ^^^^^^^^^ end tag required

I also presume you are using IE when you get this error... does Firefox/Firebug provide any better info as to the issue?

scunliffe
A: 

Figured it out.

I had imported jQuery twice as follows:

<script src="../js/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="../js/superfish.js" type="text/javascript"></script>

...

<!-- Didn't notice this one -->
<script src="../js/jquery-1.3.2.min.js" type="text/javascript"></script>
Larsenal