HEX
Server: LiteSpeed
System: Linux server137.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: bibuzptr (1123)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/bibuzptr/elearning.bibu-edu.us/backup/admin/pdf/themes/validgrad/js/custom4b68.js
jQuery(function($) {
    $(window).scroll(function(){
        var sticky = $('.site > header#masthead'),
            scroll = $(window).scrollTop();

        if (scroll >= 100) sticky.addClass('sticky');
        else sticky.removeClass('sticky');
    });

    $('#fileuploadfield').change(function() {
        var val = $(this).val();
        if(val){
            var fileName = val.split("\\");
            $('#uploadtextfield').text('( '+fileName[fileName.length-1]+' attached )');
            if($(".remove_attachment").length<1)
                $("#uploadtextfield").parent().append("<span class='remove_attachment'> X</span>");
        }
    });

    $(document).on("click",".remove_attachment",function(){
        $('#uploadtextfield').text('');
        $('#fileuploadfield').val('');
        $(this).remove();
    });

    $(document).on("click",".wpcf7-submit",function(){
        var thankYouInterVal = setInterval(function() {
            var thankMessage = $(".wpcf7-response-output").text();
            if(thankMessage!="" && thankMessage=='Thank you for your interest. We are reviewing your request and will get back to you via email with your custom quote.'){
                $(".remove_attachment").trigger("click");
                $(".form-group").each(function(i,e){
                    $(this).removeClass('focused');
                });
                clearInterval(thankYouInterVal);
            }
        }, 100);
    });
    
});