diff --git a/css3.html b/css3.html index de50332..42cf82e 100644 --- a/css3.html +++ b/css3.html @@ -9,7 +9,7 @@ - + @@ -127,4 +127,4 @@

Change first slide animations:

- \ No newline at end of file + diff --git a/demos.html b/demos.html index 4af79ca..43a8f53 100644 --- a/demos.html +++ b/demos.html @@ -14,7 +14,7 @@ - + @@ -743,4 +743,4 @@

Script - FX addon, using custom FX

- \ No newline at end of file + diff --git a/demos/js/jquery.jatt.min.js b/demos/js/jquery.jatt.min.js index 3e3b166..216984e 100644 --- a/demos/js/jquery.jatt.min.js +++ b/demos/js/jquery.jatt.min.js @@ -8,4 +8,4 @@ * */ -(function(b,v,t){b.jatt=function(w){var g,r,s=[],u=b("body"),e=b(t),q=b(v),d=b.extend({},b.jatt.defaultOptions,w);b.jatt.ttrelocate=function(g,j){var l=b("#"+j),a=l.outerWidth(),f=l.outerHeight(),c=l.data("options")||d,n={e:[c.xOffset,-f/2,a+c.xOffset,f/2],se:[c.xOffset,c.yOffset,a+c.xOffset,f+c.yOffset],s:[-a/2,c.yOffset,a/2,f+c.yOffset],sw:[-a-c.xOffset,c.yOffset,-c.xOffset,f+c.yOffset],w:[-a-c.xOffset,-f/2,-c.xOffset,f/2],nw:[-a-c.xOffset,-f-c.yOffset,-c.xOffset,-c.yOffset],n:[-a/2,-f-c.yOffset, a/2,-c.yOffset],ne:[c.xOffset,-f-c.yOffset,a+c.xOffset,-c.yOffset]}[c.direction],m=q.scrollTop(),e=q.scrollLeft(),i=b(g.target),h=g.pageX||i.position().left+i.width()/2,k=g.pageY||i.position().top+i.height()/2;c.followMouse||(h=i.outerWidth(),k=i.outerHeight(),k={e:[h,k/2],se:[h,k],s:[h/2,k],sw:[0,k],w:[0,k/2],nw:[0,0],n:[h/2,0],ne:[h,0]},h=i.offset().left+k[c.direction][0],k=i.offset().top+k[c.direction][1]);var i=h+n[0],o=k+n[1];h+n[2]>e+q.width()-c.xOffset&&(i=q.width()-a-c.xOffset);k+n[3]>m+q.height()- c.yOffset&&(o=k-f-c.yOffset);ii&&ho&&k'),n.push(a),a.load(f,function(){m.eq(a.attr("rel")).data("tooltip",a.html())})))})};(function(){var p= d.live?"live":"bind",j=[];b.each("initialized.jatt beforeReveal.jatt revealed.jatt hidden.jatt".split(" "),function(g,a){var f=a.split(".")[0];b.isFunction(d[f])&&e.bind(a,d[f])});b.data(e,"jatt","");b(d.tooltip)[p](d.activate,function(l){var a,f,c,n,m,j,i,h=b(this);a="false"===d.metadata.toString()?[d,""]:b.jatt.getMeta(h);this!==b.data(e,"jatt")[0]&&b.jatt.removeTooltips();e.trigger("initialized.jatt",h);g=a[0];f=""===h.attr(g.content)?h.data("tooltip")||"":h.attr(g.content)||"";n=h.attr("rel")|| "";m=h.attr("href")||"";h.data("tooltip",f);h.attr("title","");a='
x
';g.local?h.before(a):u.append(a);c=b("#"+d.tooltipId);if(""===f)if(""!==n)f=b(n).html()||d.notFound;else if(""!==m&&"#"!==m)f=d.loading,j=b("
"),j.load(m,function(){i=j.html();s=d.cacheData?i:"";c.hide().find(".body").html(i);h.data("tooltip",s);b.jatt.ttrelocate(l,d.tooltipId);c.fadeIn(g.speed)}); c.data("options",g).find(".body").html(f);b.jatt.ttrelocate(l,d.tooltipId);c.find(".close")[h.is(d.sticky)?"show":"hide"]().click(function(){b.jatt.removeTooltips()});b.data(e,"jatt",h);e.trigger("beforeReveal.jatt",h);c.fadeIn(g.speed);e.trigger("revealed.jatt",h)})[p](d.deactivate,function(){b(this).is(d.sticky)||b.jatt.removeTooltips()})[p]("mousemove",function(e){b("#"+d.tooltipId).length&&g.followMouse&&b.jatt.ttrelocate(e,d.tooltipId)});r=function(l,a,f){e.trigger("initialized.jatt",a);var c, j="false"==d.metadata.toString()?[d,""]:b.jatt.getMeta(a);g=j[0];c=""===a.attr(g.content)?a.data("tooltip")||"":a.attr(g.content)||"";a.data("tooltip",c);"title"===g.content&&a.attr(g.content,"");f='
"+c:"")+'x
';g.local?a.before(f):u.append(f);f=b("#"+d.previewId);b.data(e,"jatt",a);e.trigger("beforeReveal.jatt",a);f.hide().data("options", g).fadeIn(g.speed);f.find(".close")[a.is(d.sticky)?"show":"hide"]().click(function(){b.jatt.removeTooltips()});b.jatt.ttrelocate(l,d.previewId);e.trigger("revealed.jatt",a)};b(d.preview)[p](d.activate,function(e){var a=b(this);b.jatt.removeTooltips();r(e,a,a.attr("href")+'" alt="'+d.imagePreview+'" />')}).each(function(){j.push(b(this).attr("href"))});b(d.screenshot)[p](d.activate,function(e){var a=b(this),f=("#"===a.attr("rel")?d.websitePreview+a.attr("href"):a.attr("rel"))+'" alt="'+d.siteScreenshot+ a.attr("href")+'" />';b.jatt.removeTooltips();r(e,a,f)}).each(function(){var e=b(this);j.push("#"===e.attr("rel")?d.websitePreview+e.attr("href"):e.attr("rel"))});b(d.preview+","+d.screenshot)[p](d.deactivate,function(){b(this).is(d.sticky)||b.jatt.removeTooltips()})[p]("mousemove",function(e){b("#"+d.previewId).length&&g.followMouse&&b.jatt.ttrelocate(e,d.previewId)});b.jatt.preloadContent(j)})()};b.jatt.defaultOptions={direction:"n",followMouse:!0,content:"title",speed:300,local:!1,xOffset:20,yOffset:20, zIndex:1E3,live:!1,metadata:"class",activate:"mouseenter focusin",deactivate:"mouseleave focusout",cacheData:!0,websitePreview:"http://api1.thumbalizr.com/?width=250&url=",loading:"Loading...",notFound:"No tooltip found",imagePreview:"Image preview",siteScreenshot:"URL preview: ",tooltip:".tooltip",screenshot:"a.screenshot",preview:"a.preview",preloadContent:".preload",sticky:".sticky",tooltipId:"tooltip",previewId:"preview"}})(jQuery,this,document); +(function(b,v,t){b.jatt=function(w){var g,r,s=[],u=b("body"),e=b(t),q=b(v),d=b.extend({},b.jatt.defaultOptions,w);b.jatt.ttrelocate=function(g,j){var l=b("#"+j),a=l.outerWidth(),f=l.outerHeight(),c=l.data("options")||d,n={e:[c.xOffset,-f/2,a+c.xOffset,f/2],se:[c.xOffset,c.yOffset,a+c.xOffset,f+c.yOffset],s:[-a/2,c.yOffset,a/2,f+c.yOffset],sw:[-a-c.xOffset,c.yOffset,-c.xOffset,f+c.yOffset],w:[-a-c.xOffset,-f/2,-c.xOffset,f/2],nw:[-a-c.xOffset,-f-c.yOffset,-c.xOffset,-c.yOffset],n:[-a/2,-f-c.yOffset, a/2,-c.yOffset],ne:[c.xOffset,-f-c.yOffset,a+c.xOffset,-c.yOffset]}[c.direction],m=q.scrollTop(),e=q.scrollLeft(),i=b(g.target),h=g.pageX||i.position().left+i.width()/2,k=g.pageY||i.position().top+i.height()/2;c.followMouse||(h=i.outerWidth(),k=i.outerHeight(),k={e:[h,k/2],se:[h,k],s:[h/2,k],sw:[0,k],w:[0,k/2],nw:[0,0],n:[h/2,0],ne:[h,0]},h=i.offset().left+k[c.direction][0],k=i.offset().top+k[c.direction][1]);var i=h+n[0],o=k+n[1];h+n[2]>e+q.width()-c.xOffset&&(i=q.width()-a-c.xOffset);k+n[3]>m+q.height()- c.yOffset&&(o=k-f-c.yOffset);ii&&ho&&k'),n.push(a),a.on('load',f,function(){m.eq(a.attr("rel")).data("tooltip",a.html())})))})};(function(){var p= d.live?"live":"bind",j=[];b.each("initialized.jatt beforeReveal.jatt revealed.jatt hidden.jatt".split(" "),function(g,a){var f=a.split(".")[0];b.isFunction(d[f])&&e.bind(a,d[f])});b.data(e,"jatt","");b(d.tooltip)[p](d.activate,function(l){var a,f,c,n,m,j,i,h=b(this);a="false"===d.metadata.toString()?[d,""]:b.jatt.getMeta(h);this!==b.data(e,"jatt")[0]&&b.jatt.removeTooltips();e.trigger("initialized.jatt",h);g=a[0];f=""===h.attr(g.content)?h.data("tooltip")||"":h.attr(g.content)||"";n=h.attr("rel")|| "";m=h.attr("href")||"";h.data("tooltip",f);h.attr("title","");a='
x
';g.local?h.before(a):u.append(a);c=b("#"+d.tooltipId);if(""===f)if(""!==n)f=b(n).html()||d.notFound;else if(""!==m&&"#"!==m)f=d.loading,j=b("
"),j.on('load',m,function(){i=j.html();s=d.cacheData?i:"";c.hide().find(".body").html(i);h.data("tooltip",s);b.jatt.ttrelocate(l,d.tooltipId);c.fadeIn(g.speed)}); c.data("options",g).find(".body").html(f);b.jatt.ttrelocate(l,d.tooltipId);c.find(".close")[h.is(d.sticky)?"show":"hide"]().click(function(){b.jatt.removeTooltips()});b.data(e,"jatt",h);e.trigger("beforeReveal.jatt",h);c.fadeIn(g.speed);e.trigger("revealed.jatt",h)})[p](d.deactivate,function(){b(this).is(d.sticky)||b.jatt.removeTooltips()})[p]("mousemove",function(e){b("#"+d.tooltipId).length&&g.followMouse&&b.jatt.ttrelocate(e,d.tooltipId)});r=function(l,a,f){e.trigger("initialized.jatt",a);var c, j="false"==d.metadata.toString()?[d,""]:b.jatt.getMeta(a);g=j[0];c=""===a.attr(g.content)?a.data("tooltip")||"":a.attr(g.content)||"";a.data("tooltip",c);"title"===g.content&&a.attr(g.content,"");f='
"+c:"")+'x
';g.local?a.before(f):u.append(f);f=b("#"+d.previewId);b.data(e,"jatt",a);e.trigger("beforeReveal.jatt",a);f.hide().data("options", g).fadeIn(g.speed);f.find(".close")[a.is(d.sticky)?"show":"hide"]().click(function(){b.jatt.removeTooltips()});b.jatt.ttrelocate(l,d.previewId);e.trigger("revealed.jatt",a)};b(d.preview)[p](d.activate,function(e){var a=b(this);b.jatt.removeTooltips();r(e,a,a.attr("href")+'" alt="'+d.imagePreview+'" />')}).each(function(){j.push(b(this).attr("href"))});b(d.screenshot)[p](d.activate,function(e){var a=b(this),f=("#"===a.attr("rel")?d.websitePreview+a.attr("href"):a.attr("rel"))+'" alt="'+d.siteScreenshot+ a.attr("href")+'" />';b.jatt.removeTooltips();r(e,a,f)}).each(function(){var e=b(this);j.push("#"===e.attr("rel")?d.websitePreview+e.attr("href"):e.attr("rel"))});b(d.preview+","+d.screenshot)[p](d.deactivate,function(){b(this).is(d.sticky)||b.jatt.removeTooltips()})[p]("mousemove",function(e){b("#"+d.previewId).length&&g.followMouse&&b.jatt.ttrelocate(e,d.previewId)});b.jatt.preloadContent(j)})()};b.jatt.defaultOptions={direction:"n",followMouse:!0,content:"title",speed:300,local:!1,xOffset:20,yOffset:20, zIndex:1E3,live:!1,metadata:"class",activate:"mouseenter focusin",deactivate:"mouseleave focusout",cacheData:!0,websitePreview:"http://api1.thumbalizr.com/?width=250&url=",loading:"Loading...",notFound:"No tooltip found",imagePreview:"Image preview",siteScreenshot:"URL preview: ",tooltip:".tooltip",screenshot:"a.screenshot",preview:"a.preview",preloadContent:".preload",sticky:".sticky",tooltipId:"tooltip",previewId:"preview"}})(jQuery,this,document); diff --git a/expand.html b/expand.html index 9957af0..3511693 100644 --- a/expand.html +++ b/expand.html @@ -9,7 +9,7 @@ - + diff --git a/index.html b/index.html index fa2aa94..8596b32 100644 --- a/index.html +++ b/index.html @@ -9,7 +9,7 @@ - + diff --git a/js/jquery.anythingslider.fx.js b/js/jquery.anythingslider.fx.js index 34ead74..af8af68 100644 --- a/js/jquery.anythingslider.fx.js +++ b/js/jquery.anythingslider.fx.js @@ -120,7 +120,7 @@ if (slider.options.animationTime < defaults.timeOut) { time = slider.options.animationTime || defaults.timeOut; } - page = page.find('*').andSelf(); // include the panel in the selectors + page = page.find('*').addBack(); // include the panel in the selectors for (el in FX) { if (el === 'outFx') { // process "out" custom effects @@ -153,7 +153,7 @@ if (defaults.stopRepeat && slider.$lastPage[0] === slider.$targetPage[0]) { return; } var el, elIn, page = slider.$currentPage.add( slider.$items.eq(slider.exactPage) ), FX = slider.fx; // allow dynamically added FX - page = page.find('*').andSelf(); // include the panel in the selectors + page = page.find('*').addBack(); // include the panel in the selectors for (el in FX) { if (el === 'inFx') { // process "in" custom effects @@ -181,7 +181,7 @@ .data('AnythingSlider'); // call gotoPage to trigger intro animation - $(window).load(function(){ base.gotoPage(base.currentPage, base.playing); }); + $(window).on('load', function(){ base.gotoPage(base.currentPage, base.playing); }); }); }; diff --git a/js/jquery.anythingslider.fx.min.js b/js/jquery.anythingslider.fx.min.js index e8af997..fccf4b0 100644 --- a/js/jquery.anythingslider.fx.min.js +++ b/js/jquery.anythingslider.fx.min.js @@ -3,4 +3,4 @@ * By Rob Garrison (aka Mottie & Fudgey) * Dual licensed under the MIT and GPL licenses. */ -(function(h){h.fn.anythingSliderFx=function(q,r){var n=h(this).closest(".anythingSlider"),i=n.width(),o=n.height(),p=function(a){var b=a,l;a&&"string"===typeof a&&0=a.currentPage+b.showMultiple||ea.pages&&(b.showMultiple=a.pages),a.adjustMultiple=b.infiniteSlides&&1=a.pages?"hide":"show"]();1a.pages&&(a.currentPage=a.pages);a.setCurrentPage(a.currentPage, +name:""});d(this).find("[id]")[d.fn.addBack?"addBack":"andSelf"]().removeAttr("id")}));a.$items=a.$el.addClass(b.mode).children().addClass("panel");a.setDimensions();b.resizeContents?(a.$items.css("width",a.width),a.$wrapper.css("width",a.getDim(a.currentPage)[0]).add(a.$items).css("height",a.height)):a.$win.on('load',function(){a.setDimensions();k=a.getDim(a.currentPage);a.$wrapper.css({width:k[0],height:k[1]});a.setCurrentPage(a.currentPage,!1)});a.currentPage>a.pages&&(a.currentPage=a.pages);a.setCurrentPage(a.currentPage, !1);a.$nav.find("a").eq(a.currentPage-1).addClass("cur");"fade"===b.mode&&(k=a.$items.eq(a.currentPage-1),b.resumeOnVisible?k.css({opacity:1,visibility:"visible"}).siblings().css({opacity:0,visibility:"hidden"}):(a.$items.css("opacity",1),k.fadeIn(0).siblings().fadeOut(0)))};a.buildNavigation=function(){if(b.buildNavigation&&1");h=t+1;e=(1===h?" first":"")+(h===a.pages?" last":"");c='@';d.isFunction(b.navigationFormatter)?(f=b.navigationFormatter(h,d(this)),"string"===typeof f?g.html(c.replace(/@/g,f)):g=d("
  • ",f)):g.html(c.replace(/@/g,h));g.appendTo(a.$nav).addClass(e).data("index",h)});a.$nav.children("li").bind(b.clickControls,function(c){!a.flag&&b.enableNavigation&&(a.flag=!0,setTimeout(function(){a.flag=!1},100),a.gotoPage(d(this).data("index")));c.preventDefault()});b.navigationSize&&b.navigationSize< a.pages&&(a.$controls.find(".anythingNavWindow").length||a.$nav.before('").after('").wrap('
    '),a.navWidths=a.$nav.find("li").map(function(){return d(this).outerWidth(!0)+Math.ceil(parseInt(d(this).find("span").css("left"),10)/2||0)}).get(),a.navLeft=1,a.$nav.width(a.navWidth(1,a.pages+1)+25),a.$controls.find(".anythingNavWindow").width(a.navWidth(1, @@ -39,4 +39,4 @@ b.animationTime/2),a.$back.stop(!0,!0).delay(h).animate({left:a.arrowLeft+c*a.ar a.$startStop.addClass(b.tooltipClass).attr("title",c?b.stopText:b.startText));c?(a.clearTimer(!0),a.timer=q.setInterval(function(){p.hidden||p.webkitHidden||p.mozHidden||p.msHidden?b.autoPlayLocked||a.startStop():b.isVideoPlaying(a)?b.resumeOnVideoEnd||a.startStop():a.goForward(!0,b.playRtl)},b.delay)):a.clearTimer()};a.init()};d.anythingSlider.defaults={theme:"default",mode:"horiz",expand:!1,resizeContents:!0,showMultiple:!1,easing:"swing",buildArrows:!0,buildNavigation:!0,buildStartStop:!0,toggleArrows:!1, toggleControls:!1,startText:"Start",stopText:"Stop",forwardText:"»",backText:"«",tooltipClass:"tooltip",enableArrows:!0,enableNavigation:!0,enableStartStop:!0,enableKeyboard:!0,startPanel:1,changeBy:1,hashTags:!0,infiniteSlides:!0,navigationFormatter:null,navigationSize:!1,autoPlay:!1,autoPlayLocked:!1,autoPlayDelayed:!1,pauseOnHover:!0,stopAtEnd:!1,playRtl:!1,delay:3E3,resumeDelay:15E3,animationTime:600,delayBeforeAnimate:0,clickForwardArrow:"click",clickBackArrow:"click",clickControls:"click focusin", clickSlideshow:"click",allowRapidChange:!1,resumeOnVideoEnd:!0,resumeOnVisible:!0,isVideoPlaying:function(d){return!1}};d.fn.anythingSlider=function(l,p){return this.each(function(){var a=d(this).data("AnythingSlider");if((typeof l).match("object|undefined"))a?a.updateSlider():new d.anythingSlider(this,l);else if(/\d/.test(l)&&!isNaN(l)&&a){var b="number"===typeof l?l:parseInt(d.trim(l),10);1<=b&&b<=a.pages&&a.gotoPage(b,!1,p)}else/^[#|.]/.test(l)&&d(l).length&&a.gotoPage(l,!1,p)})}})(jQuery,window, -document); \ No newline at end of file +document); diff --git a/package.json b/package.json index faa74fc..59254ea 100644 --- a/package.json +++ b/package.json @@ -7,18 +7,23 @@ "name": "Chris Coyier", "url": "https://github.com/chriscoyier" }, - "maintainers": [{ - "name": "Rob Garrison", - "url": "https://github.com/Mottie", - "email": "wowmotty@gmail.com" - },{ - "name": "Dean Sofer", - "url": "https://github.com/ProLoser" - }], - "licenses": [{ - "type": "GPL3", - "url": "https://github.com/CSS-Tricks/AnythingSlider/blob/master/license.txt" - }], + "maintainers": [ + { + "name": "Rob Garrison", + "url": "https://github.com/Mottie", + "email": "wowmotty@gmail.com" + }, + { + "name": "Dean Sofer", + "url": "https://github.com/ProLoser" + } + ], + "licenses": [ + { + "type": "GPL3", + "url": "https://github.com/CSS-Tricks/AnythingSlider/blob/master/license.txt" + } + ], "bugs": "https://github.com/CSS-Tricks/AnythingSlider/issues", "homepage": "http://css-tricks.com/3412-anythingslider-jquery-plugin/", "docs": "https://github.com/CSS-Tricks/AnythingSlider/wiki", @@ -45,7 +50,9 @@ "jquery": ">=1.4.2" }, "shim": { - "deps": ["jquery"] + "deps": [ + "jquery" + ] } } } diff --git a/simple.html b/simple.html index 0cb95fe..425adf9 100644 --- a/simple.html +++ b/simple.html @@ -9,7 +9,7 @@ - + @@ -73,4 +73,4 @@ - \ No newline at end of file + diff --git a/video.html b/video.html index 6d4d424..01ee16f 100644 --- a/video.html +++ b/video.html @@ -9,7 +9,7 @@ - + @@ -496,4 +496,4 @@

    Updating Video Sliders

    - \ No newline at end of file +