$(function () { //H5????? $('.headerBox .fa-bars').click(function () { $('.menusBoxH5').animate({'right': '0'}) $('body').css('overflow', 'hidden') $('.menusBoxH5').addClass('open') }) //H5????? $('.headerBox .fa-times').click(function () { $('.menusBoxH5').animate({'right': '-275px'}) $('body').css('overflow', '') $('.menusBoxH5').removeClass('open') }) // H5???? $('.headerBox .fa-search').click(function () { $('.searchContainerH5').slideToggle(); }) // ?????? $('.jgNavBoxPc .tab').hover(function () { $(this).find('.dropdown-menu').fadeIn('100') // $(this).find('.dropdown-menu').stop(true, false).slideDown(); $(this).find('.fa-angle-down').attr('class', 'fa fa-angle-up fa-2x') }, function () { $(this).find('.dropdown-menu').stop(true) $(this).find('.dropdown-menu').fadeOut('100') // $(this).find('.dropdown-menu').slideUp(); $(this).find('.fa-angle-up').attr('class', 'fa fa-angle-down fa-2x') }); // ????????? $('.jgNavBoxH5 .jgNavTabs .fa').click(function () { // if ($('.jgNavBoxH5 .jgNavTabs .fa').hasClass('fa-angle-down')) { // $(this).parents('.tab').siblings('.tab-white').show() // $(this).attr('class', 'fa fa-angle-up fa-2x') // } else { // $(this).parents('.tab').siblings('.tab-white').hide() // $(this).attr('class', 'fa fa-angle-down fa-2x') // } }) // ????????? $('.jgNavBoxH5 .jgNavIcon').click(function () { $('.jgNavBoxH5 .jgNavTabs').slideToggle() }) // ????Pc????? var downloadBox1 = 500 $(window).scroll(function () { var scrollTop = $(document).scrollTop() var searchBoxPc = $('.searchBoxPc1').innerHeight() var posterHeight = $('.banerdx').height() if (scrollTop >= searchBoxPc + posterHeight) { $('.jgNavBoxPc, .jgNavBoxH5').addClass('jgNavBoxPcFixed') } else { $('.jgNavBoxPc, .jgNavBoxH5').removeClass('jgNavBoxPcFixed') } // -------------- 20 21 ???????? if($('#aiTranslation').length > 0) { var globalHeaderBoxH = $('.xbb-headerBox').outerHeight() || 0; // ???????NaN var navBoxH = $('.jgNavBoxPc-qkIn').outerHeight() || 0; var topMiddleBox = $('#topMiddleBox .middleBox').outerHeight() || 0; var atOutH = $('#at-out').height() || 0; var atOut = $('#at-out'); if(scrollTop<50){ downloadBox1 = atOut.offset().top; } var searchBoxPc = $('#at-out').innerHeight() var outWidth = $('.contentLeftHeader').width() || atOut.width(); // ???? // ??????????????????? if (scrollTop >= downloadBox1 - navBoxH - atOutH - globalHeaderBoxH) { atOut.addClass('sticky-at').css({ width: outWidth - 2 + 'px', top: (globalHeaderBoxH + navBoxH) + 'px', zIndex: '8' }); if(downloadBox1 - navBoxH - atOutH - globalHeaderBoxH < 0){ atOut.removeClass('sticky-at').removeAttr('style'); // ???????????? } } else { atOut.removeClass('sticky-at').removeAttr('style'); // ???????????? } } }) // --------------------------------- // ?????? $('.navBox .nav').hover(function () { $(this).find('.dropdown-menu').fadeIn('100') // $(this).find('.dropdown-menu').stop(true, false).slideDown(); $(this).find('.fa-angle-down').attr('class', 'fa fa-angle-up fa-2x') }, function () { $(this).find('.dropdown-menu').stop(true) $(this).find('.dropdown-menu').fadeOut('100') // $(this).find('.dropdown-menu').slideUp(); $(this).find('.fa-angle-up').attr('class', 'fa fa-angle-down fa-2x') }); // ????????? // $('.navBoxH5 .fa').click(function () { // if ($('.navBoxH5 .fa').hasClass('fa-angle-down')) { // $(this).parents('.menu').siblings('.tab-white').show() // $(this).attr('class', 'fa fa-angle-up fa-2x') // } else { // $(this).parents('.menu').siblings('.tab-white').hide() // $(this).attr('class', 'fa fa-angle-down fa-2x') // } // }) $(window).scroll(function () { var scrollTop = $(document).scrollTop() var searchHeight = $('.searchBoxPc').innerHeight() var posterHeight = $('.banerdx').height() var headerBoxHeight = $('.headerBox').height() var innerWidth = window.innerWidth if (innerWidth >= 768) { if (scrollTop >= searchHeight + posterHeight) { $('.navBox, .navBoxH5').addClass('navBoxFixed'); $('.searchContainer').addClass('searchContainerTop') }else{ $('.navBox, .navBoxH5').removeClass('navBoxFixed') } } }); })