Solved

Jquery localScroll

Posted on 2009-04-04
5
1,068 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Suggested Solutions

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
This article discusses how to implement server side field validation and display customized error messages to the client.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

726 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