在GWT中是否有添加JQuery插件的等价物?

在GWT中是否有添加JQuery插件的等价物?,gwt,Gwt,我有一个使用GWT构建的现有项目。我们需要在大多数社交网站上共享这个网站上的内容,JQuery add这个插件似乎在这方面做得很好 GWT中是否有可用于此的包装器?它实际上非常容易实现。作为GWT程序员,一旦你精通这一点,你的视野就会开阔,正如我将演示的那样,这实际上非常容易 添加jQuery并将此插件源添加到DOM中。例如: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.

我有一个使用GWT构建的现有项目。我们需要在大多数社交网站上共享这个网站上的内容,JQuery add这个插件似乎在这方面做得很好


GWT中是否有可用于此的包装器?

它实际上非常容易实现。作为GWT程序员,一旦你精通这一点,你的视野就会开阔,正如我将演示的那样,这实际上非常容易

添加jQuery并将此插件源添加到DOM中。例如:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"/>
<script type="text/javascript" src="https://raw.github.com/bdewong/jQuery-AddThis/master/jquery.addthis.js"/>
你打电话的地方:

invokeAddThis(".addthis");
祝贺你!您现在可以连接到现有JS API的世界中:)

static native void invokeAddThis(String id) /*-{
    $wnd.jQuery(id).addthis();
}-*/;

static native void invokeAddthis(String id, String username) /*-{
    $wnd.jQuery(id).addthis(username);
}-*/;
invokeAddThis(".addthis");