How do I implement a Plugin/Extension?
I want to implement the jQuery GUID Helper plugin into my web app but I don't know what's the "best practice" method of incorporating it into my code.
I'm basically creating a cart system from scratch (figured it was a sufficiently complicated system to use when learning jQuery). When the visitor first adds an item to their cart is when I wanted to create the GUID for the visitor. I have a cart-handler.js script that I link to from the item view page:
- <script type="text/javascript" src="/js/cart-handler.js"></script>
That script's first line is my $(document).ready(function(){ and the script handles AJAX calls to loading the data into cart record in my MySQL database, updates the cart total on the items page, and changes the button from "Add Item" to "Update Quantity".
So would I need to link to the jquery.Guid.js script right from the view items file for my item view page? Or can I reference the plugin from the cart-handler.js file?