0

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?

quarks
  • 33,478
  • 73
  • 290
  • 513
  • 1
    If this works fine in jQuery, please open an issue on https://github.com/ArcBees/gwtquery. It might be possible that gwtQuery strips off the namespace from the event. – spg Feb 20 '15 at 16:04

1 Answers1

1

I think gwtquery doesn't accept '.' In the name space. Try "show.uk_modal" and "hide.uk_modal" it should work.

jdramaix
  • 1,104
  • 6
  • 9