Created
May 25, 2014 01:09
-
-
Save theRemix/3b9bcff991e99de2a70d to your computer and use it in GitHub Desktop.
Test for js.JQuery.hx update
This file contains 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
-main Test.hx | |
-js haxe.js |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Test JQuery on</title> | |
<script src="http://code.jquery.com/jquery-2.1.1.min.js"></script> | |
<script src="haxe.js"></script> | |
</head> | |
<body> | |
<button class="added_after_domready">Test</button> | |
</body> | |
</html> |
This file contains 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.Lib; | |
import js.JQuery; | |
import js.JQuery.JqEvent; | |
class Test | |
{ | |
public function new() | |
{ | |
new JQuery('body').on('click', 'button.added_after_domready', click_button); | |
} | |
private function click_button(e:JqEvent):Void | |
{ | |
Lib.alert("clicked"); | |
} | |
static public function main() | |
{ | |
new JQuery('document').ready(function(e:JqEvent){ | |
var app = new Test(); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment