This commit is contained in:
Shubham Mehrotra 2020-04-20 13:37:19 +05:30
parent bc94f318f5
commit ab50478351
1 changed files with 11 additions and 13 deletions

View File

@ -16,30 +16,28 @@
<script>
$(document).ready(function() {
window.updateHeight = () => {
let sidebarHeight = $('.customer-sidebar').css('height');
let contentHeight = $('.account-layout').css('height');
setTimeout(() => {
let sidebarHeight = $('.customer-sidebar').css('height');
let contentHeight = $('.account-layout').css('height');
sidebarHeight = parseInt(sidebarHeight.substring(0, sidebarHeight.length - 2));
contentHeight = parseInt(contentHeight.substring(0, contentHeight.length - 2));
sidebarHeight = parseInt(sidebarHeight.substring(0, sidebarHeight.length - 2));
contentHeight = parseInt(contentHeight.substring(0, contentHeight.length - 2));
let height = sidebarHeight > contentHeight ? sidebarHeight + 30 : contentHeight;
height = height + "px";
let height = sidebarHeight > contentHeight ? sidebarHeight + 30 : contentHeight;
height = height + "px";
$('.account-content').css('height', height);
$('.account-content').css('height', height);
}, 0);
}
window.updateHeight();
$('input, select').change(() => {
setTimeout(() => {
window.updateHeight()
}, 0)
window.updateHeight();
});
$('button').click(() => {
setTimeout(() => {
window.updateHeight()
}, 0)
window.updateHeight();
});
$('.accordian-header').click(window.updateHeight);