mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 09:05:45 +00:00
FIX: Don't reload already loaded lazy images
This commit is contained in:
parent
1d567ede12
commit
3549acf212
2
dist/js/app.js
vendored
2
dist/js/app.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/app.js.map
vendored
2
dist/js/app.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
|
"name": "@a2nt/ss-bootstrap-ui-webpack-boilerplate",
|
||||||
"version": "2.2.3",
|
"version": "2.2.4",
|
||||||
"author": "Tony Air <tony@twma.pro>",
|
"author": "Tony Air <tony@twma.pro>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",
|
"description": "This UI Kit allows you to build Bootstrap 4 webapp with some extra UI features. It's easy to extend and easy to convert HTML templates to CMS templates.",
|
||||||
|
@ -416,6 +416,10 @@ const MainUI = (($) => {
|
|||||||
const src = $el.attr('src');
|
const src = $el.attr('src');
|
||||||
const lazySrc = $el.data('lazy-src');
|
const lazySrc = $el.data('lazy-src');
|
||||||
|
|
||||||
|
if ($el.hasClass('loaded')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (src && src.length) {
|
if (src && src.length) {
|
||||||
$imgUrls.push(src);
|
$imgUrls.push(src);
|
||||||
}
|
}
|
||||||
@ -442,6 +446,10 @@ const MainUI = (($) => {
|
|||||||
const $el = $(el);
|
const $el = $(el);
|
||||||
const lazySrc = $el.data('lazy-bg');
|
const lazySrc = $el.data('lazy-bg');
|
||||||
|
|
||||||
|
if ($el.hasClass('loaded')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (lazySrc && lazySrc.length) {
|
if (lazySrc && lazySrc.length) {
|
||||||
$imgLazyUrls.push(lazySrc);
|
$imgLazyUrls.push(lazySrc);
|
||||||
$el.addClass('loading');
|
$el.addClass('loading');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user