The simplest way to get started with Juice is to add it to a user interface. So let's step through it here.
Firstly, you need a web page or web site that you can access the html code to edit. This doesn't necessarily mean that you need full editing capability. The minimum you need is the ability to add a small snippet of html in to the header or the body of the page.
Secondly, you need a web server where you can load the JavaScript code that Juice uses. In preference this would be the same server that serves your web site. If that is not possible you may use an alternative server, but it is recommended that such a server should have a performance profile at least as good as your main server so as not to impact on performance. Amazon S3 storage has proved to perform well in this regard.
example_extend.js file from the examples directory of the Juice installation in to the /js directory, giving it a name that is relevant to your installation such as extend_my_interface.js for instance.extend_my_interface.js file to uncomment some of the entries to, initially, just enable the ExtendedByJuice Extension. Thus: //example_extend.js
//Example localised Juice extention file
//Replace all references to {mySite} with url to where Juice is hosted for your site and uncomment lines.
jQuery(document).ready(function () {
juice.setDebug(false);
// juice.loadCss("http://{mySite}/js/juiceDefault.css");
// juice.loadJs("http://{mySite}/js/juiceOverlay-0.3.js");
// juice.loadCss("http://{mySite}/juiceOverlay.css");
juice.loadJs("/js/extensions/extendedbyJuice.js");
// juice.loadJs("http://{mySite}/js/extensions/GoogleAnalytics.js");
juice.onAllLoaded(runExtensions);
});
function runExtensions(){
new extendedbyJuice(juice);
// Replace UA-XXXXXXX-XX with your Google Analytics ID(s) - comma separated if there is more than one
// new gasJuice(juice,"UA-XXXXXXX-XX");
}
<script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="/js/juice.js"></script>
<script type="text/javascript" src="/js/extend_my_interface.js"></script>
Refresh your browser and you should see 'Extended by the Juice Project' appended to your page.
For more product specific examples check out the following: