Skip to content

Instantly share code, notes, and snippets.

@skw
Forked from ded/app.html
Last active December 16, 2015 01:39
Show Gist options
  • Save skw/5356595 to your computer and use it in GitHub Desktop.
Save skw/5356595 to your computer and use it in GitHub Desktop.
Updated Ender/script.js async js asset loading example.
<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>
$ 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