Skip to content

Commit e915e10

Browse files
committed
Bumped version and updated dist files
1 parent 11668bd commit e915e10

File tree

6 files changed

+13
-14
lines changed

6 files changed

+13
-14
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jquery.smooth-scroll",
3-
"version": "1.4.11",
3+
"version": "1.4.12",
44
"dependencies": {
55
"jquery": ">=1.3"
66
},

jquery.smooth-scroll.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
/*!
2-
* Smooth Scroll - v1.4.11 - 2013-07-15
2+
* Smooth Scroll - v1.4.12 - 2013-09-19
33
* https://github.com/kswedberg/jquery-smooth-scroll
44
* Copyright (c) 2013 Karl Swedberg
55
* Licensed MIT (https://github.com/kswedberg/jquery-smooth-scroll/blob/master/LICENSE-MIT)
66
*/
77

88
(function($) {
9-
10-
var version = '1.4.11',
9+
var version = '1.4.12',
1110
defaults = {
1211
exclude: [],
1312
excludeWithin:[],
@@ -44,7 +43,6 @@ var version = '1.4.11',
4443
var scrollable = [],
4544
scrolled = false,
4645
dir = opts.dir && opts.dir == 'left' ? 'scrollLeft' : 'scrollTop';
47-
4846
this.each(function() {
4947

5048
if (this == document || this == window) { return; }
@@ -175,9 +173,11 @@ $.smoothScroll = function(options, px) {
175173

176174
if ( opts.scrollElement ) {
177175
$scroller = opts.scrollElement;
178-
scrollerOffset = $scroller[scrollDir]();
176+
if ( !(/^(?:HTML|BODY)$/).test($scroller[0].nodeName) ) {
177+
scrollerOffset = $scroller[scrollDir]();
178+
}
179179
} else {
180-
$scroller = $('html, body').firstScrollable();
180+
$scroller = $('html, body').firstScrollable(opts.direction);
181181
}
182182

183183
// beforeScroll callback function must fire before calculating offset
@@ -225,7 +225,7 @@ $.smoothScroll.version = version;
225225
$.smoothScroll.filterPath = function(string) {
226226
return string
227227
.replace(/^\//,'')
228-
.replace(/(index|default).[a-zA-Z]{3,4}$/,'')
228+
.replace(/(?:index|default).[a-zA-Z]{3,4}$/,'')
229229
.replace(/\/$/,'');
230230
};
231231

jquery.smooth-scroll.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smooth-scroll",
3-
"version": "1.4.11",
3+
"version": "1.4.12",
44
"scripts": {
55
"test": "./node_modules/.bin/grunt"
66
},

smooth-scroll.jquery.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "smooth-scroll",
3-
"version": "1.4.11",
3+
"version": "1.4.12",
44
"title": "Smooth Scroll",
55
"description": "Easy implementation of smooth scrolling for same-page links",
66
"author": {

src/jquery.smooth-scroll.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
(function($) {
2-
3-
var version = '1.4.11',
2+
var version = '1.4.12',
43
defaults = {
54
exclude: [],
65
excludeWithin:[],

0 commit comments

Comments
 (0)