JSNI GWT jquery

江枫思渺然 提交于 2019-12-03 16:17:05

JSNI 101: $wnd.$($doc).ready(function($) {…

Using $ as the argument to the callback function should allow using $ inside the function instead of $wnd.$.

I always use this:

$wnd.jQuery($doc).ready(function(){});

Inside function, you can make a 'alias' to jQuery, e.g.:

function(){
  var _ = $wnd.jQuery;
  // go on....
}

Hope it helps :)


BTW: this is how we did it in GWT-Bootstrap.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!