资 源 简 介
$.plugin is a jQuery Plugin that allows you to better manage the different plugins you use in your website or web application.
This is especially useful if you use a number of plugins each with its own .js and .css files. It is even more useful if not all plugins are needed for each page.
Performance Improvements
Users will only download scripts and styles that are required (accoding to selectors you specify)
Page Caching - Scripts and styles are only downloaded once
Session Caching - Scripts and styles are stored in browser"s sessionStorage to reduce http requests (Firefox 3 only, for now)
$.plugin itself is just 10KB uncompressed, 4KB minified, and 3KB compressed
Sample Code
Define your plugins
$.plugin("tabs",{ files: ["../styles/style.css", "../scripts/jq.tabs.pack.js"], selectors: [".nav-tabs"], callback : function