Status
Not open for further replies.

ChosenOne

Active Member
902
2008
18
0
hi there. I tried to integrate HTML site in WordPress but shows the following error in google chrome's inspect element. The HTML site works fine on localhost and server tho.

Code:
Uncaught TypeError: Object #<Object> has no method 'superfish'

This line seems to be wrong: $('ul.menu').superfish({

[strike]help pl0x?[/strike]


sorted tnx to shadow.prx

Ok so this is how it worked:

1) Added the lines in the correct order.

Code:
    <script src="jquery-1.6.3.min.js" type="text/javascript"></script>
    <script src="superfish.js" type="text/javascript"></script>
    <script src="script.js" type="text/javascript"></script>
<script> 
 
    $(document).ready(function() { 
        $('ul.menu').superfish(); 
    }); 
 
</script>

2. Removed jquery from WordPress default installation.
 
Last edited:
22 comments
Are you talking about this?


<script src="/js/superfish.js" type="text/javascript"></script>


yes i got that but it wont work
 
This is everything I link with:

Code:
    <script src="/rjquery-1.6.3.min.js" type="text/javascript"></script>
    <script src="/rcufon-yui.js" type="text/javascript"></script>

    <script src="/rcufon-replace.js" type="text/javascript"></script>
    <script src="/rOswald_400.font.js" type="text/javascript"></script> 
    <script src="/rsuperfish.js" type="text/javascript"></script>
    <script src="/rjquery.hoverIntent.js" type="text/javascript"></script>
    <script src="/rFF-cash.js" type="text/javascript"></script> 
    <script src="/rscript.js" type="text/javascript"></script>
    <script src="/rtms-0.3.js" type="text/javascript"></script>

    <script src="/rtms_presets.js" type="text/javascript"></script>
    <script src="/rjquery.easing.1.3.js" type="text/javascript"></script>
    <script src="/rbackgroundPosition.js" type="text/javascript"></script>
    <script src="/reasyTooltip.js" type="text/javascript"></script>

and it says it has problem with superfish.js line #2 and line 2 is this: $('ul.menu').superfish({
 
"I got this problem when running the site on localhost" -_-

Why does every link have 'r' before the JS file? :| rjquery/rsuperfish??
 
Have you got options or just the default superfish

If you have options it should look like this

Code:
$('ul.menu').superfish({ 

Options here

});
Or if you dont have options should look like this

Code:
 $('ul.menu').superfish();
 
Give it a try the whole thing should look like this if your just putting it in your header
Code:
<script> 
 
    $(document).ready(function() { 
        $('ul.menu').superfish(); 
    }); 
 
</script>
 
They're this way:

Code:
    <script src="jquery-1.6.3.min.js" type="text/javascript"></script>
    <script src="superfish.js" type="text/javascript"></script>
    <script src="script.js" type="text/javascript"></script>
<script> 
 
    $(document).ready(function() { 
        $('ul.menu').superfish(); 
    }); 
 
</script>
 
Hm looks fine they are all in the right order are you running this on a localhost ? could be a permission error change the first line to google's cdn also just noticed your not using the latest jquery

Code:
[FONT=monospace]<script src="[/FONT]https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js[FONT=monospace]" type="text/javascript"></script>
[/FONT]
 
There must be something else. Here's why I'm thinking that way:

When I run on localhost/server as HTML everything is OK.

When I run the exact same code on server integrated in WordPress the slidebar doesn't show.
 
Yea the code is fine its all correct

Just check all the permissions for all the scripts and make sure you haven't got jquery loaded twice go to view source and just do a search for jquery as wordpress already includes jquery
 
Status
Not open for further replies.
Back
Top