Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<%@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