开发者

jQuery click event not firing in IE 7/8

开发者 https://www.devze.com 2023-03-17 03:42 出处:网络
This is the a tag which has a class with a background image: <开发者_开发问答a id=\"PLAY\" class=\"Play_Unmarked\">

This is the a tag which has a class with a background image:

            <开发者_开发问答a id="PLAY" class="Play_Unmarked">
            </a>

The class itself:

.Play_Unmarked{border:0px;display: block;background-image:url('images/tomgui3_07.png');background-repeat:no-repeat;width:206px;height:44px;text-decoration:none;}

Event handeling:

$(document).ready(function(){
$('.Play_Unmarked').click(function(d){
alert("Okay");
 });
});

Everything is fine in FF, IE9 and Chrome.. why is it not firing in ie7/8?


Works fine for me on IE6/7/8 , give it a try from here please: http://jsfiddle.net/QbEDr/

don't forget to let us know if it work.


maybe elder IEs do not recognize <a>s without hrefs or names

0

精彩评论

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

关注公众号