From 53068f662673c7e9850f82ae5925a743556175a4 Mon Sep 17 00:00:00 2001 From: bltafel Date: Wed, 27 Sep 2017 18:43:34 -0400 Subject: [PATCH] Fixed video repeat issue Moved the click binding logic out of the if statement that checks for the existence of a button so that it runs every time. Loading more than 3 videos now works properly. --- ...-pack.1.1.js => jquery.slider-pack.1.2.js} | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) rename js/{jquery.slider-pack.1.1.js => jquery.slider-pack.1.2.js} (99%) diff --git a/js/jquery.slider-pack.1.1.js b/js/jquery.slider-pack.1.2.js similarity index 99% rename from js/jquery.slider-pack.1.1.js rename to js/jquery.slider-pack.1.2.js index 149f362..6b15f0d 100644 --- a/js/jquery.slider-pack.1.1.js +++ b/js/jquery.slider-pack.1.2.js @@ -1955,23 +1955,25 @@ if(hasVideo) { - + // MODIFICATION FROM ORIGINAL CODE // if(!blockInside.find('.play-button-container').length > 0) { blockInside.append(''); + } - blockInside.find('.play-button-container').bind('click', function(e) { - if(!self.moved) { - e.preventDefault(); - e.stopImmediatePropagation(); - self._controlsVisible = true; - self._showVideo(fData, blockInside); - } else { - return false; - } - }); - } - - } else { + blockInside.find('.play-button-container').unbind('click'); + blockInside.find('.play-button-container').bind('click', function(e) { + if(!self.moved) { + e.preventDefault(); + e.stopImmediatePropagation(); + self._controlsVisible = true; + self._showVideo(fData, blockInside); + } else { + return false; + } + }); + + // END MODIFICATION // + } else { if(blockInside.find('.play-button-container').length > 0) { blockInside.find('img').css('cursor', 'inherit').unbind('click'); blockInside.find('.play-button-container').unbind('click');