0

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

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

1
  • Do you mean the "Toggles all paragraphs" example?
    – Shog9
    Commented Jan 31, 2010 at 22:55

1 Answer 1

1

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.