"工图网用户ID":uid, "工图网用户昵称":user } }; } } getuser(); $("#kwinput-item").focus(function() { $("#dropdown-box-float").show(); }); $("#kwinput-item").blur(function() { $("#dropdown-box-float").hide(); }); $("#kwinput-float").focus(function() { $("#dropdown-box").show(); }); $("#kwinput-float").blur(function() { $("#dropdown-box").hide(); }); $('#dropdown-box-float').on('mousedown', '.tips-item', function(e){ e.preventDefault(); location.href = $(this).data("href"); }); $('#dropdown-box').on('mousedown', '.tips-item', function(e){ e.preventDefault(); location.href = $(this).data("href"); }); var mark=true; $(window).scroll(function() { var scrollheight = parseInt($(document).scrollTop()); if (scrollheight>=300) { if (mark) { mark = false; $('.headercatage').css('top','-75px'); $('.headercatage').show(); $(".headercatage").animate({top:"0px"},300); $('#dropdown-box-float').hide(); $('#dropdown-box').hide(); } } else { if(!mark) { mark=true; $('.headercatage').hide(); } } });