参考代码如下:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title></title>
<script type="text/javascript" language="javascript" src="http://www.codefans.net/ajaxjs/jquery-1.4.2.min.js"></script>
<script type="text/javascript" language="javascript">
$(function() {
$("#right").click(function() {
var roll = $("<div></div>", { css: { position: "absolute", border: "solid 1px #999", left: "806px", top: "10px", height: "494px", width: "1px", background: "#fff"}}).appendTo($("#book").parent())
$(roll).animate({
left: "10px",
width: "398px"
}, 1000, function() {
$("#left").css({"background":"#fff"})
$(roll).fadeOut(300, function() {
$(roll).remove()
})
})
})
})
</script>
</head>
<body style="padding:5pxmargin:0">
<div id="book" style="width:797pxheight:494pxbackground:#cccborder:solid 6px #ccc">
<div id="left" style="width:398pxheight:494pxfloat:leftbackground:url(http://www.codefans.net/jscss/demoimg/201011/PLh.png) no-repeat top leftcursor:pointer"></div>
<div id="right" style="width:398pxheight:494pxfloat:leftbackground:#fffcursor:pointermargin-left:1pxtext-align:right"><p style="margin-top:470pxfont-size:12pxcolor:#999">点这翻页 </p></div>
</div>
</body>
</html>
jquery实现立体式数字滚动条增加效果,代码分为两部分,一部分位html结构另一部分属于js代码段,需要的朋友参考下吧!1、html结构
<div class="numberRun1"></div>
2、js
<script type="text/javascript" src="js/digital_over.js" ></script>//引用 //这是自定义函数(需要在页面中进行调用) <script> //数字滚动function digitalScroll(obj,n){ var numRun = $(obj).numberAnimate({num:n, speed:2000, symbol:","}) var nums = n setInterval(function(){numRun.resetData(nums) },3000) var numWidth= $(obj).width() $(obj).find('.mt-number-animate').css('width',numWidth) $(obj).css('width','100%') $(obj).find('.mt-number-animate').css('margin','0 auto') }window.indexdigitalScroll=function(){ digitalScroll($('.numberRun1'),1160518) } </script> <!--这是在页面中调用的方法--> <script> $(function(){ indexdigitalScroll() }) </script>
3、图片案例
这个需要拿到分页地址的url 然后拼装下里面的page。例如百度搜索的分页为
https:防吞//www.baidu.com/s?wd=input%20email&pn=30这里的分页控制是pn=30。下一页就是pn=40。以百度为例
<input type="text" id="pagenum"/> var page=document.document.getElementById('pagenum').valuewindow.location.href='url到pn='+page+'剩余的部分'