-
-
Save skw/5356595 to your computer and use it in GitHub Desktop.
Updated Ender/script.js async js asset loading 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> | |
$script('/js/core.min.js', 'core') | |
$script.ready('core', function () { | |
$(document).ready(function () { | |
$('<p>hello world</p>').appendTo('body') | |
.bind('click', function (e) { | |
$script('/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment