Skip to content

Commit

Permalink
Cache element.hash.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Jul 26, 2011
1 parent 82ef247 commit 13a163e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions jquery.smoothscroll.js
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! http://mths.be/smoothscroll v1.5.1 by @mathias */ /*! http://mths.be/smoothscroll v1.5.2 by @mathias */
;(function(document, $) { ;(function(document, $) {


var $scrollElement = (function() { var $scrollElement = (function() {
Expand Down Expand Up @@ -34,7 +34,7 @@
event.preventDefault(); event.preventDefault();
// …and smoothly scroll to it // …and smoothly scroll to it
$scrollElement.stop().animate({ 'scrollTop': $hash.offset().top }, speed, function() { $scrollElement.stop().animate({ 'scrollTop': $hash.offset().top }, speed, function() {
location.hash = hash.id; location.hash = hash;
}); });
} }
} }
Expand Down
4 changes: 2 additions & 2 deletions jquery.smoothscroll.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 13a163e

Please sign in to comment.