Created
June 21, 2012 10:51
-
-
Save hexx/2965103 to your computer and use it in GitHub Desktop.
jQuery Sample in JSX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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