开发者

Lightbox code works fine in Chrome/Firefox but not in IE

I have added some code for a "lightbox" effect on one of my images (below) [The website is live], which opens a YouTube video.

Lightbox code works fine in Chrome/Firefox but not in IE

The name of the plugin is called YOOeffects

And this is the code for the setup.

<p>
    <span id="avrpopup_eBay Marketplace" title="{handler:'iframe',size:{x:1024,y:768},url:'index.php%3Foption%3Dcom_avreloaded%26view%3Dpopup%26Itemid%3D25%26divid%3DeBay+Marketplace'}"></span>
    <a hre开发者_StackOverflow社区f="#" onclick="AvrPopup(event, 'eBay Marketplace', 'lightbox');">
        <img alt="120top_tips" src="/images/stories/content-images/120top_tips.jpg" height="186" width="150">
    </a>
</p>

It worked for Chrome and firefox yet seems to expand and look deformed in IE.

Not really sure why, are there any specific fixes in Internet Explorer I need to apply?


I would suggest you to try 'default' joomla's mechanizm of creating pop-up windows. It is very easy implement. To make it work just add this code into your template following code

JHTML::_('behavior.modal');

and add class 'modal' to the link which should open popup window. http://www.jeepstone.co.uk/2009/03/06/open-content-in-a-modal-pop-up-in-joomla/ I hope this will help you. If no - sorry for wasting your time.

UPD

Your setup code differs from the one in demo

<a rel="ligthbox;width=405;height=340" title="1984 Apple's Macintosh Commercial" href="http://www.youtube.com/v/OYecfV3ubP8&amp;autoplay=1">YouTube</a>

Why you aren't using code from tutorial? What does function AvrPopup('....') do?


I'm not sure if the plugin supports IE ≤ 7, probably should, as the developer say so, but it seems like the problem lies in switching the IE to a different document mode (in the case of IE8) and at the same time using a javascript library – IE8.js, claiming: "it makes IE behave like a standard-compliant browser", which appears not to be compatible with this plugin (or more precisely, the plugin doesn't count with this library). So to make it work, try to remove this conditional comment:

[Line 39]

<!--[if lt IE 8]>
<script src="/templates/actinic/js/IE8.js" type="text/javascript"></script>
<![endif]-->

or possibly remove this meta element (this should help to make it work at least under IE8):

[Line 5]

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜