// JavaScript Document $(document).ready(function () { //登录 $("#topmenu_wel .tp-tit").hover(function () { $(this).addClass("hover").find("div.tp-cont").show(); }, function () { $(this).removeClass("hover").find("div.tp-cont").hide(); }); //鼠标透明效果 $("#topmenu li").hover(function () { $(this).addClass("hover").find("div.tp-cont").show(); }, function () { $(this).removeClass("hover").find("div.tp-cont").hide(); }); }); $(document).ready(function () { //分类展开效果 $(function () { $('.sw-dpl-active').on('click', function () { var text = $(this).find('span').html(); var hidden = 0; if (text == '隐藏') hidden = 1; if (hidden == 0) { $(this).find('span').html('隐藏'); $(this).addClass('sw-dpl-active-more'); $(this).animate({ transform: 'rotate(180deg)' }); var h = $(this).siblings('ul').height(); $(this).parent().animate({ height: h }); } else { $(this).find('span').html('更多'); $(this).removeClass('sw-dpl-active-more'); $(this).animate({ transform: 'rotate(0deg)' }); $(this).parent().animate({ height: '24px' }); } }) }) //选项卡切换 $(function () { $('.tabs-list li').on('click', function () { $('.tabs-list li').removeClass('cur'); $(this).addClass('cur'); }) }) }); //$("#searchbtn").click(function () { // SiteSearch($(this).attr("data-url"), '#keywords', $(".select dt").attr("search-key")); //}); ////搜索查询 //function SiteSearch(send_url, divTgs, stype) { // var strwhere = ""; // if (stype != undefined) { // strwhere = "&type=" + stype // } // var str = $.trim($(divTgs).val()); // if (str.length > 0 && str != "请输入要搜索信息") { // window.location.href = send_url + "?keyword=" + encodeURI($(divTgs).val()) + strwhere; // } // return false; //} //地区选择 function showAddr(ID) { var ID = "ad" + ID; document.getElementById(ID).style.display = "block"; } function hideAddr(ID) { var ID = "ad" + ID; document.getElementById(ID).style.display = "none"; } $(function () { /*- 常见问题左侧菜单 -*/ $('.side-nav li h3').on('click', function () { if ($(this).next().css('display') == 'none') { $('.side-nav li dl').slideUp(); $('.side-nav li h3').removeClass('cur'); $(this).next().slideDown(); $(this).addClass('cur'); } else { // $(this).next().slideUp(); $(this).removeClass('cur'); } }); })