Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Jquery localScroll

Posted on 2009-04-04
5
Medium Priority
?
1,103 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 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

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

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

When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
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.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…
Suggested Courses

721 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