博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
屏幕滚动
阅读量:378 次
发布时间:2019-03-04

本文共 3707 字,大约阅读时间需要 12 分钟。

css:

#shangxia{position:absolute;top:40%;left:50%;margin-left:-520px;display:block;z-index:2;}

#shang{background:url(images/huadong.gif) no-repeat;position:relative;cursor:pointer;height:42px;width:32px;margin:10px 0;}
#comt{background:url(images/huadong.gif) no-repeat center -45px;position:relative;cursor:pointer;height:32px;width:32px;margin:10px 0;}
#xia{background:url(images/huadong.gif) no-repeat center -78px;position:relative;cursor:pointer;height:42px;width:32px;margin:10px 0;}

js:

jQuery(document).ready(function($){

$('#to_author_info a').click(function(){$('#author_avatar').hide();$('#author_info').fadeIn();});

var s= $('#shangxia').offset().top;

$(window).scroll(function (){$("#shangxia").animate({top : $(window).scrollTop() + s + "px" },{queue:false,duration:500});});

var m = $('#menu').offset().top;

$(window).scroll(function(){var w = $(window).scrollTop();if(w > m)$('#menu').css({position:'fixed',top:'0px'}).stop().animate({'opacity':'0.8'},400);else $('#menu').css({position:'static'}).stop().animate({'opacity':'1'},400);});
$('#menu').hover(function(){ var w = $(window).scrollTop(); if(w > m){$('#menu').stop().animate({'opacity':'1'},400);}},function(){var w = $(window).scrollTop();if(w > m){$('#menu').stop().animate({'opacity':'0.8'},400);}});

$('.post-title').toggle(function(){$(this).next().slideDown(300);},function(){$(this).children("h2").children("a").text('椤甸潰杞藉叆涓€︹€?);window.location = $(this).children("h2").children("a").attr('href');});

$(".post-title:first").click();

$("#tab-content ul li a,.post-title h2 a").hover(function () {$(this).stop().animate({marginLeft:"+=8"}, 250);},function () {$(this).stop().animate({marginLeft:"0"}, 150);});

$('#tab-title span').click(function(){$(this).addClass("selected").siblings().removeClass();$("#tab-content > ul").slideUp('1500').eq($('#tab-title span').index(this)).slideDown('1500');});
$("#menu .nav li:not(#close-sidebar)").hover(function(){$(this).stop().animate({paddingTop:"+=6"}, 240);},function(){$(this).stop().animate({paddingTop:"0"}, 120);});

$('#close-sidebar a').toggle(function(){$(this).text("ww?);$('#sidebar').hide().prev().animate({width: "960px"}, 1000);},function(){$(this).text("ww?);$('#sidebar').show().prev().animate({width: "705px"}, 800);});

$('#shang').click(function(){$('html,body').animate({scrollTop: '0px'}, 800);});

$('#xia').click(function(){$('html,body').animate({scrollTop:$('#footer').offset().top}, 800);});
$('#comt').click(function(){$('html,body').animate({scrollTop:$('#comments').offset().top}, 800);});

$(".menuheader").click(function() {$(this).next().slideToggle(300);return false;});

$("#content a").mouseover(function(e){

 this.myTitle = this.title;
 this.myHref = this.href;
 this.myHref = (this.myHref.length > 30 ? this.myHref.toString().substring(0,30)+"..." : this.myHref);
 this.title = "";
 var tooltip = "<div id='tooltip'><p>"+this.myTitle+"<em>"+this.myHref+"</em>"+"</p></div>";
 $('body').append(tooltip);
 $('#tooltip').css({"opacity":"0","top":(e.pageY+20)+"px","left":(e.pageX+10)+"px"}).animate({opacity:"0.8"}, 500);
}).mouseout(function(){this.title = this.myTitle;$('#tooltip').remove();
}).mousemove(function(e){$('#tooltip').css({"top":(e.pageY+20)+"px","left":(e.pageX+10)+"px"});
});

$(".post-content a[href^=http://www.rayfile.com]").addClass("rayfile");

$(".post-content a[href$=.zip],.post-content a[href$=.7z],.post-content a[href$=.rar]").addClass("zip");
$(".post-content a[href$=.doc]").addClass("doc");
$(".post-content a[href$=.pdf]").addClass("pdf");
$(".post-content a[href$=.png]").addClass("png");

$('.vcard a').attr({ target: "_blank"});

$('a,input[type="submit"],object').bind('focus',function(){if(this.blur){ this.blur();}});

});

转载地址:http://npje.baihongyu.com/

你可能感兴趣的文章
vue 可合并表格组件_Vue实战046:详解Mixins混入使用和注意事项
查看>>
python包怎么做双重差分did分析_多变量相关性分析(一个因变量与多个自变量)
查看>>
fi sap 凭证冲销 稅_SAP中的成本要素
查看>>
mysql幻读是什么意思_MySQL中的幻读,你真的理解吗?
查看>>
mysql执行计划中性能最差的是_MySQL性能优化(七):MySQL执行计划,真的很重要,来一起学习吧...
查看>>
易语言执行mysql命令_易语言通过“打开”命令操作数据库
查看>>
mysql slave 1062_mysql主从同步slave错误1062
查看>>
mysql构造器_MySQL行构造器表达式优化(Row Constructor Expression)
查看>>
2008日志清理 server sql_SQL Server 2008 清除日志
查看>>
mac mysql root 权限_Mac平台重新设置MySQL的root密码
查看>>
mysql新增一列_MySQL-ProxySQL中间件
查看>>
mysql 30入门_30分钟带你快速入门MySQL教程
查看>>
kangle主机怎么配置MySQL_kangle web服务+easypanel主机控制面板快速搭建网站和数据库以及管理空间详细教程...
查看>>
mysql 翻页 存储过程_MySQl通用翻页(存储过程)
查看>>
2020word替换所有文本_Excel字符函数(5):REPLACE、SUBSTITUTE查找替换函数之区别...
查看>>
win10安装ipython_win10环境 ipython app.py 8080 这里为什么是ipython 这步无法启动
查看>>
假定在MYSQL_假定在名称为教学库的数据库中包含有学生、课程和选课三个表,它们的定义如下 - 问答库...
查看>>
mysql多字段存储过程_mysql 的存储过程_多字段
查看>>
python怎么创建字符串列表_如何在python列表中为每个字符串创建子列表?
查看>>
vba ado 执行多条mysql 语句_access 按钮 多条sql语句 VBA
查看>>