[tr][td]
图片:133937cczfc3bqe3cr09q3.jpg 源码下载 在线演示 CSS3+jQuery的一个丰富多彩时钟。 代码: (function($){ // A global object used by the functions of the plug-in: var gVars = {}; // Extending the jQuery core: $.fn.tzineClock = function(opts){ // "this" contains the elements that were selected when calling the plugin: $('elements').tzineClock(); // If the selector returned more than one element, we use the first one: var container = this.eq(0); if(!container) { try{ console.log("Invalid selector!"); } catch(e){} return false; } if(!opts) opts = {}; var defaults = { /* Additional options will be added in future versions of the plugin. */ }; /* Merging the provided options with the default ones (will be used in future versions of the plugin): */ $.each(defaults,function(k,v){ opts[k] = opts[k] || defaults[k]; }); // Calling the setUp function and passing the container, // will be available to the setUp function as "this": setUp.call(container); return this; } function setUp() { // The colors of the dials: var colors = ['orange','blue','green']; var tmp; for(var i=0;i |
|