开发者

Problem in IE8 with toggle()

开发者 https://www.devze.com 2022-12-19 05:24 出处:网络
Her开发者_运维百科e: http://api.jquery.com/toggle/ Anyone knows why the second example (Hello and Good Bye Example) does not work in IE8 ?Possibly because the script is not within a $(document).read

Her开发者_运维百科e: http://api.jquery.com/toggle/

Anyone knows why the second example (Hello and Good Bye Example) does not work in IE8 ?


Possibly because the script is not within a $(document).ready(... block, as follows:

<script>
$(document).ready(function() {
    $("button").click(function () {
        $("p").toggle();
    });
});
</script>

Unfortunately, I am unable to test in IE8. It works fine in Safari, Firefox and Chrome.

0

精彩评论

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