Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix support for jQuery 3.0.0 and build tool to minify scrollme #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
23 changes: 11 additions & 12 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name": "scrollme",
"description": "A jQuery plugin for adding simple scrolling effects to web pages.",
"version": "1.1.0",
"main": "jquery.scrollme.min.js",
"ignore":
[
"version": "1.1.1",
"main": "jquery.scrollme.js",
"ignore": [
"scrollme.jquery.json"
],
"keywords":
[
"keywords": [
"animation",
"scrolling"
],
"authors":
[
"authors": [
{
"name": "Nick Pearson",
"url": "http://nckprsn.com"
},
{
"name": "dotnetCarpenter",
"url": "https://github.com/dotnetCarpenter"
}
],
"license":
[
"license": [
{
"type": "GPLv3",
"url": "http://www.gnu.org/licenses/gpl-3.0.html"
Expand All @@ -31,8 +31,7 @@
"type": "git",
"url": "git://github.com/nckprsn/scrollme"
},
"dependencies":
{
"dependencies": {
"jquery": ">=1.8"
}
}
7 changes: 4 additions & 3 deletions jquery.scrollme.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ var scrollme = ( function( $ )

_this.init_events =
[
'ready',
'load',
'DOMContentLoaded',
'page:load', // Turbolinks
'page:change' // Turbolinks
];
Expand Down Expand Up @@ -120,7 +121,7 @@ var scrollme = ( function( $ )

// Recalculate heights & positions when page is fully loaded + a bit just in case

$window.load( function(){ setTimeout( function(){ _this.on_resize(); } , 100 ) });
$window.on('load', function(){ setTimeout( function(){ _this.on_resize(); } , 100 ) });

// Start animating

Expand Down Expand Up @@ -444,7 +445,7 @@ var scrollme = ( function( $ )
// ----------------------------------------------------------------------------------------------------
// Bind initialisation

$document.on( _this.init_events.join( ' ' ) , function(){ _this.init(); } );
$document.one( _this.init_events.join( ' ' ) , function(){ _this.init(); });

// ----------------------------------------------------------------------------------------------------

Expand Down
7 changes: 1 addition & 6 deletions jquery.scrollme.min.js

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

39 changes: 39 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"name": "scrollme",
"version": "1.1.1",
"description": "A jQuery plugin for adding simple scrolling effects to web pages.",
"main": "jquery.scrollme.js",
"keywords": [
"animation",
"scrolling"
],
"authors": [
{
"name": "Nick Pearson",
"url": "http://nckprsn.com"
},
{
"name": "dotnetCarpenter",
"url": "https://github.com/dotnetCarpenter"
}
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "uglifyjs jquery.scrollme.js --compress > jquery.scrollme.min.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/nckprsn/scrollme.git"
},
"license": "GPLv3",
"bugs": {
"url": "https://github.com/nckprsn/scrollme/issues"
},
"homepage": "https://github.com/nckprsn/scrollme#readme",
"dependencies": {
"jquery": ">=1.8"
},
"devDependencies": {
"uglify-js": "^2.6.2"
}
}
2 changes: 1 addition & 1 deletion scrollme.jquery.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"animation",
"scrolling"
],
"version": "1.1.0",
"version": "1.1.1",
"author":
{
"name": "Nick Pearson",
Expand Down