Firefox doesn't fire $(document).ready(function() {

前端 未结 5 1573
粉色の甜心
粉色の甜心 2021-01-13 07:45

I have a page that uses the jquery function:

$(document).ready(function() {

and I have put an alert in there, and tried everything. It does

5条回答
  •  孤城傲影
    2021-01-13 08:27

    If one jQuery(document).ready block has an error inside it, later document.ready blocks do not get performed.

    For example, if one wordpress plugin does error out inside its own jQuery(document).ready, then all following jQuery blocks in other plugins may start failing.

    Firefox 18, Chrome 23, Opera 12 behaves this way. jQuery v1.7.2

    Recently it caused some trouble to me, and I can't imagine why I never had to deal with this before.

    Possibly it is a jQuery bug/unintended behaviour.

提交回复
热议问题