Solved

Jquery localScroll

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

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

632 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