From d80f9dd2a618e0e3e2908b03afcd5717cee09822 Mon Sep 17 00:00:00 2001 From: thex Date: Sat, 18 Nov 2017 01:28:07 +0100 Subject: [PATCH 1/3] fixed mootools conflict with jQuery load trigger --- src/slippry.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slippry.js b/src/slippry.js index a60ed44..d5d921e 100755 --- a/src/slippry.js +++ b/src/slippry.js @@ -214,7 +214,7 @@ getFillerProportions = function ($slide) { var width, height; if (($('img', $slide).attr("src") !== undefined)) { - $("").on("load", function () { + $("").on("load loads", function () { width = $slide.width(); height = $slide.height(); setFillerProportions(width, height); @@ -595,13 +595,13 @@ } loop = 0; elements.each(function () { - $(this).one('load error', function () { + $(this).one('loads error', function () { if (++loop === count) { start(); } }).each(function () { if (this.complete) { - $(this).trigger('load'); + $(this).trigger('loads'); } }); }); From 0084e7219420c190cb76b40303dc20da70b94580 Mon Sep 17 00:00:00 2001 From: thex Date: Sat, 18 Nov 2017 02:54:29 +0100 Subject: [PATCH 2/3] updated mootools to fix first page load disappear --- src/slippry.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/slippry.js b/src/slippry.js index d5d921e..a71cd30 100755 --- a/src/slippry.js +++ b/src/slippry.js @@ -602,7 +602,11 @@ }).each(function () { if (this.complete) { $(this).trigger('loads'); - } + }else{ + $(this).one('load',function(){ + $(this).trigger('loads'); + }) + } }); }); }; From 7d8dd75384eb00c9ea7cdf7026e2963666acdefd Mon Sep 17 00:00:00 2001 From: thex Date: Sat, 18 Nov 2017 03:07:06 +0100 Subject: [PATCH 3/3] code styling of changes corrected --- src/slippry.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/slippry.js b/src/slippry.js index a71cd30..c90b160 100755 --- a/src/slippry.js +++ b/src/slippry.js @@ -603,10 +603,10 @@ if (this.complete) { $(this).trigger('loads'); }else{ - $(this).one('load',function(){ - $(this).trigger('loads'); - }) - } + $(this).one('load',function(){ + $(this).trigger('loads'); + }) + } }); }); };