Skip to content

Commit 115e1ef

Browse files
author
Yogesh
committed
Changed module definition to allow passing jQuery instance
1 parent 6d93376 commit 115e1ef

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

README.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jQuery .scrollintoview() plugin <sup>(with :scrollable selector filter)</sup>
33

44
Originally created by [Robert Koritnik](https://github.com/litera)
55

6-
This fork is npm, bower, AMD and jquery 1.8 compatibale which includes changes made by [Michael Best](https://github.com/mbest) and [Michael Reinsch](https://github.com/mreinsch).
6+
This fork is a fork of [https://github.com/adamtal3/jquery-scrollintoview](https://github.com/adamtal3/jquery-scrollintoview) npm, bower, AMD and jquery 1.8 compatibale which includes changes made by [Michael Best](https://github.com/mbest) and [Michael Reinsch](https://github.com/mreinsch).
77

88
This plugin makes it easy to scroll any element on your page into view. It scrolls in a user friendly way using animation (speed can be configured) so users never loose track where they moved within the current page. Default browser functionality simply jumps to some element which may confuse users greatly. This kind of behaviour is considered bad user experience, since pages look different above and below the fold. This means that users may as well think they were redirected to a different site (since it looks different) or at least page within the same site.
99

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"scroll",
1515
"scrollintoview"
1616
],
17-
"homepage": "https://github.com/adamtal3/jquery-scrollintoview",
17+
"homepage": "https://github.com/EdgeMetric/jquery-scrollintoview",
1818
"moduleType": [
1919
"amd"
2020
]

jquery.scrollintoview.js

+2-11
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,7 @@
99
* http://www.opensource.org/licenses/mit-license.php
1010
*/
1111

12-
!function(root, factory) {
13-
if (typeof define === 'function' && define.amd) {
14-
define(['jquery'], factory);
15-
} else if (typeof exports === 'object') {
16-
factory(require('jquery'));
17-
} else {
18-
factory(root.jQuery);
19-
}
20-
}
21-
(this, function($) {
12+
module.exports = function($) {
2213
var converter = {
2314
vertical: { x: false, y: true },
2415
horizontal: { x: true, y: false },
@@ -237,4 +228,4 @@
237228
return scroll(element, direction);
238229
};
239230
});
240-
});
231+
};

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"repository": {
1010
"type": "git",
11-
"url": "git+https://github.com/adamtal3/jquery-scrollintoview.git"
11+
"url": "git+https://github.com/EdgeMetric/jquery-scrollintoview.git"
1212
},
1313
"keywords": [
1414
"jquery",
@@ -18,7 +18,7 @@
1818
"author": "Robert Koritnik",
1919
"license": "MIT",
2020
"bugs": {
21-
"url": "https://github.com/adamtal3/jquery-scrollintoview/issues"
21+
"url": "https://github.com/EdgeMetric/jquery-scrollintoview/issues"
2222
},
23-
"homepage": "https://github.com/adamtal3/jquery-scrollintoview#readme"
23+
"homepage": "https://github.com/EdgeMetric/jquery-scrollintoview#readme"
2424
}

0 commit comments

Comments
 (0)