Solved

Jquery localScroll

Posted on 2009-04-04
5
1,054 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 40 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 40 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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
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.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now