123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- $(function(){
-
- $('#q-input .text').focus(function(){
- if ($(this).val() == $(this).attr('title')) {
- $(this).val('').removeClass('tips');
- }
- }).blur(function(){
- if ($(this).val() == '' || $(this).val() == $(this).attr('title')) {
- $(this).addClass('tips').val($(this).attr('title'));
- }
- }).blur().autocomplete({
-
- });
-
- $('#ops').submit(function(){
- var $input = $('#q-input .text');
- if ($input.val() == $input.attr('title')) {
- alert('请先输入关键词');
- $input.focus();
- return false;
- }
- });
-
- $(".indexAskList li").hover(function () {
- $(this).addClass("hover");
- },
- function () {
- $(this).removeClass("hover");
- }
- );
- $(".expertBox li").hover(function () {
- $(this).addClass("now").siblings("li").removeClass("now");
- }
- );
- $(".exproList .exproItem").hover(function () {
- $(this).addClass("hover").children(".exproExtra").slideDown("fast").siblings(".exproItem").removeClass("hover");
- },
- function () {
- $(this).removeClass("hover").children(".exproExtra").slideUp("fast")
- }
- );
-
- $(".agreeThis").hover(function () {
- $(this).addClass("agreeThisHover");
- },
- function () {
- $(this).removeClass("agreeThisHover");
- }
- );
- $(".agreeThisDis").hover(function () {
- $(this).addClass("agreeThisDisHover");
- },
- function () {
- $(this).removeClass("agreeThisDisHover");
- }
- );
- $("div.msgEntry h3").click(function () {
- $(this).siblings(".sysMsgDetail").slideDown("fast");
- });
- $(".msgDetailUpBtn a").click(function () {
- $(this).parents(".sysMsgDetail").slideUp("fast");
- });
- $('a.loginBtn').click(function(){
- $(".loginPanel").slideToggle();
- $(this).toggleClass("focus");
- if ($(this).hasClass('focus')) $(this).find('span').html('▲')
- else $(this).find('span').html('▼')
- });
- $(".loginPanel").click(function (e) {
- e.stopPropagation();
- });
- $(".userLoginPanel > li").hover(function () {
- $(this).addClass("focus").children(".myListMenu").show();
- },
- function () {
- $(this).removeClass("focus").children(".myListMenu").hide();
- }
- );
- function newsScroll(id) {
- var box = $("#"+id+ " span");
- $("<span>").html(box.html()).appendTo(box.parent());
- var w = box.width();
- var i = 0;
- var move = function () {
- box[0].style.marginLeft = -i+"px";
- i++;
- if (i === w) {
- i = 0;
- }
- };
- var auto = setInterval(move, 40);
-
- $("#index-news span a").hover(function (){
- clearInterval(auto);
- }, function (){
- auto = setInterval(move, 40);
- })
-
- }
-
- if (document.getElementById("index-news")){
- newsScroll("index-news");
- };
- $(".chargeEntry > h2 > .payBtn").click(function(){
- $(this).hide().parents("h2").siblings(".chargeItem").slideDown("fast");
- });
- $(".chargeItem .btn-gray").click(function(){
- $(this).parents(".chargeItem").slideUp("fast").siblings("h2").children(".payBtn").show();
- });
- $(".chargeEntry").hover(function(){
- $(this).addClass("focus").siblings().removeClass("focus")
- },
- function(){$(this).removeClass("focus")}
- );
- $(".tabTips").fadeIn("slow");
- setTimeout( function(){$( '.tabTips' ).fadeOut("slow");}, 3000 );
- $(".searchInput").hover(function () {
- $(this).children(".searchDocBtn").show();
- },
- function () {
- $(this).children(".searchDocBtn").hide();
- }
- );
- });
|