IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

jQuery Discussion :

Conflit entre plusieurs modules jquery


Sujet :

jQuery

  1. #1
    Candidat au Club
    Homme Profil pro
    Réalisateur / Cadreur / Monteur
    Inscrit en
    Mars 2014
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Réalisateur / Cadreur / Monteur

    Informations forums :
    Inscription : Mars 2014
    Messages : 6
    Points : 3
    Points
    3
    Par défaut Conflit entre plusieurs modules jquery
    Bonjour,
    Sur ma page, j'ai un conflit entre 3 modules : BxSlider, LightBox et HoverSlideEffect
    Lorsque j'ajoute le code du module HoverSlideEffect dans le body, le module LightBox ne fonctionne plus.
    Je pense que mon code peut être simplifié, avez-vous des petits conseils à me donner.
    Merci d'avance,
    Voici le code :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    <head>
     
    <--bxSlider-->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
    <script src="http://www.jeromegobin.hostei.com/bxslider/jquery.bxslider.min.js" type="text/javascript"></script>
    <link href="http://www.jeromegobin.hostei.com/bxslider/jquery.bxslider.css" rel="stylesheet" type="text/css"/>
     
    <--LightBox-->
    <script type="text/javascript" src="http://www.jeromegobin.hostei.com/video/js/mootools.js"></script>
    <script type="text/javascript" src="http://www.jeromegobin.hostei.com/video/js/swfobject.js"></script>
    <script type="text/javascript" src="http://www.jeromegobin.hostei.com/video/js/videobox.js"></script>
    <link rel="stylesheet" href="http://www.jeromegobin.hostei.com/video/css/videobox.css" type="text/css" media="screen"/>
     
    <--HoverSlideEffect-->
    <script src="http://www.jeromegobin.hostei.com/hoverslideeffect/js/cufon-yui.js" type="text/javascript"></script>
    <script src="http://www.jeromegobin.hostei.com/hoverslideeffect/js/Cantarell.font.js" type="text/javascript"></script>
    <link rel="stylesheet" href="http://www.jeromegobin.hostei.com/hoverslideeffect/css/style.css" type="text/css" media="screen"/>
     
    <script type="text/javascript">
    //<![CDATA[
    jQuery.noConflict();
    //]]>
    </script>
     
        </head>
     
    <body>
    <--bxSlider-->
     
    <ul class="bxslider">
        <li>
            <img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-1.jpg" alt=""/>
        </li>
     
        <li>
            <img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-2.jpg" alt=""/>
        </li>
     
        <li>
            <img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-3.jpg" alt=""/>
        </li>
     
        <li>
            <img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-4.jpg" alt=""/>
        </li>
     
        <li>
            <img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-5.jpg" alt=""/>
        </li>
    </ul>
     
    <script type="text/javascript">
    //<![CDATA[
    jQuery('.bxslider').bxSlider({ auto: true, autoControls: true });
    //]]>
    </script>
     
     
    <--LightBox-->
     
    <a href="https://vimeo.com/88662703&amp;autoplay=1" rel="vidbox 560 315"><img onmouseover="this.src='http://www.jeromegobin.hostei.com/logo/showreel_2.gif'" onmouseout=
    "this.src='http://www.jeromegobin.hostei.com/logo/showreel_1.jpg'" src="http://www.jeromegobin.hostei.com/logo/showreel_1.jpg" alt="" width="300" border="0" /></a>
     
     
    <--HoverSlideEffect-->
     
    <div id="hs_container" class="hs_container">
        <div class="hs_area hs_area1">
            <img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area1/1.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area1/2.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area1/3.jpg" alt=""/>
        </div>
     
        <div class="hs_area hs_area2">
            <img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area2/1.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area2/2.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area2/3.jpg" alt=""/>
        </div>
     
        <div class="hs_area hs_area3">
            <img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area3/1.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area3/2.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area3/3.jpg" alt=""/>
        </div>
     
        <div class="hs_area hs_area4">
            <img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area4/1.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area4/2.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area4/3.jpg" alt=""/>
        </div>
     
        <div class="hs_area hs_area5">
            <img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area5/1.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area5/2.jpg" alt=""/> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area5/3.jpg" alt=""/>
        </div>
    </div>
    <!-- The JavaScript -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">
    </script><script type="text/javascript" src="http://www.jeromegobin.hostei.com/hoverslideeffect/js/jquery.easing.1.3.js">
    </script><script type="text/javascript">
    //<![CDATA[
                $(function() {
                                    //custom animations to use
                                    //in the transitions
                                    var animations          = ['right','left','top','bottom','rightFade','leftFade','topFade','bottomFade'];
                                    var total_anim          = animations.length;
                                    //just change this to one of your choice
                                    var easeType            = 'swing';
                                    //the speed of each transition
                                    var animSpeed           = 450;
                                    //caching
                                    var $hs_container       = $('#hs_container');
                                    var $hs_areas           = $hs_container.find('.hs_area');
     
                                    //first preload all images
                    $hs_images          = $hs_container.find('img');
                    var total_images    = $hs_images.length;
                    var cnt             = 0;
                    $hs_images.each(function(){
                        var $this = $(this);
                        $('<img/>').load(function(){
                            ++cnt;
                            if(cnt == total_images){
                                                            $hs_areas.each(function(){
                                                                    var $area               = $(this);
                                                                    //when the mouse enters the area we animate the current
                                                                    //image (random animation from array animations),
                                                                    //so that the next one gets visible.
                                                                    //"over" is a flag indicating if we can animate 
                                                                    //an area or not (we don't want 2 animations 
                                                                    //at the same time for each area)
                                                                    $area.data('over',true).bind('mouseenter',function(){
                                                                            if($area.data('over')){
                                                                                    $area.data('over',false);
                                                                                    //how many images in this area?
                                                                                    var total               = $area.children().length;
                                                                                    //visible image
                                                                                    var $current    = $area.find('img:visible');
                                                                                    //index of visible image
                                                                                    var idx_current = $current.index();
                                                                                    //the next image that's going to be displayed.
                                                                                    //either the next one, or the first one if the current is the last
                                                                                    var $next               = (idx_current == total-1) ? $area.children(':first') : $current.next();
                                                                                    //show next one (not yet visible)
                                                                                    $next.show();
                                                                                    //get a random animation
                                                                                    var anim                = animations[Math.floor(Math.random()*total_anim)];
                                                                                    switch(anim){
                                                                                            //current slides out from the right
                                                                                            case 'right':
                                                                                                    $current.animate({
                                                                                                            'left':$current.width()+'px'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'left'          : '0px'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the left
                                                                                            case 'left':
                                                                                                    $current.animate({
                                                                                                            'left':-$current.width()+'px'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'left'          : '0px'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the top       
                                                                                            case 'top':
                                                                                                    $current.animate({
                                                                                                            'top':-$current.height()+'px'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'top'           : '0px'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the bottom    
                                                                                            case 'bottom':
                                                                                                    $current.animate({
                                                                                                            'top':$current.height()+'px'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'top'           : '0px'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the right     and fades out
                                                                                            case 'rightFade':
                                                                                                    $current.animate({
                                                                                                            'left':$current.width()+'px',
                                                                                                            'opacity':'0'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'left'          : '0px',
                                                                                                                    'opacity'       : '1'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the left and fades out        
                                                                                            case 'leftFade':
                                                                                                    $current.animate({
                                                                                                            'left':-$current.width()+'px','opacity':'0'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'left'          : '0px',
                                                                                                                    'opacity'       : '1'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the top and fades out 
                                                                                            case 'topFade':
                                                                                                    $current.animate({
                                                                                                            'top':-$current.height()+'px',
                                                                                                            'opacity':'0'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'top'           : '0px',
                                                                                                                    'opacity'       : '1'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the bottom and fades out      
                                                                                            case 'bottomFade':
                                                                                                    $current.animate({
                                                                                                            'top':$current.height()+'px',
                                                                                                            'opacity':'0'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'top'           : '0px',
                                                                                                                    'opacity'       : '1'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;          
                                                                                            default:
                                                                                                    $current.animate({
                                                                                                            'left':-$current.width()+'px'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'left'          : '0px'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                    }       
                                                                            }
                                                                    });
                                                            });
     
                                                            //when clicking the hs_container all areas get slided
                                                            //(just for fun...you would probably want to enter the site
                                                            //or something similar)
                                                            $hs_container.bind('click',function(){
                                                                    $hs_areas.trigger('mouseenter');
                                                            });
                                                    }
                                            }).attr('src',$this.attr('src'));
                                    });                     
     
     
                });
    //]]>
    </script>
    </body>

  2. #2
    Rédacteur/Modérateur

    Avatar de SpaceFrog
    Homme Profil pro
    Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Inscrit en
    Mars 2002
    Messages
    39 640
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 74
    Localisation : Royaume-Uni

    Informations professionnelles :
    Activité : Développeur Web Php Mysql Html Javascript CSS Apache - Intégrateur - Bidouilleur SharePoint
    Secteur : Industrie

    Informations forums :
    Inscription : Mars 2002
    Messages : 39 640
    Points : 66 669
    Points
    66 669
    Billets dans le blog
    1
    Par défaut
    renseigne toi sur noConflict()
    https://api.jquery.com/jQuery.noConflict/
    Ma page Developpez - Mon Blog Developpez
    Président du CCMPTP (Comité Contre le Mot "Problème" dans les Titres de Posts)
    Deux règles du succès: 1) Ne communiquez jamais à quelqu'un tout votre savoir...
    Votre post est résolu ? Alors n'oubliez pas le Tag

    Venez sur le Chat de Développez !

  3. #3
    Candidat au Club
    Homme Profil pro
    Réalisateur / Cadreur / Monteur
    Inscrit en
    Mars 2014
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Réalisateur / Cadreur / Monteur

    Informations forums :
    Inscription : Mars 2014
    Messages : 6
    Points : 3
    Points
    3
    Par défaut
    Merci pour le lien. J'ai cherché un peu mais cela me semble assez complexe.
    Lorsque je n'avais que deux modules (Bxslider et Lightbox), j'avais réussi grâce à cette réponse :
    forum.jquery.com/topic/lightbox-and-bxslider-jquery-conflict

  4. #4
    Candidat au Club
    Homme Profil pro
    Réalisateur / Cadreur / Monteur
    Inscrit en
    Mars 2014
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Réalisateur / Cadreur / Monteur

    Informations forums :
    Inscription : Mars 2014
    Messages : 6
    Points : 3
    Points
    3
    Par défaut
    En fait, c'est ce code là qui est en conflit avec le module Lightbox.
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">
    Lorsque je le retire, tout fonctionne à part les animations du module HoverSlideEffect.

  5. #5
    bm
    bm est déconnecté
    Membre confirmé

    Homme Profil pro
    Freelance
    Inscrit en
    Octobre 2002
    Messages
    874
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Drôme (Rhône Alpes)

    Informations professionnelles :
    Activité : Freelance
    Secteur : Tourisme - Loisirs

    Informations forums :
    Inscription : Octobre 2002
    Messages : 874
    Points : 556
    Points
    556
    Billets dans le blog
    6
    Par défaut
    Sous cette forme :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js
    C'est en phase de développement , et cela peut éjecter d'autres modules dans 2 jours , 2 semaines ou 2 mois ..


  6. #6
    Candidat au Club
    Homme Profil pro
    Réalisateur / Cadreur / Monteur
    Inscrit en
    Mars 2014
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Réalisateur / Cadreur / Monteur

    Informations forums :
    Inscription : Mars 2014
    Messages : 6
    Points : 3
    Points
    3
    Par défaut
    Même en chargeant une version plus ancienne, j'ai le même soucis :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>

  7. #7
    Rédacteur

    Avatar de Bovino
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Points : 91 220
    Points
    91 220
    Billets dans le blog
    20
    Par défaut
    bm, ta phrase est loin d'être claire, mais elle me semble quand même plutôt fausse...

    Citation Envoyé par shooting_movie
    Conflit entre plusieurs modules jquery
    Heu...
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript"></script>
    ...
    <script type="text/javascript" src="http://www.jeromegobin.hostei.com/video/js/mootools.js"></script>
    C'est plutôt un conflit entre jQuery et MooTools ton problème... tu ferais mieux d'utiliser les plugins d'une seule bibliothèque plutôt que de les multiplier. En tout cas, passer à une version plus ancienne n'est pas la bonne solution.
    Pas de question technique par MP !
    Tout le monde peut participer à developpez.com, vous avez une idée, contactez-moi !
    Mes formations video2brain : La formation complète sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
    Mon livre sur jQuery
    Module Firefox / Chrome d'intégration de JSFiddle et CodePen sur le forum

  8. #8
    Candidat au Club
    Homme Profil pro
    Réalisateur / Cadreur / Monteur
    Inscrit en
    Mars 2014
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Réalisateur / Cadreur / Monteur

    Informations forums :
    Inscription : Mars 2014
    Messages : 6
    Points : 3
    Points
    3
    Par défaut
    Voilà, j'ai décidé de changer le module qui utilisait MooTools "videobox" par "html5lightbox" qui utilise jQuery.
    Quasiment tout fonctionne sauf html5lightbox lorsque j'ajoute le module HoverSlideEffect dans le body.
    Voici le nouveau code :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    <head>
     
    <--bxSlider-->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript">
    </script>
    <script src="http://www.jeromegobin.hostei.com/bxslider/jquery.bxslider.min.js" type="text/javascript">
    </script>
    <link href="http://www.jeromegobin.hostei.com/bxslider/jquery.bxslider.css" rel="stylesheet" type="text/css" />
     
    <--html5lightbox-->
    <script type="text/javascript" src="http://www.jeromegobin.hostei.com/html5lightbox/jquery.js">
    </script>
     
    <script type="text/javascript" src="http://www.jeromegobin.hostei.com/html5lightbox/html5lightbox.js">
    </script>
     
    <--HoverSlideEffect-->
    <script src="http://www.jeromegobin.hostei.com/hoverslideeffect/js/cufon-yui.js" type="text/javascript">
    </script>
     
    <script src="http://www.jeromegobin.hostei.com/hoverslideeffect/js/Cantarell.font.js" type="text/javascript">
    </script>
    <link rel="stylesheet" href="http://www.jeromegobin.hostei.com/hoverslideeffect/css/style.css" type="text/css" media="screen" />
     
    </head>
    <body>
     
    <--bxSlider-->
    <ul class="bxslider">
        <li>
            <img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-1.jpg" alt="réalisation clip vidéo 2012 j'veux un homme" />
        </li>
     
        <li>
            <img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-2.jpg" alt="tournage clip vidéo antony bellicourt errata" />
        </li>
     
        <li>
            <img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-3.jpg" alt="réalisation clip vidéo wild pigs 8ème solution" />
        </li>
     
        <li>
            <img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-4.jpg" alt="montage clip vidéo ornicard poussée de force" />
        </li>
     
        <li>
            <img src="http://www.jeromegobin.hostei.com/bxslider/images/slide-5.jpg" alt="montage clip vidéo dken mens pas" />
        </li>
    </ul>
    <script type="text/javascript">
    //<![CDATA[
    $.noConflict();
    $('.bxslider').bxSlider({ auto: true, autoControls: true });
    //]]>
    </script>
     
    <--html5lightbox-->
    <a class="html5lightbox" title="D-Ken - Mens Pas" href="http://www.youtube.com/v/8AVLoeON53k?version=3&amp;hl=fr_FR&amp;rel=0&amp;autoplay=1" data-width="560" data-height="315">Mens Pas</a>
     
    <--HoverSlideEffect-->
    <div id="hs_container" class="hs_container">
        <div class="hs_area hs_area1">
            <img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area1/1.jpg" alt="" /> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area1/2.jpg"
            alt="" /> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area1/3.jpg" alt="" />
        </div>
     
        <div class="hs_area hs_area2">
            <img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area2/1.jpg" alt="" /> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area2/2.jpg"
            alt="" /> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area2/3.jpg" alt="" />
        </div>
     
        <div class="hs_area hs_area3">
            <img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area3/1.jpg" alt="" /> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area3/2.jpg"
            alt="" /> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area3/3.jpg" alt="" />
        </div>
     
        <div class="hs_area hs_area4">
            <img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area4/1.jpg" alt="" /> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area4/2.jpg"
            alt="" /> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area4/3.jpg" alt="" />
        </div>
     
        <div class="hs_area hs_area5">
            <img class="hs_visible" src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area5/1.jpg" alt="" /> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area5/2.jpg"
            alt="" /> <img src="http://www.jeromegobin.hostei.com/hoverslideeffect/images/area5/3.jpg" alt="" />
        </div>
    </div>
    <!-- The JavaScript -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">
    </script><script type="text/javascript" src="http://www.jeromegobin.hostei.com/hoverslideeffect/js/jquery.easing.1.3.js">
    </script><script type="text/javascript">
    //<![CDATA[
    $.noConflict();
                $(function() {
                                    //custom animations to use
                                    //in the transitions
                                    var animations          = ['right','left','top','bottom','rightFade','leftFade','topFade','bottomFade'];
                                    var total_anim          = animations.length;
                                    //just change this to one of your choice
                                    var easeType            = 'swing';
                                    //the speed of each transition
                                    var animSpeed           = 450;
                                    //caching
                                    var $hs_container       = $('#hs_container');
                                    var $hs_areas           = $hs_container.find('.hs_area');
                                    
                                    //first preload all images
                    $hs_images          = $hs_container.find('img');
                    var total_images    = $hs_images.length;
                    var cnt             = 0;
                    $hs_images.each(function(){
                        var $this = $(this);
                        $('<img/>').load(function(){
                            ++cnt;
                            if(cnt == total_images){
                                                            $hs_areas.each(function(){
                                                                    var $area               = $(this);
                                                                    //when the mouse enters the area we animate the current
                                                                    //image (random animation from array animations),
                                                                    //so that the next one gets visible.
                                                                    //"over" is a flag indicating if we can animate 
                                                                    //an area or not (we don't want 2 animations 
                                                                    //at the same time for each area)
                                                                    $area.data('over',true).bind('mouseenter',function(){
                                                                            if($area.data('over')){
                                                                                    $area.data('over',false);
                                                                                    //how many images in this area?
                                                                                    var total               = $area.children().length;
                                                                                    //visible image
                                                                                    var $current    = $area.find('img:visible');
                                                                                    //index of visible image
                                                                                    var idx_current = $current.index();
                                                                                    //the next image that's going to be displayed.
                                                                                    //either the next one, or the first one if the current is the last
                                                                                    var $next               = (idx_current == total-1) ? $area.children(':first') : $current.next();
                                                                                    //show next one (not yet visible)
                                                                                    $next.show();
                                                                                    //get a random animation
                                                                                    var anim                = animations[Math.floor(Math.random()*total_anim)];
                                                                                    switch(anim){
                                                                                            //current slides out from the right
                                                                                            case 'right':
                                                                                                    $current.animate({
                                                                                                            'left':$current.width()+'px'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'left'          : '0px'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the left
                                                                                            case 'left':
                                                                                                    $current.animate({
                                                                                                            'left':-$current.width()+'px'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'left'          : '0px'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the top       
                                                                                            case 'top':
                                                                                                    $current.animate({
                                                                                                            'top':-$current.height()+'px'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'top'           : '0px'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the bottom    
                                                                                            case 'bottom':
                                                                                                    $current.animate({
                                                                                                            'top':$current.height()+'px'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'top'           : '0px'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the right     and fades out
                                                                                            case 'rightFade':
                                                                                                    $current.animate({
                                                                                                            'left':$current.width()+'px',
                                                                                                            'opacity':'0'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'left'          : '0px',
                                                                                                                    'opacity'       : '1'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the left and fades out        
                                                                                            case 'leftFade':
                                                                                                    $current.animate({
                                                                                                            'left':-$current.width()+'px','opacity':'0'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'left'          : '0px',
                                                                                                                    'opacity'       : '1'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the top and fades out 
                                                                                            case 'topFade':
                                                                                                    $current.animate({
                                                                                                            'top':-$current.height()+'px',
                                                                                                            'opacity':'0'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'top'           : '0px',
                                                                                                                    'opacity'       : '1'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                            //current slides out from the bottom and fades out      
                                                                                            case 'bottomFade':
                                                                                                    $current.animate({
                                                                                                            'top':$current.height()+'px',
                                                                                                            'opacity':'0'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'top'           : '0px',
                                                                                                                    'opacity'       : '1'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;          
                                                                                            default:
                                                                                                    $current.animate({
                                                                                                            'left':-$current.width()+'px'
                                                                                                    },
                                                                                                    animSpeed,
                                                                                                    easeType,
                                                                                                    function(){
                                                                                                            $current.hide().css({
                                                                                                                    'z-index'       : '1',
                                                                                                                    'left'          : '0px'
                                                                                                            });
                                                                                                            $next.css('z-index','9999');
                                                                                                            $area.data('over',true);
                                                                                                    });
                                                                                                    break;
                                                                                    }       
                                                                            }
                                                                    });
                                                            });
                                                            
                                                            //when clicking the hs_container all areas get slided
                                                            //(just for fun...you would probably want to enter the site
                                                            //or something similar)
                                                            $hs_container.bind('click',function(){
                                                                    $hs_areas.trigger('mouseenter');
                                                            });
                                                    }
                                            }).attr('src',$this.attr('src'));
                                    });                     
                                    
     
                });
    //]]>
    </script>
    </body>

  9. #9
    Rédacteur

    Avatar de Bovino
    Homme Profil pro
    Développeur Web
    Inscrit en
    Juin 2008
    Messages
    23 647
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 53
    Localisation : France, Gironde (Aquitaine)

    Informations professionnelles :
    Activité : Développeur Web
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Juin 2008
    Messages : 23 647
    Points : 91 220
    Points
    91 220
    Billets dans le blog
    20
    Par défaut
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    <--bxSlider-->
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js" type="text/javascript">
    </script>
    ...
    <--html5lightbox-->
    <script type="text/javascript" src="http://www.jeromegobin.hostei.com/html5lightbox/jquery.js">
    </script>
    Les commentaires HTML sont incorrects.
    Pourquoi veux-tu charger deux fois jQuery ?
    Pas de question technique par MP !
    Tout le monde peut participer à developpez.com, vous avez une idée, contactez-moi !
    Mes formations video2brain : La formation complète sur JavaScriptJavaScript et le DOM par la pratiquePHP 5 et MySQL : les fondamentaux
    Mon livre sur jQuery
    Module Firefox / Chrome d'intégration de JSFiddle et CodePen sur le forum

  10. #10
    Candidat au Club
    Homme Profil pro
    Réalisateur / Cadreur / Monteur
    Inscrit en
    Mars 2014
    Messages
    6
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Réalisateur / Cadreur / Monteur

    Informations forums :
    Inscription : Mars 2014
    Messages : 6
    Points : 3
    Points
    3
    Par défaut
    Voilà, j'ai trouvé grâce aux conseils de Bovino.
    J'ai retiré ça :
    Code html : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    <head>
    <script type="text/javascript" src="http://www.jeromegobin.hostei.com/html5lightbox/jquery.js">
    </script>
    </head>
    <body>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js">
    </script>
    </body>
    Si vous souhaitez voir le résultat c'est ici : www.shooting-movie.com
    Merci à vous,

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Réponses: 3
    Dernier message: 05/02/2015, 17h59
  2. Réponses: 1
    Dernier message: 29/01/2013, 08h40
  3. conflit entre 2 scripts jquery
    Par diice dans le forum jQuery
    Réponses: 3
    Dernier message: 15/02/2010, 15h02
  4. conflit entre plusieurs scripts dans une même page
    Par lebenou13 dans le forum Général JavaScript
    Réponses: 0
    Dernier message: 11/11/2009, 15h17
  5. [Technique] Conflits entre plusieurs requêtes
    Par Neowile dans le forum Décisions SGBD
    Réponses: 3
    Dernier message: 24/03/2003, 09h37

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo