From abb89a3e131525393e82cfed0eb6dc72edb72f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20=C4=8Cekan?= Date: Fri, 7 Apr 2017 16:25:55 +0200 Subject: [PATCH] Update jquery.prettyPhoto.js The .size() method is deprecated as of jQuery 1.8 and removed in jQuery 3 --- js/jquery.prettyPhoto.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/jquery.prettyPhoto.js b/js/jquery.prettyPhoto.js index 9ecf9d1..2a04fda 100644 --- a/js/jquery.prettyPhoto.js +++ b/js/jquery.prettyPhoto.js @@ -189,8 +189,8 @@ } if(settings.hideflash) $('object,embed,iframe[src*=youtube],iframe[src*=vimeo]').css('visibility','hidden'); // Hide the flash - - _checkPosition($(pp_images).size()); // Hide the next/previous links if on first or last images. + + _checkPosition($(pp_images).length); // Hide the next/previous links if on first or last images. $('.pp_loaderIcon').show(); @@ -208,7 +208,7 @@ $pp_overlay.show().fadeTo(settings.animation_speed,settings.opacity); // Display the current position - $pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).size()); + $pp_pic_holder.find('.currentTextHolder').text((set_position+1) + settings.counter_separator_label + $(pp_images).length); // Set the description if(typeof pp_descriptions[set_position] != 'undefined' && pp_descriptions[set_position] != ""){ @@ -241,7 +241,7 @@ // Preload the neighbour images nextImage = new Image(); - if(isSet && set_position < $(pp_images).size() -1) nextImage.src = pp_images[set_position + 1]; + if(isSet && set_position < $(pp_images).length -1) nextImage.src = pp_images[set_position + 1]; prevImage = new Image(); if(isSet && pp_images[set_position - 1]) prevImage.src = pp_images[set_position - 1]; @@ -382,10 +382,10 @@ if(direction == 'previous') { set_position--; - if (set_position < 0) set_position = $(pp_images).size()-1; + if (set_position < 0) set_position = $(pp_images).length-1; }else if(direction == 'next'){ set_position++; - if(set_position > $(pp_images).size()-1) set_position = 0; + if(set_position > $(pp_images).length-1) set_position = 0; }else{ set_position=direction; };