开发者

Javascript function does not work after page loaded via Jquery Ajax request

But here's the crazy thing, this only happens with Safari. The function works as it should on Chrome, IE< and开发者_运维技巧 Firefox.

I tried adding:

$(document).ajaxComplete(function() {
    var myfunctionhere = function()
      {
      //my function
      }
});

Anyone got any ideas what is going on with Safari here and how I can get it to play nice.


The solution was to get rid of everything but the script and the content inside of the body - remove the html, head, and body tags.

This was also addressed here JavaScript doesn't execute in Safari when loading entire page via jQuery's load() method

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜