fnp
/
redakcja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Zamiana sztywnego dowiÄ…zania w skrypcie w file_xml.html na URL.
[redakcja.git]
/
project
/
static
/
js
/
jquery.lazyload.js
diff --git
a/project/static/js/jquery.lazyload.js
b/project/static/js/jquery.lazyload.js
index
25c9486
..
ea3de6f
100644
(file)
--- a/
project/static/js/jquery.lazyload.js
+++ b/
project/static/js/jquery.lazyload.js
@@
-31,7
+31,13
@@
|| belowViewport(container, this, settings.threshold)) {
$(this).html(settings.placeholder);
} else {
|| belowViewport(container, this, settings.threshold)) {
$(this).html(settings.placeholder);
} else {
- $(this).html('<img src="' + $(this).attr('src') + '" width="' + $(this).width() + '" />');
+ $(this).html('');
+ var self = this;
+ $('<img src="' + $(this).attr('src') + '" width="' + $(this).width() + '" />').load(function() {
+ if ($(this).height() > $(self).height()) {
+ $(self).height($(this).height());
+ }
+ }).appendTo(this);
}
})
}
}
})
}