Merge pull request #2833 from shubhwebkul/master

compare page update height after loading images
This commit is contained in:
Jitendra Singh 2020-04-06 15:45:58 +05:30 committed by GitHub
commit ae275de3a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -15,7 +15,7 @@
@push('scripts')
<script>
$(document).ready(function() {
let updateHeight = () => {
window.updateHeight = () => {
let sidebarHeight = $('.customer-sidebar').css('height');
let contentHeight = $('.account-layout').css('height');
@ -28,9 +28,9 @@
$('.account-content').css('height', height);
}
updateHeight();
window.updateHeight();
$('.accordian-header').click(updateHeight);
$('.accordian-header').click(window.updateHeight);
});
</script>
@endpush

View File

@ -57,6 +57,7 @@
<img
class="image-wrapper"
:src="product['{{ $attribute['code'] }}']"
onload="window.updateHeight ? window.updateHeight() : ''"
:onerror="`this.src='${$root.baseUrl}/vendor/webkul/ui/assets/images/product/large-product-placeholder.png'`" />
</a>
@break