2012-02-14 72 views
0

HTML结构Jquery的不是闪光灯工作的IE 6和Chrome浏览器

<div class="dinz-slider-film trigger-vid"> 
<object width="480" height="340" class="vid-flash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="FlashID" style="visibility: visible;"> 
    <param value="sites/all/themes/subtheme/images/test.swf" name="movie"> 
    <param value="high" name="quality"> 
    <param value="opaque" name="wmode"> 
    <param value="6.0.65.0" name="swfversion"> 
    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. --> 
    <param value="sites/all/themes/subtheme/Scripts/expressInstall.swf" name="expressinstall"> 
    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. --> 
    <!--[if !IE]>--> 
    <object width="480" height="340" data="/sites/all/themes/subtheme/images/test.swf" type="application/x-shockwave-flash"> 
    <!--<![endif]--> 
    <param value="high" name="quality"> 
    <param value="opaque" name="wmode"> 
    <param value="6.0.65.0" name="swfversion"> 
    <param value="sites/all/themes/subtheme/Scripts/expressInstall.swf" name="expressinstall"> 
    <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. --> 
    <div> 
     <h4>Content on this page requires a newer version of Adobe Flash Player.</h4> 
     <p><a href="http://www.adobe.com/go/getflashplayer"><img width="112" height="33" alt="Get Adobe Flash player" src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"></a></p> 
    </div> 
    <!--[if !IE]>--> 
    </object> 
    <!--<![endif]--> 
</object> 
<script type="text/javascript"> 
&lt;!-- 
swfobject.registerObject("FlashID"); 
//--&gt; 
</script> 
</div> 

jQuery代码:

$('.trigger-vid object.vid-flash').click(function() { 
    alert('stop'); 
    clearInterval(play); //Stop the rotation 
}); 

下面的jQuery代码是工作在Mozilla的罚款。但在Chrome和IE 6+中工作不正常

我坚持这一点...但我很清楚(或可能)与一个问题是以上的HTML结构。

任何想法会感激,乐于助人......

+0

[在闪光灯对象中的JavaScript onclick事件(可能重复http://stackoverflow.com/questions/1444562/javascript-onclick-event-over-flash-object) – 2012-02-14 08:11:45

+0

与jQuery无关 - 单击Flash不可能使用JavaScript ..也许某些浏览器允许这样的事情,但它仍然不是标准的我知道。 – 2012-02-14 08:12:28

回答

相关问题