Created
June 29, 2011 04:09
-
-
Save ded/1053078 to your computer and use it in GitHub Desktop.
ender CLI example
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
<script src="ender.min.js"></script> | |
<script> | |
$.require('/js/core.min.js', 'core') | |
$.ready('core', function () { | |
$(document).ready(function () { | |
$('<p>hello world</p>').appendTo('body') | |
.bind('click', function (e) { | |
$.require('/js/ajax.min.js', function () { | |
$(e.target).css('position', 'relative') | |
.animate({ | |
left: 500 | |
}) | |
}) | |
}) | |
}) | |
}) | |
</script> |
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
$ ender build scriptjs | |
$ ender build domready qwery klass bean bonzo -o core | |
$ ender build morpheus reqwest -o ajax |
yep. you got it. I would just change point 1 to say page enter
and not page load
.
Thanks, I've updated my comment to be more correct for future reader
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As far as I understood sequence is:
Am I correct that ajax.min.js is loaded only after click, and not on page load?