Created
July 24, 2013 03:59
-
-
Save janily/6067978 to your computer and use it in GitHub Desktop.
scroll page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//七行代码实现层随屏幕滚动 | |
$(function(){ | |
var chatbox = $(".chatbox").offset().top; | |
$(window).scroll(function (){ | |
var offsetTop = chatbox + $(window).scrollTop() +"px"; | |
$(".chatbox").animate({top : offsetTop },{ duration:800 , queue:false }); | |
}); | |
}) | |
//鼠标经过图片,其他图片渐隐效果 | |
$(function(){ | |
$(".imglinks").find("a").each(function() { | |
$(this).hover(function(){ | |
$(this).siblings().stop() | |
.fadeTo(500,0.4); | |
}, | |
function(){ | |
$(this).siblings().stop() | |
.fadeTo(500,1); | |
}); | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment