Created
October 21, 2013 11:12
-
-
Save UberNick/7082183 to your computer and use it in GitHub Desktop.
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
<%@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