开发者

can google o3d and jQuery be used in the same page?

开发者 https://www.devze.com 2022-12-23 15:17 出处:网络
I would like to use both of these library on the same page but they seem to conflict when they are l开发者_JS百科oaded at the same time. Does anyone know of any examples where they are both used or wh

I would like to use both of these library on the same page but they seem to conflict when they are l开发者_JS百科oaded at the same time. Does anyone know of any examples where they are both used or what might help prevent conflicts?


You are probably looking for the jQuery noconflict mode:

http://api.jquery.com/jQuery.noConflict/


I believe this was due to the o3d code I had setting window.onload = init() function of my o3d code.

commenting out that line and adding:

jQuery(function() {

  init();

}

at the end solves the problem.

0

精彩评论

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