...

View Full Version : quick easy newbie question for you guys! problem with making an external js file



emmaburge
10-03-2009, 10:55 AM
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/showthread.php?p=1038588#post1038588

Hope someone can help me!

Thanks
Emma

Dimitar
10-03-2009, 11:39 AM
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:


$(document).ready(function() {
fadeshow();
});


if you have an existing such function, just add fadeshow there.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum