Skip to content

Instantly share code, notes, and snippets.

@hexx
Created June 21, 2012 10:51
Show Gist options
  • Save hexx/2965103 to your computer and use it in GitHub Desktop.
Save hexx/2965103 to your computer and use it in GitHub Desktop.
jQuery Sample in JSX
import "js.jsx";
native class jQuery {
function click(: function(): void) : void;
}
class _Main {
static function main() : void {
var jq = js.global["$"] as function (: string) : jQuery;
var alert = js.global["alert"] as function (: string) : void;
jq("#jsx").click(function (): void {
alert("Hello JSX!");
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment