views:

72

answers:

1

Here: http://api.jquery.com/toggle/

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

+1  A: 

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.

karim79