diff --git a/Gruntfile.js b/Gruntfile.js index ed3fdc5..8ce35e4 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -64,5 +64,5 @@ module.exports = function (grunt) { grunt.loadNpmTasks('grunt-contrib-clean'); grunt.loadNpmTasks("grunt-contrib-concat"); - grunt.registerTask('default', [ 'clean', 'jshint', 'concat', 'uglify', ]); -}; \ No newline at end of file + grunt.registerTask('default', ['clean', 'jshint', 'concat', 'uglify']); +}; diff --git a/index.html b/index.html index b9baab0..d9a35e9 100644 --- a/index.html +++ b/index.html @@ -78,4 +78,4 @@

Dummy content

- \ No newline at end of file + diff --git a/js/jquery.scrollUp.js b/js/jquery.scrollUp.js index 01d10d1..7a0adc2 100644 --- a/js/jquery.scrollUp.js +++ b/js/jquery.scrollUp.js @@ -1,6 +1,6 @@ /* - scrollup v2.1.0 + scrollup v2.1.1 Author: Mark Goodyear - http://markgoodyear.com Git: https://github.com/markgoodyear/scrollup @@ -81,7 +81,7 @@ e.preventDefault(); $('html, body').animate({ scrollTop:0 - }, o.topSpeed, o.easingType); + }, o.scrollSpeed, o.easingType); }); }; @@ -120,4 +120,4 @@ $.scrollUp = $.fn.scrollUp; -})(jQuery, window, document); \ No newline at end of file +})(jQuery, window, document); diff --git a/js/jquery.scrollUp.min.js b/js/jquery.scrollUp.min.js index ec29559..0994808 100644 --- a/js/jquery.scrollUp.min.js +++ b/js/jquery.scrollUp.min.js @@ -1,6 +1,6 @@ /* - scrollup v2.1.0 + scrollup v2.1.1 Author: Mark Goodyear - http://markgoodyear.com Git: https://github.com/markgoodyear/scrollup @@ -11,4 +11,4 @@ Twitter: @markgdyr */ -!function(a,b,c){a.fn.scrollUp=function(b){a.data(c.body,"scrollUp")||(a.data(c.body,"scrollUp",!0),a.fn.scrollUp.init(b))},a.fn.scrollUp.init=function(d){var e=a.fn.scrollUp.settings=a.extend({},a.fn.scrollUp.defaults,d),f=e.scrollTitle?e.scrollTitle:e.scrollText,g=a("",{id:e.scrollName,href:"#top",title:f}).appendTo("body");e.scrollImg||g.html(e.scrollText),g.css({display:"none",position:"fixed",zIndex:e.zIndex}),e.activeOverlay&&a("
",{id:e.scrollName+"-active"}).css({position:"absolute",top:e.scrollDistance+"px",width:"100%",borderTop:"1px dotted"+e.activeOverlay,zIndex:e.zIndex}).appendTo("body"),scrollEvent=a(b).scroll(function(){switch(scrollDis="top"===e.scrollFrom?e.scrollDistance:a(c).height()-a(b).height()-e.scrollDistance,e.animation){case"fade":a(a(b).scrollTop()>scrollDis?g.fadeIn(e.animationInSpeed):g.fadeOut(e.animationOutSpeed));break;case"slide":a(a(b).scrollTop()>scrollDis?g.slideDown(e.animationInSpeed):g.slideUp(e.animationOutSpeed));break;default:a(a(b).scrollTop()>scrollDis?g.show(0):g.hide(0))}}),g.click(function(b){b.preventDefault(),a("html, body").animate({scrollTop:0},e.topSpeed,e.easingType)})},a.fn.scrollUp.defaults={scrollName:"scrollUp",scrollDistance:300,scrollFrom:"top",scrollSpeed:300,easingType:"linear",animation:"fade",animationInSpeed:200,animationOutSpeed:200,scrollText:"Scroll to top",scrollTitle:!1,scrollImg:!1,activeOverlay:!1,zIndex:2147483647},a.fn.scrollUp.destroy=function(d){a.removeData(c.body,"scrollUp"),a("#"+a.fn.scrollUp.settings.scrollName).remove(),a("#"+a.fn.scrollUp.settings.scrollName+"-active").remove(),a.fn.jquery.split(".")[1]>=7?a(b).off("scroll",d):a(b).unbind("scroll",d)},a.scrollUp=a.fn.scrollUp}(jQuery,window,document); \ No newline at end of file +!function(a,b,c){a.fn.scrollUp=function(b){a.data(c.body,"scrollUp")||(a.data(c.body,"scrollUp",!0),a.fn.scrollUp.init(b))},a.fn.scrollUp.init=function(d){var e=a.fn.scrollUp.settings=a.extend({},a.fn.scrollUp.defaults,d),f=e.scrollTitle?e.scrollTitle:e.scrollText,g=a("",{id:e.scrollName,href:"#top",title:f}).appendTo("body");e.scrollImg||g.html(e.scrollText),g.css({display:"none",position:"fixed",zIndex:e.zIndex}),e.activeOverlay&&a("
",{id:e.scrollName+"-active"}).css({position:"absolute",top:e.scrollDistance+"px",width:"100%",borderTop:"1px dotted"+e.activeOverlay,zIndex:e.zIndex}).appendTo("body"),scrollEvent=a(b).scroll(function(){switch(scrollDis="top"===e.scrollFrom?e.scrollDistance:a(c).height()-a(b).height()-e.scrollDistance,e.animation){case"fade":a(a(b).scrollTop()>scrollDis?g.fadeIn(e.animationInSpeed):g.fadeOut(e.animationOutSpeed));break;case"slide":a(a(b).scrollTop()>scrollDis?g.slideDown(e.animationInSpeed):g.slideUp(e.animationOutSpeed));break;default:a(a(b).scrollTop()>scrollDis?g.show(0):g.hide(0))}}),g.click(function(b){b.preventDefault(),a("html, body").animate({scrollTop:0},e.scrollSpeed,e.easingType)})},a.fn.scrollUp.defaults={scrollName:"scrollUp",scrollDistance:300,scrollFrom:"top",scrollSpeed:300,easingType:"linear",animation:"fade",animationInSpeed:200,animationOutSpeed:200,scrollText:"Scroll to top",scrollTitle:!1,scrollImg:!1,activeOverlay:!1,zIndex:2147483647},a.fn.scrollUp.destroy=function(d){a.removeData(c.body,"scrollUp"),a("#"+a.fn.scrollUp.settings.scrollName).remove(),a("#"+a.fn.scrollUp.settings.scrollName+"-active").remove(),a.fn.jquery.split(".")[1]>=7?a(b).off("scroll",d):a(b).unbind("scroll",d)},a.scrollUp=a.fn.scrollUp}(jQuery,window,document); \ No newline at end of file diff --git a/package.json b/package.json index 175b74d..974bdec 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "scrollup", "title": "scrollUp", "description": "A jQuery plugin to create a customisable 'Scroll to top' feature that will work with any website, with ease.", - "version": "2.1.0", + "version": "2.1.1", "year": "2013", "keywords": [ "jquery", diff --git a/src/jquery.scrollUp.js b/src/jquery.scrollUp.js index c862991..f331277 100644 --- a/src/jquery.scrollUp.js +++ b/src/jquery.scrollUp.js @@ -68,7 +68,7 @@ e.preventDefault(); $('html, body').animate({ scrollTop:0 - }, o.topSpeed, o.easingType); + }, o.scrollSpeed, o.easingType); }); }; @@ -107,4 +107,4 @@ $.scrollUp = $.fn.scrollUp; -})(jQuery, window, document); \ No newline at end of file +})(jQuery, window, document);