|
- // JavaScript Document
- var skinLink = $('#skinLink');
- var skins = localStorage.getItem('skinLink');
- skins ? skinLink.attr('href','/Content/css/' + skins + '.css') : skinLink.attr('href','/Content/css/blue.css');
- $(document).ready(function(){
- // header search
- $('.headSearch').on('focus','input',function(){
- $(this).parent().addClass('active');
- }).on('blur','input',function(){
- var len = $(this).val().trim().length;
- if(len == 0) $(this).val('').parent().removeClass('active');
- })
- //皮肤点击
- var skinT = null;
- $('.skinBox').on('click','img',function(){
- var parents = $(this).parent();
- if(parents.hasClass('active')){
- parents.removeClass('active');
- }else{
- parents.addClass('active');
- }
- }).hover(function(){
- clearTimeout(skinT)
- },function(){
- var _this = $(this);
- skinT = setTimeout(function(){
- _this.removeClass('active');
- },2000)
- }).on('click','.skins', function(){
- var skin = $(this).attr('skin');
- localStorage.setItem('skinLink',skin);
- skinLink.attr('href','/Content/css/' + skin + '.css');
- })
-
- // 办事大厅查询
- var inSec1SerchT = null;
- var inSec1SerchLists = $('.inSec1SerchLists');
- var inSec1SerchList = $('.inSec1SerchList');
- inSec1SerchHovers(inSec1SerchList)
- inSec1SerchHovers(inSec1SerchLists)
-
- inSec1SerchLists.on('click','li',function(){
- var txt = $(this).html();
- $(this).addClass('active').siblings().removeClass('active');
- inSec1SerchList.attr('title', txt).find('span').html(txt);
- })
-
-
- function inSec1SerchHovers(obj){
- obj.hover(function(){
- clearTimeout(inSec1SerchT);
- inSec1SerchLists.stop().slideDown(500);
- },function(){
- inSec1SerchT = setTimeout(function(){
- inSec1SerchLists.stop().slideUp(500);
- },500)
- })
- }
- })
-
-
|