/** * Binds a set of handlers to a particular Event for each matched element. * * The event handlers are passed as Functions that you can use to prevent default behavior. To * stop both default action and event bubbling, the function event handler has to return false. * * You can pass an additional Object data to your Function as the second parameter * */ public GQuery bind(String eventType, final Object data, final Function... funcs) { return as(Events).bind(eventType, data, funcs); }
/** * Fade in all matched elements by adjusting their opacity. */ public GQuery fadeIn(int millisecs, Function... f) { return as(Effects).fadeIn(millisecs, f); }
/** * Fade the opacity of all matched elements to a specified opacity and firing * an optional callback after completion. Only the opacity is adjusted for * this animation, meaning that all of the matched elements should already * have some form of height and width associated with them. */ public GQuery fadeTo(double opacity, Function... f) { return as(Effects).fadeTo(opacity, f); }
/** * Fade out all matched elements by adjusting their opacity. The effect will take 1000 * milliseconds to complete */ public GQuery fadeOut(Function... f) { return as(Effects).fadeOut(f); }
/** * Attach a handler for this event to all elements which match the current selector, now and in * the future. * @deprecated use {@link #on(String, Function...)} */ public GQuery live(int eventbits, Function... funcs) { return as(Events).live(eventbits, null, funcs); }
/** * Hide all matched elements by adjusting their height and firing an optional callback after * completion. */ public Effects slideUp(int millisecs, Function... f) { return as(Effects).slideUp(millisecs, f); }
/** * Binds a set of handlers to a particular Event for each matched element. * * The event handlers are passed as Functions that you can use to prevent default behavior. To * stop both default action and event bubbling, the function event handler has to return false. * */ public GQuery bind(int eventbits, final Function... funcs) { return as(Events).bind(eventbits, null, funcs); }
/** * Fade in all matched elements by adjusting their opacity. The effect will take 1000 milliseconds * to complete */ public GQuery fadeIn(Function... f) { return as(Effects).fadeIn(f); }
/** * Returns a dynamically generated Promise that is resolved once all actions * in the named queue have ended. */ public Promise promise(String name) { return as(Queue).promise(name); }
/** * Reveal all matched elements by adjusting their height and firing an optional callback after * completion. */ public Effects slideDown(Function... f) { return as(Effects).slideDown(f); }
/** * Trigger a event in all matched elements. * * @param eventName An string representing the type of the event desired * @param datas Additional parameters to pass along to the event handlers. */ public GQuery trigger(String eventName, Object... datas) { return as(Events).triggerHtmlEvent(eventName, datas); }
public GQAnimation setElement(Element element) { e = element; g = $(e).as(Effects); return this; }
/** * Attach a handler for this event to all elements which match the current selector, now and in * the future. * @deprecated use {@link #on(String, Object, Function...)} */ public GQuery live(int eventbits, Object data, Function... funcs) { return as(Events).live(eventbits, data, funcs); }
/** * Reveal all matched elements by adjusting their height and firing an optional callback after * completion. */ public Effects slideDown(int millisecs, Function... f) { return as(Effects).slideDown(millisecs, f); }
/** * Toggle the visibility of all matched elements by adjusting their height and firing an optional * callback after completion. Only the height is adjusted for this animation, causing all matched * elements to be hidden or shown in a "sliding" manner */ public Effects slideToggle(Function... f) { return as(Effects).slideToggle(f); }
/** * Bind Handlers or fire Events for each matched element. */ private GQuery bindOrFire(String eventname, final Object data, final Function... funcs) { if (funcs.length == 0) { return as(Events).triggerHtmlEvent(eventname); } else { return bind(eventname, data, funcs); } }
@Override protected void onUnload() { super.onUnload(); $(getElement()).as(Chosen).destroy(); }
@Override protected void onUnload() { super.onUnload(); $(getElement()).as(Chosen).destroy(); }
@Override protected void onLoad() { super.onLoad(); $(getElement()).as(Chosen).chosen(options, ensureChosenHandlers()); setVisible(visible); }
@Override protected void onLoad() { super.onLoad(); $(getElement()).as(Chosen).chosen(options, ensureChosenHandlers()); setVisible(visible); }