$(function () { ScollText(".scrollbar") $('.conditions .cond_tit').click(function(){ // $(this).siblings(".cond_list").stop().slideToggle().parents(".item").siblings(".item").find(".cond_list").stop().slideUp() $(this).siblings(".cond_list").stop().slideToggle().parents(".item").siblings(".item").find(".cond_list") if($(this).hasClass('on')){ $(this).removeClass("on"); }else{ $(this).parents(".item").find(".cond_tit").removeClass("on"); $(this).addClass('on') } }) if($('.cond_list li.all').hasClass('active')){ $(this).siblings("li").addClass('active') } var html= ""; $('.cond_list li:not("li.all")').click(function(event) { if($(this).hasClass('active')){ html = ""; }else{ html = ""+ $(this).text() +"" } if(html != ''){ $('#results').append(html) }else{ $('#'+$(this).data('id')).remove(); } console.log(html) $(this).toggleClass("active") $(this).siblings("li.all").removeClass('active') return false // if($(this).hasClass('active')){ // $(this).removeClass('active') // $(this).siblings().eq(0).removeClass('active') // }else{ // $(this).addClass('active') // if($(this).eq(0).hasClass('active')){ // $(this).eq(0).removeClass('active') // } // } }); $('.cond_list li.all').click(function (event) { if($(this).hasClass('active')){ console.log('闈炲叏閮?) $(this).removeClass('active') $(this).siblings("li").removeClass('active') for(var i =0 ; i< $(this).siblings('li').length ; i++){ $('#'+$(this).siblings('li').eq(i).data('id')).remove(); // $('#results').append('' + $(this).siblings('li').eq(i).text() + '') } return false }else{ console.log('鍏ㄩ儴') // $('.cond_list li:not("li.all")') for(var i =0 ; i< $(this).siblings('li').length ; i++){ console.log($(this).siblings('li').eq(i).text()) $('#results').append('' + $(this).siblings('li').eq(i).text() + '') } $(this).addClass('active') $(this).siblings("li").addClass('active') return false } }) $(document).on('click','.tit .icon-guanbi1',function(){ console.log('shanchu') $(this).parents('span').remove() $("li[data-id='"+ $(this).parents('span').attr('id') +"']").removeClass('active') $("li[data-id='"+ $(this).parents('span').attr('id') +"']").parents('ul').children('.all').removeClass('active') }) $(".click_contact").on('click', function(event) { //event.preventDefault(); $(".technology_pop").addClass('show') }); $(document).on('click','.technology_pop .content .close', function(event) { $(".technology_pop").removeClass('show') }); $(".pop_blank").click(function () { $(".technology_pop").removeClass('show') }) ScollText(".technology_wrap .lr .form") ScollText(".technology_pop .content") $(".conditions_result .operation a.down").click(function () { $(".downModal").show() $(".downModal .step_01").show() $(".downModal .step_02").hide() $(".downModal .step_03").hide() }) //$(".downModal .step_btn1").click(function () { //$(this).parents(".downModal .step_01").hide() //$(".downModal .step_02").show() // }) //$(".downModal .step_btn2").click(function () { //$(this).parents(".step_02").hide() //$(".downModal .step_03").show() //setTimeout(function () { //$(".downModal").hide() //},5000) //}) $(".downModal .down_close").click(function () { //$(".downModal").hide() window.location.reload(); }) $(".downModal .mod_blank").click(function () { $(".downModal").hide() }) //$(".trainModal .step_btn1").click(function () { //$(this).parents(".step_01").hide() //$(".trainModal .step_02").show() //}) $(".trainModal .down_close").click(function () { //$(".trainModal").hide() window.location.reload(); }) $(".trainModal .close_btn").click(function () { //$(".trainModal").hide() window.location.reload(); }) $(".trainModal .mod_blank").click(function () { window.location.reload(); }) })