diff --git a/.gitignore b/.gitignore index 9b51e99..c44c7a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,13 @@ +builder build +<<<<<<< HEAD +www +site +======= site www builder +>>>>>>> dev jquerytools.github.com # patch diff --git a/README.md b/README.md index 9f28814..97d3143 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ [jQuery Tools](http://flowplayer.org/tools/) - The Missing UI library for the Web ================================ -jQuery Tools is a collection of the most important user-interface components for modern websites. Used by large sites all over the world. \ No newline at end of file +jQuery Tools is a collection of the most important user-interface components for modern websites diff --git a/src/accordion/accordion.js b/src/accordion/accordion.js new file mode 100644 index 0000000..c34d376 --- /dev/null +++ b/src/accordion/accordion.js @@ -0,0 +1,115 @@ + +/* ACCORDION */ +(function($) { + + var CONF = { + easing: 'swing', + event: 'click', // mouseenter + initialIndex: -1, + small: 0, + large: 300, + panes: null, + speed: 400, + sticky: false, + vertical: false + }; + + function Tool(root, conf) { + + var panes = root.children(conf.panes), + currentIndex = conf.initialIndex, + self = this, + totalSize, + vertical, + prop, + size; + + $.extend(self, { + + select: function(index, evt) { + + // calculate dimensions + if (!size) { + vertical = conf.vertical || root.height() > root.width(); + prop = vertical ? 'height' : 'width'; + size = panes.eq(0)[prop](); + totalSize = size * panes.length; + } + + var large = conf.large, + small = conf.small || (totalSize - large) / (panes.length - 1); + + // same element clicked + if (index === currentIndex && self.isOpened()) { + large = small = size; + } + + var sizes = $.map(panes, function(el) { + return $(el)[prop](); + }); + + $("").stop().animate({step: 1}, { + duration: conf.speed, + easing: conf.easing, + + step: function(step) { + var large = totalSize; + panes.each(function(i) { + if (i !== index) { + var value = sizes[i] + Math.round(step * (small - sizes[i])); + if (value < 0) { value = 0; } + $(this)[prop](value); + large -= value; + } + }); + panes.eq(index)[prop](large); + } + }); + + currentIndex = index; + }, + + getPanes: function() { + return panes; + }, + + getCurrentPane: function() { + return panes.eq(index); + }, + + getIndex: function() { + return index; + }, + + isOpened: function() { + return panes.eq(currentIndex)[prop]() > size; + }, + + next: function() { + return self.select(index + 1); + }, + + prev: function() { + return self.select(index - 1); + } + + }); + + panes.bind(conf.event, function(e) { + self.select($(this).index(), e); + }); + + if (!conf.sticky) { + root.bind("mouseleave", function(e) { + if (self.isOpened()) { + self.select(currentIndex); + } + }); + } + } + + $.fn.accordion = function(conf) { + return $.tools.create(this, "accordion", Tool, CONF, conf, "Select"); + }; + +})(jQuery); diff --git a/src/core.js b/src/core.js new file mode 100644 index 0000000..714a4c3 --- /dev/null +++ b/src/core.js @@ -0,0 +1,71 @@ +(function($) { + + $.tools = { + version: '@VERSION', + + create: function(elem, name, fn, globals, conf, events, isInput) { + + var api = elem.data(name); + + if (api) { + api.destroy(); + + } else { + // configuration + if (!globals.conf) { globals = { conf: globals }; } + $.tools[name] = globals; + conf = $.extend(true, {}, globals.conf, conf); + + // :overlay, :date + $.expr[':'][name] = $.expr[':'][name] || function(el) { + return !!$(el).data(name); + }; + } + + var ret; + + elem.each(function() { + + api = new fn($(this), conf); + + $.extend(api, { + getConf: function() { + return conf; + } + }); + + // events + $.each(events.split(","), function(i, name) { + + if (name != 'change') { name = "on" + name; } + + // configuration + if ($.isFunction(conf[name])) { + $(api).bind(name, conf[name]); + } + + // API + api[name] = function(fn) { + if (fn) { $(api).bind(name, fn); } + return api; + }; + }); + + $(this).data(name, api).data("api", api); + + if (isInput) { + var input = api.getInput().data(name, api).data("api", api); + ret = ret ? ret.add(input) : input; + } + }); + + return ret ? ret : elem; + } + }; + + // jQuery.tool(":overlay").load(); + $.tool = function(query) { + return $(query).data("api"); + }; + +})(jQuery); diff --git a/src/dateinput/dateinput.js b/src/dateinput/dateinput.js index f6f89f4..fc33a4c 100644 --- a/src/dateinput/dateinput.js +++ b/src/dateinput/dateinput.js @@ -10,22 +10,14 @@ * Date: @DATE */ (function($) { - - /* TODO: - preserve today highlighted - */ - - $.tools = $.tools || {version: '@VERSION'}; - var instances = [], - tool, - - // h=72, j=74, k=75, l=76, down=40, left=37, up=38, right=39 - KEYS = [75, 76, 38, 39, 74, 72, 40, 37], - LABELS = {}; - - tool = $.tools.dateinput = { - + $.expr[':'].date = function(el) { + var type = el.getAttribute("type"); + return type && type == 'date' || !!$(el).data("dateinput"); + }; + + // h=72, j=74, k=75, l=76, down=40, left=37, up=38, right=39 + var KEYS = [75, 76, 38, 39, 74, 72, 40, 37], LABELS = {}, instances = [], GLOBAL = { conf: { format: 'mm/dd/yy', selectors: false, @@ -74,11 +66,10 @@ labels[key] = val.split(","); }); LABELS[language] = labels; - } - + } }; - tool.localize("en", { + GLOBAL.localize("en", { months: 'January,February,March,April,May,June,July,August,September,October,November,December', shortMonths: 'Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec', days: 'Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday', @@ -171,7 +162,7 @@ //}}} - function Dateinput(input, conf) { + function Tool(input, conf) { // variables var self = this, @@ -661,10 +652,6 @@ return self; }, - getConf: function() { - return conf; - }, - getInput: function() { return input; }, @@ -682,21 +669,6 @@ } }); - - // callbacks - $.each(['onBeforeShow','onShow','change','onHide'], function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API methods - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); if (!conf.editable) { @@ -722,39 +694,24 @@ select(value, conf); } + instances.push(self); + } - $.expr[':'].date = function(el) { - var type = el.getAttribute("type"); - return type && type == 'date' || !!$(el).data("dateinput"); - }; - - $.fn.dateinput = function(conf) { - - // already instantiated - if (this.data("dateinput")) { return this; } - - // configuration - conf = $.extend(true, {}, tool.conf, conf); + $.fn.dateinput = function(conf) { + conf = $.extend(true, {}, GLOBAL.conf, conf); + // CSS prefix $.each(conf.css, function(key, val) { if (!val && key != 'prefix') { conf.css[key] = (conf.css.prefix || '') + (val || key); } }); - - var els; - this.each(function() { - var el = new Dateinput($(this), conf); - instances.push(el); - var input = el.getInput().data("dateinput", el); - els = els ? els.add(input) : input; - }); - - return els ? els : this; + return $.tools.create(this, "dateinput", Tool, GLOBAL, conf, "BeforeShow,Show,change,onHide", true); + }; diff --git a/src/overlay/overlay.js b/src/overlay/overlay.js index 286faaf..8203fd4 100644 --- a/src/overlay/overlay.js +++ b/src/overlay/overlay.js @@ -12,9 +12,7 @@ (function($) { // static constructs - $.tools = $.tools || {version: '@VERSION'}; - - $.tools.overlay = { + var instances = [], effects = {}, GLOBAL = { addEffect: function(name, loadFn, closeFn) { effects[name] = [loadFn, closeFn]; @@ -38,19 +36,9 @@ target: null, // target element to be overlayed. by default taken from [rel] top: '10%' } - }; - + }; - var instances = [], effects = {}; - - // the default effect. nice and easy! - $.tools.overlay.addEffect('default', - - /* - onLoad/onClose functions must be called otherwise none of the - user supplied callback methods won't be called - */ - function(pos, onLoad) { + GLOBAL.addEffect('default', function(pos, onLoad) { var conf = this.getConf(), w = $(window); @@ -65,11 +53,11 @@ }, function(onClose) { this.getOverlay().fadeOut(this.getConf().closeSpeed, onClose); - } + } ); - function Overlay(trigger, conf) { + function Tool(trigger, conf) { // private variables var self = this, @@ -180,7 +168,6 @@ } }); } - return self; }, @@ -226,29 +213,10 @@ isOpened: function() { return opened; - }, - - // manipulate start, finish and speeds - getConf: function() { - return conf; } }); - - // callbacks - $.each("onBeforeLoad,onStart,onLoad,onBeforeClose,onClose".split(","), function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); + // close button closers = overlay.find(conf.close || ".close"); @@ -265,28 +233,17 @@ // autoload if (conf.load) { self.load(); } + instances.push(self); } // jQuery plugin initialization $.fn.overlay = function(conf) { - - // already constructed --> return API - var el = this.data("overlay"); - if (el) { return el; } - + if ($.isFunction(conf)) { conf = {onBeforeLoad: conf}; } - - conf = $.extend(true, {}, $.tools.overlay.conf, conf); - - this.each(function() { - el = new Overlay($(this), conf); - instances.push(el); - $(this).data("overlay", el); - }); - return conf.api ? el: this; + return $.tools.create(this, "overlay", Tool, GLOBAL, conf, "BeforeLoad,Start,Load,BeforeClose,Close"); }; })(jQuery); diff --git a/src/rangeinput/rangeinput.js b/src/rangeinput/rangeinput.js index 7164e72..ec0e764 100644 --- a/src/rangeinput/rangeinput.js +++ b/src/rangeinput/rangeinput.js @@ -10,36 +10,35 @@ * Date: @DATE */ (function($) { - - $.tools = $.tools || {version: '@VERSION'}; - - var tool; - - tool = $.tools.rangeinput = { - - conf: { - min: 0, - max: 100, // as defined in the standard - step: 'any', // granularity of the value. a non-zero float or int (or "any") - steps: 0, - value: 0, - precision: undefined, - vertical: 0, - keyboard: true, - progress: false, - speed: 100, - - // set to null if not needed - css: { - input: 'range', - slider: 'slider', - progress: 'progress', - handle: 'handle' - } + $.expr[':'].range = function(el) { + var type = el.getAttribute("type"); + return type && type == 'range' || !!$(el).filter("input").data("rangeinput"); + }; + + var CONF = { + + min: 0, + max: 100, // as defined in the standard + step: 'any', // granularity of the value. a non-zero float or int (or "any") + steps: 0, + value: 0, + precision: undefined, + vertical: 0, + keyboard: true, + progress: false, + speed: 100, + + // set to null if not needed + css: { + input: 'range', + slider: 'slider', + progress: 'progress', + handle: 'handle' } }; + //{{{ fn.drag /* @@ -136,7 +135,7 @@ return e && e.onSlide; } - function RangeInput(input, conf) { + function Tool(input, conf) { // private variables var self = this, @@ -292,10 +291,6 @@ return slide(e || $.Event("api"), undefined, val, true); }, - getConf: function() { - return conf; - }, - getProgress: function() { return progress; }, @@ -325,21 +320,6 @@ } }); - - // callbacks - $.each("onSlide,change".split(","), function(i, name) { - - // from configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API methods - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); // dragging @@ -439,32 +419,11 @@ if (!len) { $(window).load(begin); } - } - - $.expr[':'].range = function(el) { - var type = el.getAttribute("type"); - return type && type == 'range' || !!$(el).filter("input").data("rangeinput"); - }; - + } // jQuery plugin implementation - $.fn.rangeinput = function(conf) { - - // already installed - if (this.data("rangeinput")) { return this; } - - // extend configuration with globals - conf = $.extend(true, {}, tool.conf, conf); - - var els; - - this.each(function() { - var el = new RangeInput($(this), $.extend(true, {}, conf)); - var input = el.getInput().data("rangeinput", el); - els = els ? els.add(input) : input; - }); - - return els ? els : this; + $.fn.rangeinput = function(conf) { + return $.tools.create(this, "rangeinput", Tool, CONF, conf, "Slide,change", true); }; diff --git a/src/scrollable/scrollable.autoscroll.js b/src/scrollable/scrollable.autoscroll.js index 0a2ac05..389de33 100644 --- a/src/scrollable/scrollable.autoscroll.js +++ b/src/scrollable/scrollable.autoscroll.js @@ -31,7 +31,7 @@ var opts = $.extend({}, t.autoscroll.conf, conf), ret; - this.each(function() { + return this.each(function() { var api = $(this).data("scrollable"); if (api) { ret = api; } @@ -72,10 +72,7 @@ api.play(); } - }); - - return opts.api ? ret : this; - + }); }; })(jQuery); diff --git a/src/scrollable/scrollable.js b/src/scrollable/scrollable.js index 11f9ff8..be70612 100644 --- a/src/scrollable/scrollable.js +++ b/src/scrollable/scrollable.js @@ -11,29 +11,23 @@ */ (function($) { - // static constructs - $.tools = $.tools || {version: '@VERSION'}; - - $.tools.scrollable = { - - conf: { - activeClass: 'active', - circular: false, - clonedClass: 'cloned', - disabledClass: 'disabled', - easing: 'swing', - initialIndex: 0, - item: null, - items: '.items', - keyboard: true, - mousewheel: false, - next: '.next', - prev: '.prev', - speed: 400, - vertical: false, - touch: true, - wheelSpeed: 0 - } + var CONF = { + activeClass: 'active', + circular: false, + clonedClass: 'cloned', + disabledClass: 'disabled', + easing: 'swing', + initialIndex: 0, + item: null, + items: '.items', + keyboard: true, + mousewheel: false, + next: '.next', + prev: '.prev', + speed: 400, + vertical: false, + touch: true, + wheelSpeed: 0 }; // get hidden element's width or height even though it's hidden @@ -52,7 +46,7 @@ var current; // constructor - function Scrollable(root, conf) { + function Tool(root, conf) { // current instance var self = this, @@ -65,11 +59,7 @@ if (itemWrap.length > 1) { itemWrap = $(conf.items, root); } // methods - $.extend(self, { - - getConf: function() { - return conf; - }, + $.extend(self, { getIndex: function() { return index; @@ -179,20 +169,7 @@ } }); - - // callbacks - $.each(['onBeforeSeek', 'onSeek', 'onAddItem'], function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); + // circular loop if (conf.circular) { @@ -202,8 +179,7 @@ cloned1.add(cloned2).addClass(conf.clonedClass); - self.onBeforeSeek(function(e, i, time) { - + root.bind("onBeforeSeek", function(e, i, time) { if (e.isDefaultPrevented()) { return; } @@ -234,7 +210,10 @@ next = find(root, conf.next).click(function() { self.next(); }); if (!conf.circular) { + + // perform last from the events self.onBeforeSeek(function(e, i) { + setTimeout(function() { if (!e.isDefaultPrevented()) { prev.toggleClass(conf.disabledClass, i <= 0); @@ -322,20 +301,7 @@ // jQuery plugin implementation $.fn.scrollable = function(conf) { - - // already constructed --> return API - var el = this.data("scrollable"); - if (el) { return el; } - - conf = $.extend({}, $.tools.scrollable.conf, conf); - - this.each(function() { - el = new Scrollable($(this), conf); - $(this).data("scrollable", el); - }); - - return conf.api ? el: this; - + return $.tools.create(this, "scrollable", Tool, CONF, conf, "BeforeSeek,Seek,AddItem"); }; diff --git a/src/scrollable/scrollable.navigator.js b/src/scrollable/scrollable.navigator.js index 5aa2a96..dac69fd 100644 --- a/src/scrollable/scrollable.navigator.js +++ b/src/scrollable/scrollable.navigator.js @@ -39,9 +39,7 @@ if (typeof conf == 'string') { conf = {navi: conf}; } conf = $.extend({}, t.navigator.conf, conf); - var ret; - - this.each(function() { + return this.each(function() { var api = $(this).data("scrollable"), navi = conf.navi.jquery ? conf.navi : find(api.getRoot(), conf.navi), @@ -132,8 +130,6 @@ }); - return conf.api ? ret : this; - }; })(jQuery); diff --git a/src/tabs/tabs.js b/src/tabs/tabs.js index 6e0f433..2b8461c 100644 --- a/src/tabs/tabs.js +++ b/src/tabs/tabs.js @@ -11,10 +11,7 @@ */ (function($) { - // static constructs - $.tools = $.tools || {version: '@VERSION'}; - - $.tools.tabs = { + var GLOBALS = { conf: { tabs: 'a', @@ -25,8 +22,6 @@ initialIndex: 0, event: 'click', rotate: false, - - // 1.2 history: false }, @@ -38,17 +33,12 @@ var effects = { - // simple "toggle" effect + // toggle 'default': function(i, done) { this.getPanes().hide().eq(i).show(); done.call(); }, - - /* - configuration: - - fadeOutSpeed (positive value does "crossfading") - - fadeInSpeed - */ + fade: function(i, done) { var conf = this.getConf(), @@ -63,50 +53,19 @@ panes.eq(i).fadeIn(conf.fadeInSpeed, done); }, - - // for basic accordions - slide: function(i, done) { - this.getPanes().slideUp(200); - this.getPanes().eq(i).slideDown(400, done); - }, - /** - * AJAX effect - */ ajax: function(i, done) { this.getPanes().eq(0).load(this.getTabs().eq(i).attr("href"), done); } }; - - var w; - - /** - * Horizontal accordion - * - * @deprecated will be replaced with a more robust implementation - */ - $.tools.tabs.addEffect("horizontal", function(i, done) { - - // store original width of a pane into memory - if (!w) { w = this.getPanes().eq(0).width(); } - - // set current pane's width to zero - this.getCurrentPane().animate({width: 0}, function() { $(this).hide(); }); - - // grow opened pane to it's original width - this.getPanes().eq(i).animate({width: w}, function() { - $(this).show(); - done.call(); - }); - - }); - function Tabs(root, paneSelector, conf) { + function Tabs(root, conf) { var self = this, trigger = root.add(this), tabs = root.find(conf.tabs), + paneSelector = conf.select, panes = paneSelector.jquery ? paneSelector : root.children(paneSelector), current; @@ -118,7 +77,7 @@ // public methods - $.extend(this, { + $.extend(this, { click: function(i, e) { var tab = tabs.eq(i); @@ -164,10 +123,6 @@ return self; }, - - getConf: function() { - return conf; - }, getTabs: function() { return tabs; @@ -205,21 +160,6 @@ }); - // callbacks - $.each("onBeforeClick,onClick".split(","), function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); - if (conf.history && $.fn.history) { $.tools.history.init(tabs); @@ -247,35 +187,22 @@ if (conf.initialIndex === 0 || conf.initialIndex > 0) { self.click(conf.initialIndex); } - } - + } } // jQuery plugin implementation $.fn.tabs = function(paneSelector, conf) { - - // return existing instance - var el = this.data("tabs"); - if (el) { - el.destroy(); - this.removeData("tabs"); - } + conf = conf || {}; + if ($.isFunction(conf)) { conf = {onBeforeClick: conf}; } - // setup conf - conf = $.extend({}, $.tools.tabs.conf, conf); - - - this.each(function() { - el = new Tabs($(this), paneSelector, conf); - $(this).data("tabs", el); - }); - - return conf.api ? el: this; + conf.select = paneSelector; + + return $.tools.create(this, "tabs", Tabs, GLOBALS, conf, "BeforeClick,Click"); }; }) (jQuery); diff --git a/src/tabs/tabs.slideshow.js b/src/tabs/tabs.slideshow.js index 8f1abe0..e958a1a 100644 --- a/src/tabs/tabs.slideshow.js +++ b/src/tabs/tabs.slideshow.js @@ -11,23 +11,17 @@ */ (function($) { - var tool; - - tool = $.tools.tabs.slideshow = { - - conf: { - next: '.forward', - prev: '.backward', - disabledClass: 'disabled', - autoplay: false, - autopause: true, - interval: 3000, - clickable: true, - api: false - } + var CONF = { + next: '.forward', + prev: '.backward', + disabledClass: 'disabled', + autoplay: false, + autopause: true, + interval: 3000, + clickable: true }; - function Slideshow(root, conf) { + function Tool(root, conf) { var self = this, fire = root.add(this), @@ -58,10 +52,6 @@ getTabs: function() { return tabs; }, - - getConf: function() { - return conf; - }, play: function() { @@ -109,20 +99,6 @@ }); - // callbacks - $.each("onBeforePlay,onPlay,onBeforePause,onPause".split(","), function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API methods - self[name] = function(fn) { - return $(self).bind(name, fn); - }; - }); - /* when mouse enters, slideshow stops */ if (conf.autopause) { @@ -160,18 +136,8 @@ // jQuery plugin implementation $.fn.slideshow = function(conf) { - // return existing instance - var el = this.data("slideshow"); - if (el) { return el; } - - conf = $.extend({}, tool.conf, conf); - - this.each(function() { - el = new Slideshow($(this), conf); - $(this).data("slideshow", el); - }); - - return conf.api ? el : this; + return $.tools.create(this, "slideshow", Tool, CONF, conf, "BeforePlay,Play,BeforePause,Pause"); + }; })(jQuery); diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index e1845cc..d0d34ca 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -9,11 +9,9 @@ * Since: November 2008 * Date: @DATE */ -(function($) { - // static constructs - $.tools = $.tools || {version: '@VERSION'}; - - $.tools.tooltip = { +(function($) { + + var CONF = { conf: { @@ -111,7 +109,7 @@ - function Tooltip(trigger, conf) { + function Tool(trigger, conf) { var self = this, fire = trigger.add(self), @@ -283,10 +281,6 @@ return fully ? shown == 'full' : shown; }, - getConf: function() { - return conf; - }, - getTip: function() { return tip; }, @@ -295,47 +289,19 @@ return trigger; } - }); - - // callbacks - $.each("onHide,onBeforeShow,onShow,onBeforeHide".split(","), function(i, name) { - - // configuration - if ($.isFunction(conf[name])) { - $(self).bind(name, conf[name]); - } - - // API - self[name] = function(fn) { - if (fn) { $(self).bind(name, fn); } - return self; - }; - }); - + }); } // jQuery plugin implementation - $.fn.tooltip = function(conf) { - - // return existing instance - var api = this.data("tooltip"); - if (api) { return api; } - - conf = $.extend(true, {}, $.tools.tooltip.conf, conf); - + $.fn.tooltip = function(conf) { + // position can also be given as string - if (typeof conf.position == 'string') { + if (conf && typeof conf.position == 'string') { conf.position = conf.position.split(/,?\s/); } - - // install tooltip for each entry in jQuery object - this.each(function() { - api = new Tooltip($(this), conf); - $(this).data("tooltip", api); - }); - - return conf.api ? api: this; + + return $.tools.create(this, "tooltip", Tool, CONF, conf, "Hide,BeforeShow,Show,BeforeHide"); }; }) (jQuery); diff --git a/test/accordion/accordion.html b/test/accordion/accordion.html new file mode 100644 index 0000000..d5acf8b --- /dev/null +++ b/test/accordion/accordion.html @@ -0,0 +1,42 @@ + + + + + + + +
+ show +
+ + + + + + + diff --git a/test/overlay/index.htm b/test/overlay/index.htm index e6af309..8d2b33e 100644 --- a/test/overlay/index.htm +++ b/test/overlay/index.htm @@ -1,5 +1,6 @@ + diff --git a/test/overlay/style.css b/test/overlay/style.css index be1e470..a3c9777 100644 --- a/test/overlay/style.css +++ b/test/overlay/style.css @@ -1,12 +1,12 @@ /* automatically absolutely positioned */ -div.overlay { - width:400px; +.overlay { + width:600px; display:none; color:#fff; padding:10px; } -div.overlay a.close { +.overlay .close { background-image:url(img/close.png); position:absolute; right:5px; @@ -23,7 +23,9 @@ div.overlay a.close { } #overlay2 { - background-image:url(img/overlay.png) + background-image:url(img/overlay.png); + width:300px; + z-index:10010; } #img { diff --git a/test/rangeinput/multiple.htm b/test/rangeinput/multiple.htm index 8d4d4a7..3aa64d2 100644 --- a/test/rangeinput/multiple.htm +++ b/test/rangeinput/multiple.htm @@ -1,5 +1,6 @@ + diff --git a/test/scrollable/single.html b/test/scrollable/single.html index cfcb7e4..a2bceaf 100644 --- a/test/scrollable/single.html +++ b/test/scrollable/single.html @@ -1,5 +1,6 @@ + @@ -11,7 +12,9 @@ + diff --git a/test/tabs/slideshow.htm b/test/tabs/slideshow.htm index a149b5c..eed27c7 100644 --- a/test/tabs/slideshow.htm +++ b/test/tabs/slideshow.htm @@ -1,5 +1,6 @@ + diff --git a/test/tooltip/index.html b/test/tooltip/index.html index 0becd5a..3862e51 100644 --- a/test/tooltip/index.html +++ b/test/tooltip/index.html @@ -1,5 +1,6 @@ +