新闻门户网站图集相册JS代码

新闻网站jQuery图集相册代码,支持键盘方向键切换,支持点击图片左右区域切换,支持自动轮播,带缩略图。效果图如下:

新闻门户网站图集相册JS代码_第1张图片

在线预览   源码下载

实现的代码。

html代码:

js代码:

$(function () {
            var prevDiv = $(".Up-tuzu");
            var nextDiv = $(".Next-tuzu");
            if (prevDiv.find("a").length < 1) {
                prevDiv.html("

没有了

"); } if (nextDiv.find("a").length < 1) { nextDiv.html("

没有了

"); } }); var selectKey = "1"; var picList = [{ "picPos": 1, "pid": "1540637", "bigPic": "images/bigPic/1.jpg", "bigPic": "images/bigpic/1.jpg", "thumbPic": "images/thumbPic/1.jpg" }, { "picPos": 2, "pid": "1520876", "bigPic": "images/bigPic/2.jpg", "bigPic": "images/bigPic/2.jpg", "thumbPic": "images/thumbPic/2.jpg" }, { "picPos": 3, "pid": "1520550", "bigPic": "images/bigPic/3.jpg", "bigPic": "images/bigPic/3.jpg", "thumbPic": "images/thumbPic/3.jpg" }, { "picPos": 4, "pid": "1520549", "bigPic": "images/bigPic/4.jpg", "bigPic": "images/bigPic/4.jpg", "thumbPic": "images/thumbPic/4.jpg" }, { "picPos": 5, "pid": "1520548", "bigPic": "images/bigPic/5.jpg", "bigPic": "images/bigPic/5.jpg", "thumbPic": "images/thumbPic/5.jpg" }, { "picPos": 6, "pid": "1520547", "bigPic": "images/bigPic/6.jpg", "bigPic": "images/bigPic/6.jpg", "thumbPic": "images/thumbPic/6.jpg" }, { "picPos": 7, "pid": "1520546", "bigPic": "images/bigPic/7.jpg", "bigPic": "images/bigPic/7.jpg", "thumbPic": "images/thumbPic/7.jpg" }, { "picPos": 8, "pid": "1520545", "bigPic": "images/bigPic/8.jpg", "bigPic": "images/bigPic/8.jpg", "thumbPic": "images/thumbPic/8.jpg" }, { "picPos": 9, "pid": "1520544", "bigPic": "images/bigPic/9.jpg", "bigPic": "images/bigPic/9.jpg", "thumbPic": "images/thumbPic/9.jpg" }, { "picPos": 10, "pid": "1520543", "bigPic": "images/bigPic/10.jpg", "bigPic": "images/bigPic/10.jpg", "thumbPic": "images/thumbPic/10.jpg" }];

via:http://***/Article/35148

你可能感兴趣的:(新闻门户网站图集相册JS代码)