jQuery $(document).ready () fires twice

前端 未结 13 835
忘了有多久
忘了有多久 2020-11-29 03:13

I\'ve been sifting around the web trying to find out whats going on here and I have not been able to get a concrete answer.

I have one $(document).ready

相关标签:
13条回答
  • 2020-11-29 04:02

    I had this happen to me this morning... and what I discovered after closely examining some html code in a jquery modal form that I had recently manipulated, that I'd accidentally removed a closing table tag. I haven't taken the time yet to fully understand why that caused the document.ready function to be called twice, but it did. Adding the closing table tag fixed this issue.

    jQuery JavaScript Library v1.8.3 (yes, it is a legacy app)

    0 讨论(0)
提交回复
热议问题