Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-03-2009, 10:55 AM   PM User | #1
emmaburge
New Coder

 
Join Date: Oct 2009
Posts: 20
Thanks: 2
Thanked 0 Times in 0 Posts
emmaburge is an unknown quantity at this point
quick easy newbie question for you guys! problem with making an external js file

Hi everyone

Im new at this forum I was directed here by a member of a forum I posted my question in, who said people here should be able to help me.

I have a piece of jquery code from a plugin for a fade-in-out type slideshow, currently appearing in my html file. I want to extract this and put it in a seperate js file where all other jquery is, but I have not been successfull - whenever i try, it just doesnt show up. I am quite new to jquery, and would really appreciate some help.

The original question and the answer i received so far is here: http://www.webdeveloper.com/forum/sh...88#post1038588

Hope someone can help me!

Thanks
Emma
emmaburge is offline   Reply With Quote
Old 10-03-2009, 11:39 AM   PM User | #2
Dimitar
New Coder

 
Join Date: Aug 2009
Location: London, England
Posts: 21
Thanks: 0
Thanked 3 Times in 3 Posts
Dimitar is an unknown quantity at this point
this script has a window.onload = function which is likely to **** any jquery $(document).ready etc functionality defined previously. it's also not using jquery at all so its not the best choice here (even though it's coded well enough and as a class..)

anyway, try to remove from the js:

window.onload = fadeshow;

and repace with:
PHP Code:
$(document).ready(function() {
    
fadeshow();
}); 
if you have an existing such function, just add fadeshow there.
Dimitar is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:59 AM.


Advertisement
Log in to turn off these ads.