Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Jquery localScroll

Posted on 2009-04-04
5
Medium Priority
?
1,117 Views
Last Modified: 2013-12-08
Hi,
Im quite new to jquery and front-end web development. Im using Wordpress as CMS and decided to add Jquery's smooth scrolling effect via localScroll plugin. The script/button (Back to Top) works well in FF, Safari and Chrome, however much to my dismay it doesnt work in IE7. I was hoping someone could help me debug this issue. Also,there are some errors popping out when i load the page in IE, but i dont know how to fix this.

IE ver. 7.0.6001.18000

This is the site url:  http://howigetfit.com/lvd/

Tks.
0
Comment
Question by:tats611
  • 3
  • 2
5 Comments
 
LVL 8

Assisted Solution

by:Rsulliv1
Rsulliv1 earned 160 total points
ID: 24070846
1. The initial error is coming from the swfobject script (";" expected). have you tried the localscroll without the swfobject script?

Also, a google search for "j.parentnode is null" (w/o quotes) shows more details on the swfobject script. This is the second js error that appears.

Could it be because you have included two versions of the same swfobject script?

<code>
<
script
 src
=
"http://howigetfit.com/lvd/wp-content/plugins/wp-swfobject/2.0/swfobject.js" 
type
=
"text/javascript"
></
script
>

<script
 type
="text/javascript" 
src
="http://howigetfit.com/lvd/wp-content/themes/lvd/js/jquery.js"
></script
>
<
script
 type
=
"text/javascript" 
src
=
"http://howigetfit.com/lvd/wp-content/themes/lvd/js/swfobject.js"
></
script
>

<script
 type
="text/javascript" 
src
="http://howigetfit.com/lvd/wp-content/themes/lvd/js/scrollTo.js" 
></script
>

<script
 type
="text/javascript" 
src
="http://howigetfit.com/lvd/wp-content/themes/lvd/js/localScroll.js"
></script
>

Open in new window

</code>

This thread shows that double including that script could be an issue:
http://groups.google.com/group/swfobject/browse_thread/thread/3cd38938f5c9b831

IE handles oddly when there are js errors. It can affect all other javascript on the page.

2. http://flesler.blogspot.com/2007/10/jqueryscrollto.html#scrollto_troubleshoot

This mentions how to troubleshoot when this script doesn't work on IE. Have you implemented these details?

--------------

ECM Consultant
ThoughtSpring Consulting
www.thoughtspring.com
(312) 404-7904
0
 

Author Comment

by:tats611
ID: 24098202
Hi,

Thanks for this answer. Indeed, wp-swfobject is conflicting with jquery ScrollTo plugin. Any ideas how to make these two work, or what is causing the conflict?

Tks.


0
 

Accepted Solution

by:
tats611 earned 0 total points
ID: 24098862
Hi,

Upon turning on and off some of the plug-ins. I finally found the culprit.

jQuery("ul.sf-menu").superfish is not a function --> error

Its one of the special functions of the multi-drop down plugin <Suckerfish>.  I was able to turn off the function using the old version, but when i updated the plugin <which claimed that the updates will fix the issues> , the error pops out again...LoL.

I tried to google for some answers--nada. I hope some expert can look into this and shed some light...thanks.
0
 
LVL 8

Assisted Solution

by:Rsulliv1
Rsulliv1 earned 160 total points
ID: 24099447
I'm not familiar with that script, but I do see that you're passing in nullstrings for the autoArrows and dropShadows json values whereas the superfish example shows boolean:

$(document).ready(function() {
        $('ul.sf-menu').superfish({
            delay:       1000,                            // one second delay on mouseout
            animation:   {opacity:'show',height:'show'},  // fade-in and slide-down animation
            speed:       'fast',                          // faster animation speed
            autoArrows:  false,                           // disable generation of arrow mark-up
            dropShadows: false                            // disable drop shadows
        });
    });

does that affect anything?

From http://users.tpg.com.au/j_birch/plugins/superfish/#options
0
 
LVL 8

Expert Comment

by:Rsulliv1
ID: 24101210
Glad we were able to help find an answer
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to implement server side field validation and display customized error messages to the client.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question