From 9c1ca7e130cca39fc1cdde7070830ac1f7bd4bad Mon Sep 17 00:00:00 2001 From: Rob Garrison Date: Fri, 13 Jan 2012 08:06:43 -0600 Subject: [PATCH] remove name attribute from inputs --- js/jquery.movingboxes.js | 2 +- js/jquery.movingboxes.min.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/js/jquery.movingboxes.js b/js/jquery.movingboxes.js index cd027c1..3871dfb 100755 --- a/js/jquery.movingboxes.js +++ b/js/jquery.movingboxes.js @@ -133,7 +133,7 @@ base.$el.append( base.$panels.filter(':first').clone().addClass('cloned') ); base.$el.find('.cloned').each(function(){ // disable all focusable elements in cloned panels to prevent shifting the panels by tabbing - $(this).find('a,input,textarea,select,button,area').attr('disabled', 'disabled'); + $(this).find('a,input,textarea,select,button,area').removeAttr('name').attr('disabled', 'disabled'); $(this).find('[id]').andSelf().removeAttr('id'); }); } diff --git a/js/jquery.movingboxes.min.js b/js/jquery.movingboxes.min.js index 8783ed6..30f92c0 100755 --- a/js/jquery.movingboxes.min.js +++ b/js/jquery.movingboxes.min.js @@ -1,7 +1,7 @@ /* - * Moving Boxes v2.2.4 minified + * Moving Boxes v2.2.5 minified * by Chris Coyier * http://css-tricks.com/moving-boxes/ */ -(function(d){d.movingBoxes=function(g,i){var b,a=this;a.$el=d(g).addClass("mb-slider");a.el=g;a.$el.data("movingBoxes",a);a.init=function(){a.options=b=d.extend({},d.movingBoxes.defaultOptions,i);a.$el.wrap('
');a.$window=a.$el.parent();a.$wrap=a.$window.parent().prepend('').append('
'); a.$panels=a.$el.children().addClass("mb-panel");a.runTime=d(".mb-slider").index(a.$el)+1;a.regex=RegExp("slider"+a.runTime+"=(\\d+)","i");a.initialized=!1;a.currentlyMoving=!1;a.curPanel=b.initAnimation?1:b.hashTags?a.getHash()||b.startPanel:b.startPanel;a.width=b.width?parseInt(b.width,10):a.$el.width();a.pWidth=b.panelWidth?2>=b.panelWidth?b.panelWidth*a.width:b.panelWidth:a.$panels.eq(0).width();a.$left=a.$wrap.find(".mb-left").click(function(){a.goBack();return!1});a.$right=a.$wrap.find(".mb-right").click(function(){a.goForward(); return!1});a.update(!1);d(window).load(function(){a.update(!1);var c=b.hashTags?a.getHash()||b.startPanel:b.startPanel;setTimeout(function(){a.change(c,function(){a.initialized=!0;a.$el.trigger("initialized.movingBoxes",[a,c])},!1)},2*b.speed)});a.$el.delegate(".mb-panel","click",function(c){d(this).hasClass(b.currentPanel)||(c.preventDefault(),a.change(a.$panels.index(d(this))+a.adj))});a.$wrap.click(function(){a.active()});a.$panels.delegate("a","focus",function(){a.$panels.index(d(this).closest(".mb-panel"))+ a.adj!==a.curPanel&&a.change(a.$panels.index(d(this).closest(".mb-panel"))+a.adj,{},!1)});d(document).keyup(function(c){if(!c.target.tagName.match("TEXTAREA|INPUT|SELECT"))switch(c.which){case 39:case 32:a.$wrap.is(".mb-active-slider")&&a.goForward();break;case 37:a.$wrap.is(".mb-active-slider")&&a.goBack()}});d.each("initialized initChange beforeAnimation completed".split(" "),function(c,e){d.isFunction(b[e])&&a.$el.bind(e+".movingBoxes",b[e])})};a.update=function(c,e){a.$el.children(".cloned").remove(); a.$panels=a.$el.children();a.adj=b.wrap&&1')});a.totalPanels=a.$panels.filter(":not(.cloned)").length;a.curWidth=b.panelWidth?2>=b.panelWidth?b.panelWidth*a.width:b.panelWidth:a.pWidth;a.regWidth=a.curWidth*b.reducedSize;a.$panels.css({width:a.curWidth,fontSize:"1em"});a.$panels.eq(a.curPanel-a.adj).addClass(b.currentPanel);a.heights=a.$panels.map(function(a,c){return d(c).outerHeight(!0)}).get();a.returnToNormal(a.curPanel,0);a.growBigger(a.curPanel, 0,c);a.updateArrows(a.curPanel);a.$el.css({position:"absolute",width:(a.curWidth+100)*a.$panels.length+(a.width-a.curWidth)/2,height:Math.max.apply(this,a.heights)+10});a.$window.css({height:b.fixedHeight?Math.max.apply(this,a.heights):a.heights[a.curPanel-a.adj]});a.$panels.eq(0).css({"margin-left":(a.width-a.curWidth)/2});a.buildNav();a.change(a.curPanel,e,!1===c?!1:!0)};a.buildNav=function(){a.$nav&&a.$nav.remove();if(b.buildNav&&1
').appendTo(a.$wrap); var c,e="",h=d.isFunction(b.navFormatter),f=0>parseInt(a.$nav.find(".mb-testing").css("text-indent"),10);a.$panels.filter(":not(.cloned)").each(function(a){c=a+1;e+=' "):e+='">'+c+" "});a.$nav.html(e).find("a").bind("click",function(){a.change(d(this).index()+1);return!1})}};a.returnToNormal=function(c,e){var d=a.$panels.not(":eq("+(c-a.adj)+")").removeClass(b.currentPanel);1=== b.reducedSize?d.css({width:a.regWidth}):d.animate({width:a.regWidth,fontSize:b.reducedSize+"em"},0===e?0:b.speed)};a.growBigger=function(c,d,h){var f=a.$panels.eq(c-a.adj);1===b.reducedSize?(f.css({width:a.curWidth}),a.completed(c,h)):f.animate({width:a.curWidth,fontSize:"1em"},0===d?0:b.speed,function(){a.completed(c,h)})};a.completed=function(c,d){a.$panels.eq(c-a.adj).addClass(b.currentPanel);!1!==d&&a.$el.trigger("completed.movingBoxes",[a,c])};a.goForward=function(){a.initialized&&a.change(a.curPanel+ 1)};a.goBack=function(){a.initialized&&a.change(a.curPanel-1)};a.change=function(c,d,h){if(1>a.totalPanels)"function"===typeof d&&d(a);else{var f,g=!1,h=!1!==h,c=parseInt(c,10);a.initialized&&h&&(a.active(),a.$el.trigger("initChange.movingBoxes",[a,c]));if(b.wrap)if(c>a.totalPanels)g=!0,c=1,a.returnToNormal(0,0),a.growBigger(0,0,!1),f=a.$panels.eq(0).position().left-(a.width-a.curWidth)/2,a.$window.scrollLeft(f);else if(0===c)g=!1,c=a.totalPanels,a.growBigger(c+1,0,!1),f=a.$panels.eq(c+1).position().left- (a.width-a.curWidth)/2,a.$window.scrollLeft(f);ca.totalPanels-a.adj&&(c=b.wrap?1:a.totalPanels);if(!a.currentlyMoving||!a.initialized){a.currentlyMoving=!0;a.$curPanel=a.$panels.eq(c-a.adj);f=a.$curPanel.position().left-(a.width-a.curWidth)/2;if(c>a.curPanel||g)f-=a.curWidth-a.regWidth;f=b.fixedHeight?{scrollLeft:f}:{scrollLeft:f,height:a.heights[c-a.adj]};a.curPanel=c;a.initialized&&h&&a.$el.trigger("beforeAnimation.movingBoxes",[a,c]);a.$window.animate(f,{queue:!1, duration:b.speed,easing:b.easing,complete:function(){a.initialized&&a.$window.scrollTop(0);a.currentlyMoving=!1;"function"===typeof d&&d(a)}});a.returnToNormal(c);a.growBigger(c,1,h);a.updateArrows(c);b.hashTags&&a.initialized&&a.setHash(c)}b.buildNav&&a.$nav.length&&a.$nav.find("a").removeClass(b.currentPanel).eq(c-1).addClass(b.currentPanel)}};a.updateArrows=function(c){a.$left.toggleClass(b.disabled,!b.wrap&&c===a.adj);a.$right.toggleClass(b.disabled,!b.wrap&&(c===a.totalPanels||0===a.totalPanels))}; a.getHash=function(){var c=window.location.hash.match(a.regex);return null===c?"":parseInt(c[1],10)};a.setHash=function(c){var b="slider"+a.runTime+"=",d=window.location.hash;if("undefined"!==typeof d)window.location.hash=0
');a.$window=a.$el.parent();a.$wrap=a.$window.parent().prepend('').append('
'); a.$panels=a.$el.children().addClass("mb-panel");a.runTime=c(".mb-slider").index(a.$el)+1;a.regex=RegExp("slider"+a.runTime+"=(\\d+)","i");a.initialized=!1;a.currentlyMoving=!1;a.curPanel=b.initAnimation?1:b.hashTags?a.getHash()||b.startPanel:b.startPanel;a.width=b.width?parseInt(b.width,10):a.$el.width();a.pWidth=b.panelWidth?2>=b.panelWidth?b.panelWidth*a.width:b.panelWidth:a.$panels.eq(0).width();a.$left=a.$wrap.find(".mb-left").click(function(){a.goBack();return!1});a.$right=a.$wrap.find(".mb-right").click(function(){a.goForward(); return!1});a.update(!1);c(window).load(function(){a.update(!1)});a.$el.delegate(".mb-panel","click",function(d){c(this).hasClass(b.currentPanel)||(d.preventDefault(),a.change(a.$panels.index(c(this))+a.adj))});a.$wrap.click(function(){a.active()});a.$panels.delegate("a","focus",function(){a.$panels.index(c(this).closest(".mb-panel"))+a.adj!==a.curPanel&&a.change(a.$panels.index(c(this).closest(".mb-panel"))+a.adj,{},!1)});c(document).keyup(function(b){if(!b.target.tagName.match("TEXTAREA|INPUT|SELECT"))switch(b.which){case 39:case 32:a.$wrap.is(".mb-active-slider")&& a.goForward();break;case 37:a.$wrap.is(".mb-active-slider")&&a.goBack()}});c.each("initialized initChange beforeAnimation completed".split(" "),function(d,e){c.isFunction(b[e])&&a.$el.bind(e+".movingBoxes",b[e])});a.curPanel=b.hashTags?a.getHash()||b.startPanel:b.startPanel;setTimeout(function(){a.change(a.curPanel,function(){a.initialized=!0;a.$el.trigger("initialized.movingBoxes",[a,a.curPanel])},!1)},2*b.speed)};a.update=function(d,e){a.$el.children(".cloned").remove();a.$panels=a.$el.children(); a.adj=b.wrap&&1')});a.totalPanels=a.$panels.filter(":not(.cloned)").length;a.curWidth=b.panelWidth?2>=b.panelWidth?b.panelWidth*a.width:b.panelWidth:a.pWidth;a.regWidth=a.curWidth*b.reducedSize;a.$panels.css({width:a.curWidth,fontSize:"1em"});a.$panels.eq(a.curPanel-a.adj).addClass(b.currentPanel);a.heights=a.$panels.map(function(a,b){return c(b).outerHeight(!0)}).get();a.returnToNormal(a.curPanel,0);a.growBigger(a.curPanel, 0,d);a.updateArrows(a.curPanel);a.$el.css({position:"absolute",width:(a.curWidth+100)*a.$panels.length+(a.width-a.curWidth)/2,height:Math.max.apply(this,a.heights)+10});a.$window.css({height:b.fixedHeight?Math.max.apply(this,a.heights):a.heights[a.curPanel-a.adj]});a.$panels.eq(0).css({"margin-left":(a.width-a.curWidth)/2});a.buildNav();a.change(a.curPanel,e,!1===d?!1:!0)};a.buildNav=function(){a.$nav&&a.$nav.remove();if(b.buildNav&&1').appendTo(a.$wrap); var d,e="",g=c.isFunction(b.navFormatter),f=0>parseInt(a.$nav.find(".mb-testing").css("text-indent"),10);a.$panels.filter(":not(.cloned)").each(function(a){d=a+1;e+=' "):e+='">'+d+" "});a.$nav.html(e).find("a").bind("click",function(){a.change(c(this).index()+1);return!1})}};a.returnToNormal=function(d,e){var c=a.$panels.not(":eq("+(d-a.adj)+")").removeClass(b.currentPanel);1=== b.reducedSize?c.css({width:a.regWidth}):c.animate({width:a.regWidth,fontSize:b.reducedSize+"em"},0===e?0:b.speed)};a.growBigger=function(d,c,g){var f=a.$panels.eq(d-a.adj);1===b.reducedSize?(f.css({width:a.curWidth}),a.completed(d,g)):f.animate({width:a.curWidth,fontSize:"1em"},0===c?0:b.speed,function(){a.completed(d,g)})};a.completed=function(d,c){a.$panels.eq(d-a.adj).addClass(b.currentPanel);!1!==c&&a.$el.trigger("completed.movingBoxes",[a,d])};a.goForward=function(){a.initialized&&a.change(a.curPanel+ 1)};a.goBack=function(){a.initialized&&a.change(a.curPanel-1)};a.change=function(d,c,g){if(1>a.totalPanels)"function"===typeof c&&c(a);else{var f,h=!1,g=!1!==g,d=parseInt(d,10);a.initialized&&g&&(a.active(),a.$el.trigger("initChange.movingBoxes",[a,d]));if(b.wrap)if(d>a.totalPanels)h=!0,d=1,a.returnToNormal(0,0),a.growBigger(0,0,!1),f=a.$panels.eq(0).position().left-(a.width-a.curWidth)/2,a.$window.scrollLeft(f);else if(0===d)h=!1,d=a.totalPanels,a.growBigger(d+1,0,!1),f=a.$panels.eq(d+1).position().left- (a.width-a.curWidth)/2,a.$window.scrollLeft(f);da.totalPanels-a.adj&&(d=b.wrap?1:a.totalPanels);if(!a.currentlyMoving||!a.initialized){a.currentlyMoving=!0;a.$curPanel=a.$panels.eq(d-a.adj);f=a.$curPanel.position().left-(a.width-a.curWidth)/2;if(d>a.curPanel||h)f-=a.curWidth-a.regWidth;f=b.fixedHeight?{scrollLeft:f}:{scrollLeft:f,height:a.heights[d-a.adj]};a.curPanel=d;a.initialized&&g&&a.$el.trigger("beforeAnimation.movingBoxes",[a,d]);a.$window.animate(f,{queue:!1, duration:b.speed,easing:b.easing,complete:function(){a.initialized&&a.$window.scrollTop(0);a.currentlyMoving=!1;"function"===typeof c&&c(a)}});a.returnToNormal(d);a.growBigger(d,1,g);a.updateArrows(d);b.hashTags&&a.initialized&&a.setHash(d)}b.buildNav&&a.$nav.length&&a.$nav.find("a").removeClass(b.currentPanel).eq(d-1).addClass(b.currentPanel)}};a.updateArrows=function(d){a.$left.toggleClass(b.disabled,!b.wrap&&d===a.adj);a.$right.toggleClass(b.disabled,!b.wrap&&(d===a.totalPanels||0===a.totalPanels))}; a.getHash=function(){var b=window.location.hash.match(a.regex);return null===b?"":parseInt(b[1],10)};a.setHash=function(b){var c="slider"+a.runTime+"=",g=window.location.hash;if("undefined"!==typeof g)window.location.hash=0