/** * 由稻壳互联 admin 创建于 2015/6/24. * http://www.dookay.com */ $(document).ready(function() { $('#j_banner1').bxSlider({ mode: 'fade', captions: true, controls: false, auto: true }); $('#j_banner3').bxSlider({ mode: 'fade', captions: false, controls: false, auto: true }); $('#j_banner2').bxSlider({ mode: 'fade', captions: true, controls: false, auto: true }); $("#tabs").tabs(); $("#j-tab").tabs(); $(".j_menu-btn").on('click', function(e) { e.stopPropagation(); e.preventDefault(); $('.j_menu-wrap').slideToggle(100); $('html').toggleClass('alpha'); $('.menu-wrap-b').toggleClass('show'); $(".icon-line").toggleClass("icon-line-h") }) // $(".j_menu li").on('click', function() { // // e.stopPropagation(); // $(this).siblings().children('.dropdown-list').hide(); // }); $(".j_menu-list").on('click', function(e) { e.stopPropagation(); e.preventDefault(); // $(this).toggleClass('i-up'); $(this).siblings('.dropdown-list').slideToggle(100); $(this).parent().siblings().children('.dropdown-list').hide(); }); $(".j_menu-sub-list").on('click', function(e) { e.preventDefault(); e.stopPropagation(); $(this).siblings('.sub-menu').slideToggle(100); $(this).parent().siblings().children('.sub-menu').hide(); // $(this).toggleClass('i-up') }); // $("#j_manage li a").on('click', function(e) { // e.preventDefault(); // $(this).siblings().slideToggle(); // $(this).parent('li').toggleClass('active'); // }); $(".j_user li").on('click',function(){ $(this).toggleClass('active').siblings().removeClass('active') }); $(".j_sub-menu").on('click',function(e){ e.stopPropagation(); $('.j_menu-wrap2').slideToggle(100); }); var hi=$("header").height(); var ht=$("body").height(); var hb=$("html").height(); $(".j_menu-wrap").css({ top:hi }); // $(".j_menu-wrap2").css({ // top:hi+4 // }); // $(".menu-control2").css({ // top:70 // }); $(".menu-content .container").css({ maxHeight:hb-hi }); $(".j_menu-list2 li a").on('click',function (e) { e.preventDefault(); var index=$(this).parent().index(); $("#j_manage li").eq(index).addClass("active").siblings().removeClass("active"); // $(this).parent().parent().hide(); }); // $(".content").css("marginTop",hi); $("html").bind('click',function(){ $('.j_menu-wrap').hide(); $('.j_menu-wrap2').hide(); $('.menu-wrap-b').removeClass("show"); $(".icon-line").removeClass("icon-line-h"); $('html').removeClass('alpha'); }); $(".menu-wrap-b").on('click',function () { $(".icon-line").removeClass("icon-line-h"); $('.j_menu-wrap').hide(); $(this).hide(); }) $('.j_anchor').click(function () { var $this = $(this); $('#j_main_content').animate({ scrollTop: $($this.attr("href")).offset().top + ($this.data('offset') || 0) }, $this.data('speed') || 400); return false; }); $(".j_close").on('click', function(e) { e.preventDefault(); $('.downlode-btn').hide(); }); $('#j_main_content').scroll(function () { var $backtop = $('#backtop'); $(this).scrollTop() > 300 ? $backtop.fadeIn() : $backtop.fadeOut(); }); $(".concept-wrap p").dotdotdot({ ellipsis : '... ', watch : true }); //首页战略合作slide var strategySlide = function(){ $('#j_strategy_slide').bxSlider({ auto: true, controls: false }); }(); //关闭预约理财师 var closeAppointment = function(){ $('#j_close_appointment').on('click',function(){ console.log('jj'); $('.do-appointment').fadeOut(); }); }(); });