Pages

Monday, March 19, 2012

LightBox problem with Internet Explorer


Its usually find that Lightbox create some problems with IE. Recently i was working in lightbox and faced the same problem. Lightbox gallery work fine in every browser except IE. After some Googling i found the following solution to the problem.

First:-

Put all the javascript Ref at the bottom of the web page but before closing tag i.e </body>
instead of head tag.

Code snippet:

<body>
<div>HTML data<div>
<div>HTML data<div>
<div>HTML data<div>
   <script src="/lib/jquery-1.6.2.min.js" type="text/javascript"></script>
    <script src="/lib/jquery.jcarousel.js" type="text/javascript"></script>  
</body>

Second:-

Call jquery noconflict method to remove confliction between jquery libraries. Have a look at below piece of code.

Code snippet:

<body>
<div>HTML data<div>
<div>HTML data<div>
<div>HTML data<div>
   <script src="/lib/jquery-1.6.2.min.js" type="text/javascript"></script>
    jQuery.noConflict()   
    <script src="/lib/jquery.jcarousel.js" type="text/javascript"></script>  
</body>

Above ways help me to solve the lightbox problem in IE.
Hope it will be helpful for you all.

Thanks,
Amit

1 comment: