Skip to content

Instantly share code, notes, and snippets.

@zenorocha
Last active December 12, 2015 07:49
Show Gist options
  • Save zenorocha/4739761 to your computer and use it in GitHub Desktop.
Save zenorocha/4739761 to your computer and use it in GitHub Desktop.
AUI().use('aui-node', 'aui-io-request', function(A) {
A.one('#myButton').on('click', function() {
loadAnotherContent();
});
function loadAnotherContent() {
A.io.request('http://alloyui.com/io/data/content.html', {
on: {
success: function() {
var data = this.get('responseData');
A.one('#ajaxContainer').html(data); // This will evaluate data HTML, script, CSS, ...
}
}
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment