$(function(){ $(function () { $('[data-toggle="tooltip"]').tooltip() }); $('.dropdown-toggle').dropdown(); $(".projectSeList li .openPro").click(function(){ var projectDetail = $(this).siblings(".projectDetailNot"); if(projectDetail.css("display")=="none"){ $(this).text("隐藏所有标段"); $(this).siblings(".projectDetailNot").slideDown(); }else{ $(this).text("展开所有标段"); $(this).siblings(".projectDetailNot").slideUp(); } }); $(".labelSwitch").click(function(e){ if($(e.target).is('input')){ return; }; var shareBtn = $(this).parents().siblings().children(".shareBtn"); var Switch = $(this).parents().siblings(".shareLink"); if(Switch.css("display")=="none"){ $(this).addClass("Switch"); $(this).css("background","#5eb95e"); $(this).children(".checkbox").css("left","2rem"); $(Switch).slideDown(); $(shareBtn).show(); }else{ $(this).css("background","#fff"); $(this).children(".checkbox").css("left","-1px"); $(Switch).slideUp(); $(shareBtn).hide(); } }); });