jquery - prettyPhoto in IE not working properly -


prettyphoto not displaying on ie7. have 3 pictures in gallery, , picture overlay comes when click on third picture, other ones behave normal pictures (it goes picture location).

this code:

<ul class="gallery clearfix">             <li><a href="images/j/dscn0868.jpg" rel="prettyphoto[gallery1]" title="hermoso "><img src="images/j/dscn0868.jpg" width="250" height="180" alt="" /></a></li>             <li><a href="images/j/dscn0863.jpg" rel="prettyphoto[gallery1]"><img src="images/j/dscn0863.jpg" width="250" height="180" alt="" /></a></li>             <li><a href="images/j/dscn0855.jpg" rel="prettyphoto[gallery1]"><img src="images/j/dscn0855.jpg" width="250" height="180" alt="" /></a></li>                         </ul> 

the javascript:

<link rel="stylesheet" href="prettyphoto/css/prettyphoto.css" type="text/css" media="screen" title="prettyphoto main stylesheet" charset="utf-8" /> <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script> <script src="prettyphoto/js/jquery.prettyphoto.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf-8">     $(document).ready(function(){             $("area[rel^='prettyphoto']").prettyphoto();              $(".gallery:first a[rel^='prettyphoto']").prettyphoto({animation_speed:'normal',theme:'light_rounded',slideshow:3000, autoplay_slideshow: false});             $(".gallery:gt(0) a[rel^='prettyphoto']").prettyphoto({animation_speed:'fast',slideshow:10000, hideflash: true});              $("#custom_content a[rel^='prettyphoto']:first").prettyphoto({                     custom_markup: '<div id="map_canvas" style="width:260px; height:265px"></div>',                     changepicturecallback: function(){ initialize(); }             });              $("#custom_content a[rel^='prettyphoto']:last").prettyphoto({                     custom_markup: '<div id="bsap_1259344" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div><div id="bsap_1237859" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6" style="height:260px"></div><div id="bsap_1251710" class="bsarocks bsap_d49a0984d0f377271ccbf01a33f2b6d6"></div>',                     changepicturecallback: function(){ _bsap.exec(); }             });     }); </script> 

thanks!

try changing js code in relation gallery to:

        $(".gallery li:first a").prettyphoto({animation_speed:'normal',theme:'light_rounded',slideshow:3000, autoplay_slideshow: false});         $(".gallery li").slice(1).children('a').prettyphoto({animation_speed:'fast',slideshow:10000, hideflash: true}); 

should work :d

btw. when asking question include link example, or preferably jsfiddle demo.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -