I am still having trouble getting gwt and Jquery to work well with
each other. I have a javascript I am trying to call natively:

public static native void callSomeJavaScript(){
  divs = $wnd.$("div");
  console.log(divs);
}

Now in FireBug divs it shows up as a Jquery Object.
Outside of GWT it shows up as a list of elements (essentially).

Where I get problems is when trying to call certain functions such as
divs.hasClass("foo");
in GWT it complains that this function does not exist.

The other problem is this code is actually in another file and is
going to be used by other non GWT pages:
public static native void callSomeJavaScript(){
  div = $wnd.$("div#bar");
  foo = new $wnd.FooClass($wnd.$("div.foo"), {text: div.clone().find
('.duplicate').empty().end().html()});
}
and in FooClass:
window.FooClass = function(node,options){
  function initialize(node) {
    a = $(node).eq(0);
    a.hasClass("foo-class");
  }
 initialize();
}

It breaks on a.hasClass

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to