Welcome !
Located in the south of Auvergne, in France, an expert in free software provides you with modern communication tools on Internet.
Home     Company     Web references     Services    

> Free software > Animated InnerFade with JQuery

> Animated InnerFade with JQuery

Full w3c compliant animated slideshow with sliding effect on large images

What is it ?

This plugin for jQuery is an extension to the work of Torsten Baldes : InnerFade with JQuery.

We added :
- an optional slide effect on large images
- ’prev’, ’pause’, ’next’ functions
- an optional background frame
- a title panel

Exemple 1 : portfolio

  • cc-chaise-dieu
  • OpenStudio
  • OpenStudio
  • OpenStudio

In the BODY section

In the BODY section

in your CSS check that padding an margin are set to 0 :


ul#animated-portfolio{
        padding: 0;
        margin: 0;
        list-style-type: none;
}
ul#animated-portfolio li{
        padding: 0;
}

Example 2 : panoramic views

  • openstudio
  • OpenStudio
  • OpenStudio

In the HEAD section :

In the BODY section :

In the CSS : (layout for title panel is defined in the CSS)


.innerfade-title{
       position: absolute;
       bottom: 20px;
       left: 0;
       z-index: 290;
       width: 100%;
       background: #00a7ee url(img/title-bg.png);
       height: 34px;
       filter:alpha(opacity=80);
       -moz-opacity: 0.8;
        opacity: .8;
        border-top: 1px solid white;
}
.innerfade-title h2{
        color: white;
        font-weight: bold;
       margin-top: 0;
       margin-bottom: 0;
              text-align: center;
       font-family: Arial;
       font-size: 16px;
       font-style: italic;
       line-height: 34px;
}
.mycontrolboxclass{
        position: absolute;
        right: 35px;
        top: 20px;
}

and check that padding an margin are set to 0 :


ul#animated-portfolio{
        padding: 0;
        margin: 0;
        list-style-type: none;
}
ul#animated-portfolio li{
        padding: 0;
}

The call


$('ID or class of the element containing the fading objects').animatedinnerfade({
                  parameter1: 'value1',  
                  parameter2: 'value2',
                  ...
                  });

parametersvalues
animationtypeType of animation ’fade’ or ’slide’ (Default: ’fade’)
speedFadingspeed in milliseconds or keywords (slow, normal or fast)(Default: ’normal’)
timeoutTime between the fades in milliseconds (Default: ’15000’)
typeType of slideshow: ’sequence’ or ’random’ (Default: ’sequence’)
containerheightHeight of the containing element in px (Default: ’300px’)
containerwidthWidth of the containing element in px (Default: ’600px’)
animationSpeedAnimation speed in miliseconds (default : 15000). Just set it to 0 to disable the slide effect
runningclassCSS-Class which the container get’s applied (Default: ’innerfade’)
bgFramepath to the frame to display under the view. (Default: ’none’)
controlBox’none’ ’show’ (always visible) or ’auto’ (appears on mouse over), add ’rew’, ’pause’ and ’next’ buttons on mouse over. Attention : Requires jquery >= 1.2.1
controlBoxClassCSS-Class which the container get’s applied or ’none’ (Default: ’none’)
controlButtonsPathpath for control buttons : previous.gif, pause.gif, play.gif and next.gif (default : ’img’)
displayTitledisplay titles ? ’yes’ or ’none’. (default ’none’)
titleClassCSS class for title panel. (Default : ’innerfade-title’)

You need to set title, width and height attributes on images to display title on panel and activate the sliding effect on images.

Note : if you are using a png frame, you need apply a patch for transprency on ie6. for example when using the win_png.htc patch, add this call on your css :


.bg-frame img{ behavior: url(win_png.htc); }

Download

jquery.animated.innerfade.zip

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version.

Monday 29 October 2007

Reply to this article

41 Forum messages

  • help! image slider gone?!

    19 November 2009 21:01, by david_ffm

    hello,

    i am looking for an image slider in javascript. it should be a row of thumbnails that keeps moving to the left and/or right.

    it should be either moving constantly or move "onmouseover" (not by clicking)

    my brother keeps pretending that he saw those kind of sliders on this page here somewhere. he says he saw a page with loads of different applications relating to images/jquery, amongst also panorama viewer, virtual tour etc.

    he bookmarked this page but now he pretends it looks different. google archive search tells me that he is wrong somehow ;-) … but still, admin or somebody, anyone has an idea?

    many thanks in advance,

    david

    Reply to this message

  • Animated InnerFade with JQuery

    22 June 2009 13:48, by ZeB

    Bonjour,

    Tout d’abord bravo pour cette extension du plug-in InnerFade :)

    Néanmoins, j’ai un petit souci. J’utilise FancyBox (un lightbox like), et lorsque je lance ce dernier (avec un diaporama innerfade en arrière-plan), la FancyBox passe derrière le diaporama (après le premier fade). J’ai essayé d’appliquer un z-index:999; à la fancybox mais ça n’a rien réglé…

    Une petite idée pour m’aider ? Merci d’avance ;)

    (j’ai mis le lien de la démo, allez sur Portfolio (ou touche P), puis cliquez sur crédits (en bas à droite ou touche R), laissez tourner au moins un cycle de fade pour voir le problème)

    See online : Démo

    Reply to this message

    • Animated InnerFade with JQuery 24 June 2009 22:16, by ZeB

      Bon finalement il fallait modifier plus en profondeur les CSS de la FancyBox pour qu’elle reste à tout prix au dessus de l’innerfade.

      Par contre, il me semble que votre plug-in est un peu buggé (et ce n’est pas relatif à mes scripts, ça le fait aussi sur votre démo) : si on met en pause pendant la transition de deux images, puis que l’on relance, l’image en cours ne continue pas son FadeIn. Si on continue à jouer comme ça deux ou trois fois, là ça commence à bien bugger, et parfois il n’y a même plus de FadeIn ou FadeOut à la transition…

      Reply to this message

  • Bonjour, et merci pour ce super plugin. Il me plait tellement, que je veux en mettre plusieurs sur ma page d’accueil, mais ça ne marche pas. Je suppose qu’il faudrait remplacer le id par une classe (un id est a priori unique)?

    See online : Binod singer

    Reply to this message

  • Animated InnerFade with JQuery

    17 April 2009 12:00, by x@v

    bonjour, moi sous ie sa bug complètement, je ne vois pas bien pourquoi, étant donné que j’ai recopié l’exemple et utilisé la même css ?

    http://www.6tnline.com/cour/minSite/diaporama.html

    Merci

    Reply to this message

  • Animated InnerFade with JQuery

    11 March 2009 06:26

    I downloaded the example zip file. Everything works but the "controls" in Example 2 are "missing". Can you help out on this?

    Thanks

    Reply to this message

  • Bonjour et merci pour votre code.

    j’aimerais simplement afficher les boutons avant et après (sans le pause) que dois je faire ? est ce compliqué ?

    Reply to this message

  • Animated InnerFade with JQuery

    11 November 2008 18:14
    This failed to work in IE6/7 until I changed containerheight to containerHeight :(

    See online : Tom Coady

    Reply to this message

  • Effect from left to right

    5 October 2008 14:20, by Joris

    Hello,

    i really like this effect and i’m trying to use it as a way to make a ’film’ like effect. I want an image to be seen from left to right, no up and down, and then fade to load another image from left to right.

    I’m able to get it working like this, but it doesn’t move ’smoothly’. Is there a way to get the ’stopping in the middle of the image and then move forward’ (i guess its the up and down) out of the script?

    I got the up and down out of it by making the containerheight as high as the images…

    Greetings and thanks.

    See online : http://www.mijnruimte.com/index.htm

    Reply to this message

  • Animated InnerFade with JQuery

    22 July 2008 16:54, by shimmy
    is there a way to stop the animation after a set time? i want it to loop through a set of images and then stop at the end. without a continues loop.

    Reply to this message

    • Hi, I am very happy with this script, but I am having a problem in IE7 with part of the transition. I am placing my content for these inside of divs rather than ul items as I want to have some text on the overlay but below the title:

      http://socalcoasters.com/sccv308_test2.html

      If you look at the bottom half of this, which I set up as .innerfade-title2, while it works perfectly in Firefox, in IE the second class I added has a delay/choppiness with the opacity transition on the part I added…..is there any way to get the same smoothness in transition as if I just used the Title attribute? Thanks.

      See online : http://socalcoasters.com/sccv308_te...

      Reply to this message

  • First image also random

    16 June 2008 14:45, by casey

    To make first image random (when settings.type == ’random’), I changed some code:

    (look for variable ’first’)


    ...
                    if (elements.length > 1) {
                            var first = 0;
                            if ( settings.type == 'random' ) {
                                    do { first = Math.floor ( Math.random ( ) * ( elements.length ) ); } while ( first == 0 )
                            }

                            $(this).css('position', 'relative').css('overflow', 'hidden').css('height', settings.containerheight).css('width', settings.containerwidth);

                            $(this).addClass(settings.runningclass);
                           
                            for ( var i = 0; i < elements.length; i++ ) {
                                    $(elements[i]).css('position', 'absolute').css('top', 0).css('left', 0).css('z-index', String(elements.length-i));
                                    $(elements[i]).hide();
                            };
                            $(elements[first]).css('top', 0);
                            $(elements[first]).css('left', 0);
                           
                            $.animatedinnerfade.move_photo(elements[first], settings);
                           
                            if ( settings.type == 'sequence' ) {
                                    mytimer = setTimeout(function(){
                                            $.animatedinnerfade.next(elements, settings, 1, first, mytimer, pauseActivated);
                                    }, settings.timeout);
                            }
                            else {
                                    var nextrandom;
                                    do { nextrandom = Math.floor ( Math.random ( ) * ( elements.length ) ); } while ( nextrandom == first )
                                    mytimer = setTimeout((function(){$.animatedinnerfade.next(elements, settings, nextrandom, first, mytimer, pauseActivated);}), settings.timeout);
                            }
                            $(elements[first]).show();
                    }
    ...

    Reply to this message

  • Animated InnerFade with JQuery

    6 May 2008 20:10, by FilmTraveler
    There is a bug on line 66 of version 0.1.1 - this line has settings.controlBoxclass but it is supposed to be settings.controlBoxClass - notice the lower-case "c" in the original version. I hope this helps and is corrected in a future version!

    Reply to this message

  • Animated InnerFade with JQuery

    15 February 2008 14:29

    Bonjour

    Ce diapo est vraiment chouette .. Cependant je rencontre un petit problème.

    Il diffuse des images qui n’ont pas toujorus la meme largeur ni hauteur, et j’aimerais que ces images soient centrées dans ma division. Je n’y parviens d’aucuns manières.

    Même si je met un

    et que je lui attribue text-align: center; ca ne va pas.

    J’ai essayé en jouant sur les marges etc… Mais je n’y parviens toujours pas :-)

    Merci à vous

    Reply to this message

  • Animated InnerFade with JQuery

    9 February 2008 22:41, by VDigital

    Juste pour correction dans le css fourni en exemple sur ul#animated-portfolio:

    ul#animated-portfolio{
           padding: 0;
           margin: 0;
           list-style-tyle: none;
    }

    C’est list-style-type avec un ’p’ et non un ’l’…

    8-)

    See online : Plugin Panoramas

    Reply to this message

    • Animated InnerFade with JQuery 10 February 2008 18:00, by Arnault

      merci VDigital, c’est corrigé !

      très bonne idée l’intégration dans phpwebgallery. Je suis en train de reprendre un peu le plugin, pour le simplifier et alléger le cpu, pour l’instant c’est pas très concluant…

      a+

      Reply to this message

  • Animated InnerFade with JQuery

    5 February 2008 17:58, by trolin
    bonjour, j’aime beaucoup votre plugin, il fonctionne très bien (merci de le partager) je rencontre cependant une limitation : j’aimerais pouvoir déclencher l’arrêt ou la reprise du diaporama par des évènements de mon choix (par exemple au survol de la souris sur l’image). est ce possible ? merci d’avance de votre réponse

    Reply to this message

    • Animated InnerFade with JQuery 11 February 2008 10:30, by Arnault

      Bonjour,

      Oui, c’est possible avec la fonction trigger de jQuery. http://docs.jquery.com/Events/trigg...

      l’idée c’est de simuler un click sur les boutons de navigation.

      voici un exemple (non testé, je l’écris en direct) :

      - dans la section head, dans $(document).ready() après l’appel à animated inerfade :


      $("a.next-button").css("visibility", "hidden"); //on masque la flèche sur l'image
      $("a.mon-declencheur-suivant").bind('click', function(){
           $("a.next-button").trigger('click');  //lorsqu'on clique sur le lien "suivant", on déclenche un click sur la flèche de l'image
      });

      - dans le body : mettre un lien pour afficher l’image suivante


      <a href="#" class="mon-declencheur-suivant">suivant</a>

      - faire la même chose pour l’image précédente et la pause

      a+

      Reply to this message

  • Animated InnerFade with JQuery

    5 February 2008 00:39, by VDigital

    Juste pour vous signaler la prochaine publication d’un plugin… Pré-Annonce sur le site de PhpWebGallery et Démo en ligne sur mon site.

    Autant dire tout de suite des dizaines de nouveaux utilisateurs dans les prochains jours.

    D’avance et au nom de tous : un grand merci, pour ces scripts.

    Vincent (aka VDigital)

    Membre de l’équipe de développement de PhpWebGallery

    See online : [Plugin] Panoramas

    Reply to this message

  • I’m not an experienced JS developer but I’m experimenting with your Innerfade extension and found that if I add displayTitle: ’yes’ and refresh the page in Safari on Mac 10.5.1 it causes it to quit unexpectedly.

    It works fine in Firefox on the same system.

    When I take the displayTitle out, the problem is solved.

    Very useful plug-in though. Thanks and keep up the hard work. Regards Sim

    Reply to this message

  • Animated InnerFade with JQuery

    24 January 2008 12:31

    Hi,

    This script eats 80% cpu on firefox with Ubuntu. Is there any possibility for a fix? Great script!

    Greets,

    Anthony

    Reply to this message

    • Animated InnerFade with JQuery 8 April 2009 16:04

      I have to agree with Anthony. This is a CPU hog! I’m not even using the sliding animation. I’m simply iterating a list of 5 short sentences! I’m using FF 3.0.8 on a 2.3GHZ MacBook Pro with 4 GB of memory, and it’s not happy. The CPU usage jumps from 0.8 (idle) to anywhere between 30-50% whilst running.

      Merci, JP

      Reply to this message

  • Animated InnerFade with JQuery

    11 December 2007 14:58, by Lúcio Carneiro
    Excelent plugin! Only one thing: how can I set the controlBox to be always visible, not only on mouse over? Thank you!

    Reply to this message

    • Animated InnerFade with JQuery 11 December 2007 16:05, by Arnault

      good idea. i have introduced new values for the ’controlBox’ parameter :

      - ’none’ : no control box
      - ’show’ : control box is always visible
      - ’auto’ : control box appears on mouse over

      i have updated the zip file.

      @+

      Reply to this message

  • Animated InnerFade with JQuery

    27 November 2007 10:08

    Bonjour,

    sur IE6 seulement, il y a une marge bas et droite de 1cm environ en trop ou l’image apparait apres le cadre.

    C’est depuis que vous avez mis un cadre (alors qu’il n’y en avait pas) qu’il y a ce defaut. Allez sur la page avec IE et vous constaterez

    merci

    Reply to this message

    • Animated InnerFade with JQuery 27 November 2007 11:30, by Arnault

      ok merci ! c’est corrigé.

      (bien rafraîchir le navigateur pour avoir la dernière version).

      Reply to this message

      • Animated InnerFade with JQuery 27 November 2007 11:50, by Arnault
        pour info, j’ai juste agrandi un peu l’image de contour pour qu’elle fasse les dimensions exactes de la fenêtre. En principe ce redimensionnement est automatique (via les css), cependant sous ie, si on utilise le patch win_png.htc pour la transparence des png sous ie, le redimensionnement ne se fait plus.

        Reply to this message

  • Animated InnerFade with JQuery

    22 November 2007 09:21

    Bonjour, et merci pour ce beau plugin qui a de suite attiré mon attention parmi des dizaines testés.

    Sur mon PC XP, j’ai un problème d’affichage. Sur IE6, les boutons de défilement d’images sont avec une bordure; l’image elle même à un cadre sur le côté gauche et haut.

    Sur le dernier Firefox, 3 cotés ont une bordure (sauf le bas), les boutons sont avec bordure et la fenêtre de l’image est trop large d’un centimètre (l’image déborde)

    Sur Opéra, tout semble marcher; mais à un moment tout s’arrête et plus aucune images

    Manque t-il un css, dans votre page de démo?

    merci d’avance pour votre réponse

    Reply to this message

    • Animated InnerFade with JQuery 22 November 2007 14:18, by Arnault

      Bonjour, vous avez raison, il faut également préciser :


      ul {margin: 0; padding: 0;}
      img {border: none;}

      J’en ai profité pour l’inclure dans la nouvelle version du zip, ainsi qu’un fichier index.html et des images d’exemple. Tenez moi au courant.

      Reply to this message

      • Animated InnerFade with JQuery 22 November 2007 14:49

        Merci pour votre modif

        C’est phénoménal

        c’est parfait, sauf sur Opéra ou en cliquant sur le bouton image suivante, à un moment il n’y a plus d’image qui s’affiche. De plus le fadeIn/Out ne fonctionne pas.

        Je déclare votre diaporama comme le meilleur sur Internet!

        Pourriez-vous rajouter la fonctionnalité "miniatures" : en cliquant sur un petit bouton, les vignettes des photos apparaissent; en cliquant sur une d’elle, celà mène à l’affichage de la photo. Il y a un plugins super : http://sorgalla.com/jcarousel/ qui fait celà; Les 2 scripts réunis, ça ferait un systeme de diaporama, complet et fantastique

        Merci

        Reply to this message

      • Animated InnerFade with JQuery 22 November 2007 15:04

        Petite précision;

        lorsque l’on clique vite ou successivement sur la fleche pour voir les images suivantes, il n’y a plus d’image affichée, il faut attendre quelques secondes que ca revienne; de plus le sens est inversé, ca va dans un sens puis dans l’autre; c’est la pagaille, puis ca revient tranquillement C’est valable pour tous les navigateur

        Merci

        Reply to this message

        • Animated InnerFade with JQuery 22 November 2007 19:26, by Arnault

          ok, le pb survient lorsqu’on revient sur une image trop vite (dont l’anim n’est pas complètement terminée). En attendant une meilleure solution, je bloque les boutons next/prev tant que l’image ciblée n’est pas prête.

          j’ai mis à jour le zip. merci pour tes commentaires !

          sinon pour le carroussel, j’envisage rien pour l’instant. Celà dit, je suis en train de développer un carrousel multimédia (photo, vidéo et audio) en jQuery : http://www.openstudio.fr/jQuery-Mul...

          Reply to this message

          • Animated InnerFade with JQuery 23 November 2007 10:49

            merci

            j’allais justement te proposer la même solution (bloquer les boutons tant que l’image n’est pas complètement chargée) j’essaie ton nouveau script

            merci de ta réactivité

            Reply to this message

          • Animated InnerFade with JQuery 23 November 2007 11:16

            Encore moi!

            Merci pour les modifs Sur IE seulement, le panoramic views n’affiche rien. De plus, (pour info), dans le fichier index.html il y a src="squelettes/js/jquery.animated.innerfade.compressed.js" qui n’existe pas dans le rep js

            Le porfolio marche partout

            merci

            Reply to this message


Follow-up of the site's activity :: Site Map :: Mentions légales :: Contact :: SPIP :: OpenStudio - 2 rue Pierret 43000 Le Puy en Velay - +33 (0) 4 82 53 02 01