image.png

html

("span.next").click(function(){ //绑定click事件

var

(this).parents("div.v_show");//根据当前点击元素获取到父元素

var

parent.find("div.v_content_list"); //寻找到“视频内容展示区域”

var

parent.find("div.v_content"); //寻找到“视频内容展示区域”外围的DIV元素

var v_width =

v_show.find("li").length;

var page_count = Math.ceil(len / i) ; //只要不是整数,就往大的方向取最小的整数

if( !

v_show.animate({ left : '0px'}, "slow"); //通过改变left值,跳转到第一个版面

page = 1;

}else{

parent.find("span").eq((page-1)).addClass("current").siblings().removeClass("current");

}

});

//往前 按钮

parent =

v_show =

v_content =

v_content.width();

var len =

v_show.is(":animated") ){ //判断“视频内容展示区域”是否正在处于动画

if( page == 1 ){ //已经到第一个版面了,如果再向前,必须跳转到最后一个版面。

v_show.animate({ left : '+='+v_width }, "slow");

page--;

}

$parent.find("span").eq((page-1)).addClass("current").siblings().removeClass("current");

}

});

});

卡通动漫

1234

上一页

下一页

更多>>

  • 海贼王

    播放:28,276
  • 海贼王

    播放:28,276
  • 海贼王

    播放:28,276
  • 海贼王

    播放:28,276
  • 哆啦A梦

    播放:33,326
  • 哆啦A梦

    播放:33,326
  • 哆啦A梦

    播放:33,326
  • 哆啦A梦

    播放:33,326
  • 火影忍者

    播放:28,276
  • 火影忍者

    播放:28,276
  • 火影忍者

    播放:28,276
  • 火影忍者

    播放:28,276
  • 龙珠

    播放 57,865
  • 龙珠

    播放 57,865
  • 龙珠

    播放 57,865
  • 龙珠

    播放 57,865

style.css

{ margin:0; padding:0; word-break:break-all; }

body { background:#FFF; color:#333; font:12px/1.5em Helvetica, Arial, sans-serif; }

h1, h2, h3, h4, h5, h6 { font-size:1em; }

a { color:#2B93D2; text-decoration:none; }

a:hover { color:#E31E1C; text-decoration:underline; }

ul, li { list-style:none; }

fieldset, img { border:none; }

/* v_show style */

.v_show { width:595px; margin:20px 0 1px 60px; }

.v_caption { height:35px; overflow:hidden; background:url(img/btn_cartoon.gif) no-repeat 0 0; }

.v_caption h2 { float:left; width:84px; height:35px; overflow:hidden; background:url(img/btn_cartoon.gif) no-repeat; text-indent:-9999px; }

.v_caption .cartoon { background-position: 0 -100px; }

.v_caption .variety { background-position:-100px -100px; }

.highlight_tip { display:inline; float:left; margin:14px 0 0 10px; }

.highlight_tip span { display:inline; float:left; width:7px; height:7px; overflow:hidden; margin:0 2px; background:url(img/btn_cartoon.gif) no-repeat 0 -320px; text-indent:-9999px; }

.highlight_tip .current { background-position:0 -220px; }

.change_btn { float:left; margin:7px 0 0 10px; }

.change_btn span { display:block; float:left; width:30px; height:23px; overflow:hidden; background:url(img/btn_cartoon.gif) no-repeat; text-indent:-9999px; cursor:pointer; }

.change_btn .prev { background-position:0 -400px; }

.change_btn .next { width:31px; background-position:-30px -400px; }

.v_caption em { display:inline; float:right; margin:10px 12px 0 0; font-family:simsun; }

.v_content { position:relative; width:592px; height:160px; overflow:hidden; border-right:1px solid #E7E7E7; border-bottom:1px solid #E7E7E7; border-left:1px solid #E7E7E7; }

.v_content_list { position:absolute; width:2500px;top:0px; left:0px; }

.v_content ul {float:left;}

.v_content ul li { display:inline; float:left; margin:10px 2px 0; padding:8px; background:url(img/v_bg.gif) no-repeat; }

.v_content ul li a { display:block; width:128px; height:80px; overflow:hidden; }

.v_content ul li img { width:128px; height:96px; }

.v_content ul li h4 { width:128px; height:18px; overflow:hidden; margin-top:12px; font-weight:normal; }

.v_content ul li h4 a { display:inline !important; height:auto !important; }

.v_content ul li span { color:#666; }

.v_content ul li em { color:#888; font-family:Verdana; font-size:0.9em; }

更多推荐

html上一页下一页 jq,jquery 实现分页 前端分页