Skip to content

Instantly share code, notes, and snippets.

@UberNick
Created October 21, 2013 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save UberNick/7082183 to your computer and use it in GitHub Desktop.
Save UberNick/7082183 to your computer and use it in GitHub Desktop.
<%@include file="/libs/foundation/global.jsp"%>
<%@page session="false" %>
<!-- sling:include path="<%= componentContext.getResource().getPath() + ".ajax.html" %>" -->
<script type="text/javascript">
(function($){
var Bestsellerloader = {
queryUrl : "",
init:function(queryUrl){
this.queryUrl = queryUrl;
this.load();
},
load:function(){
$.get(this.queryUrl, function(data){
$(".bestsellerloader").append(data);
});
}
}
$(document).ready(function(){
Bestsellerloader.init("<%= componentContext.getResource().getPath() + ".ajax.html" %>");
});
})($CQ);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment