I have this JSNI code that I want to basically migrate to use plain Java, i.e usign GwtQuery:
public static native void handleModalEvent(Element el)/*-{
$wnd.$(el).on({
'show.uk.modal': function(){
$wnd.$("#new-placeholder").prepend($wnd.$(".g-r"));
},
'hide.uk.modal': function(){
$wnd.$("#old-placeholder").prepend($wnd.$(".g-r"));
}
});
}-*/;
However I have tried to use the GwtQuery on() method. It would not work at all. However this JSNI code works really well. Can anyone suggest the best GWT/GwtQuery based call for this method?
I think gwtquery doesn't accept '.' In the name space. Try "show.uk_modal" and "hide.uk_modal" it should work.