From e671a1294c1147dc9107d39368c361fcc5f4da82 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 7 May 2018 09:57:35 +0200 Subject: [PATCH] Reset min-width when cloning the element --- platypush/backend/http/static/js/widgets/image-carousel.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/platypush/backend/http/static/js/widgets/image-carousel.js b/platypush/backend/http/static/js/widgets/image-carousel.js index 88e87232..4b5a3791 100644 --- a/platypush/backend/http/static/js/widgets/image-carousel.js +++ b/platypush/backend/http/static/js/widgets/image-carousel.js @@ -16,13 +16,11 @@ $(document).ready(function() { var refreshImage = function() { var $oldImg = $imgContainer.find('img'); var $newImg = $imgContainer.find('img').clone() - .attr('src', images[processedImages++]) + .attr('src', images[processedImages++]).css('min-width', '') .hide().appendTo($imgContainer); if ($newImg.width() > $newImg.height()) { $newImg.css('min-width', '100%'); - } else { - $newImg.css('min-width', ''); } $newImg.on('load', function() {