Page height setting on events

$(document).ready(function() {
    $('#ccname').val('');

    $(".paymentinstrument-creditcard-edit").click(function() {
        if (window.innerWidth >= 768) {
            var mainheight = $("#content-wrapper-side-nav").height()
            console.log(mainheight)
            $(".myaccount-layout-side-nav").css('min-height', mainheight);
        } else {
            $(".myaccount-layout-side-nav").css('height', 'auto');
        }



        $(document).on("click", ".paymentinstrument-creditcard-edit-form-button-submit", function() {

            var mainheight = document.getElementsByClassName('myaccount-layout-row')[0].clientHeight;
            console.log("ytttrr", mainheight)
            console.log("effssssss", mainheight + 75)

            $('.myaccount-layout-side-nav').css('min-height', mainheight + 15);
        })


        $(document).on("click", ".creditcard-edit-form-select", function() {

            var mainheight = document.getElementsByClassName('myaccount-layout-row')[0].clientHeight;
            console.log("yttt", mainheight)
            console.log("eff", mainheight)

            $('.myaccount-layout-side-nav').css('min-height', mainheight);
        })



    });




});

Leave a comment

Your email address will not be published. Required fields are marked *