Bonsoir,
Je suis en train de tester une lightbox sur mon site mais le problème c'est qu'Internet Explorer ne réagit pas comme il faut.
Voici le code :
Ensuite pour insérer les images sur ma page c'est tout simplement ça :
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 <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.4.1/build/assets/skins/sam/skin.css"> <script type="text/javascript" src="http://yui.yahooapis.com/2.4.1/build/utilities/utilities.js"></script> <script type="text/javascript" src="http://yui.yahooapis.com/2.4.1/build/container/container-min.js"></script> <link rel="stylesheet" type="text/css" href="lightbox.css"> <script type="text/javascript" src="Lightbox-min.js"></script> <script type="text/javascript"> //defer the instantiation of Lightbox. Call when the page has finished loading. init = function(){ //creating a data source object var dataSource = { image1:{url:"48_reelle.jpg", title: "image1", text: "bla bla bla bla bla bla bla bla"}, d'autres images ici }; //Instantiate a Lightbox object var lightbox = new YAHOO.com.thecodecentral.Lightbox(dataSource); } YAHOO.util.Event.on(window, 'load', init); </script> </head>
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 <img src="48_reduit.jpg" id="image1"/> <img src="49_reduit.jpg" id="image2"/><br/> <img src="50_reduit.jpg" id="image3"/> <img src="51_reduit.jpg" id="image4"/>
Sur Google Chrome et Internet Explorer, après un clic, l'image s'affiche en grand dans la lightbox.
Sur Internet Explorer le clic n'a aucun effet. Si j'appuie sur F5 pareil.
Je suis obligé de faire un clic droit et de cliquer sur "Actualiser". Après cela, tout fonctionne comme sur Chrome et Firefox.
Savez vous pourquoi et comme y remédier ?
Merci d'avance
Partager