Dynamic Height Issue

This commit is contained in:
devansh bawari 2021-04-26 18:11:33 +05:30
parent e024a876b0
commit 19b0d01e95
1 changed files with 1 additions and 34 deletions

View File

@ -10,37 +10,4 @@
@yield('page-detail-wrapper')
</div>
</div>
@endsection
@push('scripts')
<script>
$(document).ready(function() {
window.updateHeight = () => {
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));
let height = sidebarHeight > contentHeight ? sidebarHeight : contentHeight;
height = (height + 30)+ "px";
$('.account-content').css('height', height);
}, 0);
}
window.updateHeight();
$('input, select').change(() => {
window.updateHeight();
});
$('button').click(() => {
window.updateHeight();
});
$('.accordian-header').click(window.updateHeight);
});
</script>
@endpush
@endsection