Is it ok to use google.setOnLoadCallback multiple times?

后端 未结 3 1634
借酒劲吻你
借酒劲吻你 2020-12-17 19:23

I\'m building a site using ASP.NET MVC, and I have partial views that use jQuery to do various things. I was thinking of switching to Google\'s AJAX API and using their loa

3条回答
  •  独厮守ぢ
    2020-12-17 19:39

    I may be missing the point here but there's no clash between your usercontrols $(document).ready and google.setOnLoadCallback that I know of.

    Assuming you're using google to load jquery, your code in the $(document).ready won't run until google has loaded jquery anyway.

    So long as jQuery is being loaded in your masterpage, not sure what the issue is.

提交回复
热议问题