JQUERY代码每句都帮忙翻译一下,谢谢哈
<!--gallerystarterandprettyPhotostarter--><scripttype="text/javascript">jGallery('pit...
<!-- gallery starter and prettyPhoto starter -->
<script type="text/javascript">
jGallery('pitch');
$(document).pngFix();
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
<script type="text/javascript">
$(function() {
var $backToTopTxt = "返回顶部", $backToTopEle = $('<div class="backToTop"></div>').appendTo($("body"))//添加div到body里面
.text($backToTopTxt).attr("title", $backToTopTxt).click(function() {//在添加的div里面添加文本“返回顶部”
$("html, body").animate({ scrollTop: 0 }, 120);
}), $backToTopFun = function() {
var st = $(document).scrollTop(), winh = $(window).height();
(st > 0) ? $backToTopEle.show() : $backToTopEle.hide();
if (!window.XMLHttpRequest) {
$backToTopEle.css("top", st + winh - 166);
}
};
$(window).bind("scroll", $backToTopFun);//跟滚动条事件进行绑定
$(function() { $backToTopFun(); });//执行backToTopFun()方法
});
</script>
<script type="text/javascript">
lastScrollY = 0;
function FloatScroll() {
var diffY;
if (document.documentElement && document.documentElement.scrollTop) {
diffY = document.documentElement.scrollTop;
}
else if (document.body) {
diffY = document.body.scrollTop;
}
else
{ }
percent = .1 * (diffY - lastScrollY);
if (percent > 0) {
percent = Math.ceil(percent);
}
else {
percent = Math.floor(percent);
}
lastScrollY = lastScrollY + percent;
}
$(function() {
$("#divQQbox").hover(
function() {
$(this).stop(true, false);
$(this).animate({ right: 0 }, 300);
},
function() {
$(this).animate({ right: -128 }, 300);
}
)
})
</script> 展开
<script type="text/javascript">
jGallery('pitch');
$(document).pngFix();
$(document).ready(function(){
$("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
<script type="text/javascript">
$(function() {
var $backToTopTxt = "返回顶部", $backToTopEle = $('<div class="backToTop"></div>').appendTo($("body"))//添加div到body里面
.text($backToTopTxt).attr("title", $backToTopTxt).click(function() {//在添加的div里面添加文本“返回顶部”
$("html, body").animate({ scrollTop: 0 }, 120);
}), $backToTopFun = function() {
var st = $(document).scrollTop(), winh = $(window).height();
(st > 0) ? $backToTopEle.show() : $backToTopEle.hide();
if (!window.XMLHttpRequest) {
$backToTopEle.css("top", st + winh - 166);
}
};
$(window).bind("scroll", $backToTopFun);//跟滚动条事件进行绑定
$(function() { $backToTopFun(); });//执行backToTopFun()方法
});
</script>
<script type="text/javascript">
lastScrollY = 0;
function FloatScroll() {
var diffY;
if (document.documentElement && document.documentElement.scrollTop) {
diffY = document.documentElement.scrollTop;
}
else if (document.body) {
diffY = document.body.scrollTop;
}
else
{ }
percent = .1 * (diffY - lastScrollY);
if (percent > 0) {
percent = Math.ceil(percent);
}
else {
percent = Math.floor(percent);
}
lastScrollY = lastScrollY + percent;
}
$(function() {
$("#divQQbox").hover(
function() {
$(this).stop(true, false);
$(this).animate({ right: 0 }, 300);
},
function() {
$(this).animate({ right: -128 }, 300);
}
)
})
</script> 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询