compare page update height after loading images

This commit is contained in:
Shubham Mehrotra 2020-04-06 14:48:54 +05:30
parent 9d357e466d
commit 804dc01512
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