Skip to content

Instantly share code, notes, and snippets.

@mattmccray
Created November 17, 2012 04:15
Show Gist options
  • Select an option

  • Save mattmccray/4093239 to your computer and use it in GitHub Desktop.

Select an option

Save mattmccray/4093239 to your computer and use it in GitHub Desktop.
Stupid Haxe Tricks
package j;
import jQuery.JQuery;
// Usage:
// j.Q.uery('div');
class Q {
public static inline function uery(selector:Dynamic, ?context:Dynamic): JQuery {
// This will prevent unnecessary `new` keywords in the javascript output.
return (untyped __js__("jQuery"))(selector, context);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment