Reset min-width when cloning the element
This commit is contained in:
parent
19268f66a8
commit
e671a1294c
1 changed files with 1 additions and 3 deletions
|
@ -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() {
|
||||
|
|
Loading…
Reference in a new issue