Skip to content

Commit

Permalink
Removed the animateSpeed parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
baphled committed Jun 11, 2010
1 parent b938c32 commit f261e07
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions public/javascripts/autoScroller.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
**/
$.fn.autoScroller = function(options) {
var opts = $.extend({}, $.fn.autoScroller.defaults, options);
var width = $(this).parent().width();
var $innerUnorderedList = $(this).find('ul');
var previousOffset = 0;
var width = $(this).parent().width(),
$innerUnorderedList = $(this).find('ul'),
previousOffset = 0;

$innerUnorderedList.css('max-height', opts.height)
.css('overflow-y', 'hidden');
Expand All @@ -34,9 +34,9 @@ $.fn.autoScroller = function(options) {

if ($innerUnorderedList.scrollTop() == previousOffset && 0 !== previousOffset) {
$innerUnorderedList
.animate({opacity: 0, scrollTop: 0}, opts.animationSpeed)
.animate({opacity: 1}, opts.animationSpeed);
.animate({scrollTop: 0}, opts.speed / 2);
}

previousOffset = $innerUnorderedList.scrollTop();

if ((previousOffset && $innerUnorderedList.scrollTop()) == 0) {
Expand All @@ -58,8 +58,7 @@ $.fn.autoScroller = function(options) {
$.fn.autoScroller.defaults = {
speed:500,
height:200,
stopOnHover: false,
animationSpeed: 30
stopOnHover: false
};

})(jQuery);

0 comments on commit f261e07

Please sign in to comment.