View Full Version : The Ultimate Fade-in slideshow (v2.4) don't work in Firefox and Opera.

02-05-2013, 11:44 PM
1) Script Title: Ultimate Fade-in slideshow (v2.4)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem: I put the Script "Ultimate Fade-in slideshow (v2.4)" in my web but don't work in Firefox and Opera. The script in Internet Explorer and Chrome work perfectly. I have watched some links (Link1 (http://www.dynamicdrive.com/forums/showthread.php?53561-Ultimate-Fade-in-Slideshow-not-working-with-Firefox-and-Safari), Link2 (http://www.dynamicdrive.com/forums/showthread.php?70611-Slideshow-Not-Working-in-Firefox-but-Works-in-IE)), but I can not see what the problem is.
The javaScrip console of Firefox's script show the error: "TypeError: $ is not a function" :

The website is:


And the files ( fadeslideshow.js, fadhd.js, jquery.min.js,loading.gif, restore.png,x.png) are in "http://www.castrobarbudo.com/drupal/files/fade/"
Can you help me?

Thank's in advance.

02-06-2013, 01:52 AM

Your page is in violation of Dynamic Drive's usage terms (http://www.dynamicdrive.com/notice.htm), which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.

That said, I'm not 100% sure of the problem. It appears as though those browsers are too busy parsing other things to know in time what $ is supposed to be in that context. In a mock up I found that if I wrapped the initialization in a jQuery document ready, it gave those browsers enough time to catch up. As that part of the code (where the error is coming from) isn't run until document ready anyway, this should have little or no effect on other browsers.

To do the same thing, in your /drupal/files/fade/fadhd.js file, add the highlighted (top and bottom, don't miss the bottom part):

var mygallery=new fadeSlideShow({
wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
dimensions: [700, 400], //width/height of gallery in pixels. Should reflect dimensions of largest image
imagearray: [
["http://www.castrobarbudo.com/drupal/files/slideshow_images/Imaxe1.jpg", "", "", "Posando na muralla... decembro 2012"],
["http://www.castrobarbudo.com/drupal/files/slideshow_images/Imaxe2.jpg", "http://www.castrobarbudo.com", "_new", "Así nos chamamos!!!"],
["http://www.castrobarbudo.com/drupal/files/slideshow_images/Imaxe3.jpg", "", "", "Posando cerca da muralla... decembro 2012"],
["http://www.castrobarbudo.com/drupal/files/slideshow_images/Imaxe4.jpg", "", "", "De festa... cando subimos o Monte Ézaro"],
["http://www.castrobarbudo.com/drupal/files/slideshow_images/Imaxe5.jpg", "", "", "O podio femenino na marcha do 2012."] //<--no trailing comma after very last image element!
displaymode: {type:'auto', pause:2500, cycles:0, wraparound:false},
persist: false, //remember last viewed slide and recall within same session?
fadeduration: 900, //transition duration (milliseconds)
descreveal: "ondemand",
togglerid: ""

It's odd that this works because it's basically the same construct (I'm using the shorthand version is the only difference) that those browsers are having a problem with in the main script. However, because there are two versions of jQuery on the page, it may be that the first one is forcing the browser to wait until it has parsed the second one before proceeding with the slideshow's initialization. In any case, it works here.

The browser cache may need to be cleared and/or the page refreshed to see changes.

02-06-2013, 03:00 AM
First, I want to apologize for violation the terms of use. I not change the credit notice in the files "fadeslideshow.js", "fadhd.js" and "jquery.min.js". Is necessary to put the credit notice in somewhere else? please excuse my clumsiness. When I write "<div id="fadeshow1"></div></div> y put the credit notice. Is enough? Please could verify that I am keeping the terms of use?

Second, thanks for your fast an right .answer. Now work. Thanks again.

02-06-2013, 03:45 AM
Oh, I see. I missed that. You moved the credit to the slideshow div and turned it into an HTML comment. That's fine. Sorry I gave you that warning. Usually folks leave the comment with the script. I saw that you had put it in the external initialization file and thought that since it wasn't on the page with the scripts that you had left it off the page.

My bad. Pleas accept my apologies.