Regardless of the extensions you intend to use to extend your interface, the first question that comes to mind is How do I put Juice in to my interface?
This is a step by step guide of how to do that. To keep the guide simple, it stops at the point of having the Juice framework installed and shown to be operational. This the point at which all Juice implementation will then build from.
Before embarking on a Juice installation you need to answer two simple questions:
There are three steps to this:
jQuery(document).ready(function () {
juice.setDebug(true);
juice.debugOutln("Hello world");
});
Add the following three script tags to your application's page.
<script type="text/javascript" src="http://www.example.com/juice/jquery-1.3.2.js"></script> <script type="text/javascript" src="http://www.example.com/juice/juice.js"></script> <script type="text/javascript" src="http://www.example.com/juice/juice-myinterface.js"></script>
Obviously the URL's will differ from these examples to reflect the address of your web server and the location of the juice directory you created.
Where on the page - as discussed earlier, these calls can go anywhere in the html of the page. The ideal place is in the <head> element, Another good place, if your pages are constructed from several sections, is in a header or footer part that appears on every page. If you are concerned about performance, it is recommended that JavaScript includes should be placed at the end of a page so as not to delay the initial rendering of the page.
If your application behaves as it did before - you haven't.
Scroll down to the bottom of the page and you should see Hello world displayed at the bottom. If it is displayed, Juice is now working in your interface.
To hide the Hello world message either remove it or comment it out (insert // at the start of the 2nd line) in your file.
Building on this you can now start to add more extensions to your interface. As the Juice framework is controlled from the file you created, you should have no need to edit the pages of your application.