手册网
参考手册
在线工具
在线文档
在线代码
素材大全
推荐
导航
在线手册 »
WEB优质项目
开放平台
工具软件
CSS3.0中文手册
jQuery 1.8 参考手册
HTML4参考手册
HTML基础手册
HTML快速参考手册
MySQL5.1中文参考手册
JavaScript参考手册
Delphi6函数大全
Delphi7参考手册
SQL基础教程
jQuery 1.10 中文参考手册
CSS2 参考手册
ASP参考手册
C/C++中文手册
django中文教程
DOS命令大全
jQueryEasyUI1.3中文手册
Hibernate3.2中文参考文档
Html4.01参考手册
JAVA学习笔记
JSP中文教程
Linux参考手册
Lua5参考手册
Oracle参考手册
Phpcmsv9二次开发手册
phpwind二次开发手册
PostgreSQL参考手册
Python2中文手册
Spring2.5中文参考手册
XML参考手册
正则表达式参考手册
jQuery 1.11.3 中文参考手册
ThinkPHP3.2.2完全开发手册
ThinkPHP3.2.3完全开发手册
yii1和php5开发
ThinkPHP5.0完全开发手册
jQuery 3.1 参考手册
Underscore1.8.3 参考手册
Swift3 中文手册
Sass 3.4.21 中文手册
Backbone.js 1.1.2 API中文文档
JSDoc 参考手册
Webpack 2.2 中文文档
JavaScript 全栈教程
Nginx 中文官方手册
CSS4.2.4 参考手册
ThinkPHP5.1完全开发手册.CHM
HTML/CSS »
Html
Bootstrap
HTML5
CSS
CSS3
Foundation
JavaScript »
JavaScript
jQuery
HTML DOM
AngularJS
jQuery UI
jQuery EasyUI
Node.js
JSON
Highcharts
AJAX
React
jQuery插件大全
AlloyUI
Vue.js v2.0 中文
Vuex
vue-router
Underscore.js
Zepto.js
程序设计 »
PHP
Java
JSP
Python
Python3
Django
Linux
Ruby
C
C++
Servlet
Lua
Go
设计模式
正则表达式
ASP
AppML
VBScript
Scala
数据库 »
SQL
MySQL
SQLite
MongoDB
Redis
Memcached
移动端 »
jQuery Mobile
Android
ionic
IOS
Sencha Touch
Clouda+
efe
Frozen UI
Amaze UI
CardKit
App.js
Mobile Angular UI
Kendo UI
PhoneGap
Framework7
Junior
Jingle
mui
SUI Mobile
ReactNative
Weex
APICloud
Wex5
Ratchet
HTML5plus
Plane UI
Swift 教程
XML 教程 »
XML
DTD
XML DOM
XSLT
XPath
XQuery
XLink
XML Schema
XSLFO
SVG
ASP.NET »
ASP.NET
C#
开发工具 »
Eclipse
Git
Firebug
SVN 教程
Chrome 控制台
开源项目 »
Yii中文参考手册
Yii1开发教程
Yii2开发教程
ThinkPHP3.1开发教程
ThinkPHP3.2.3开发教程
地图开发
Wordpress
Laravel中文文档
Web Service »
Web Service 教程
WSDL 教程
SOAP 教程
RDF 教程
RSS 教程
转码工具 »
HTML/JavaScript格式化
CSS 格式化/压缩
JS格式化/加密/压缩
Native互换Unicode大全
日期格式化工具
Markdown转HTML
CSS 整理压缩
JSON 在线解析
短网址生成
代码处理 »
进制互换大全
16进制互换RGB
简体转繁体
汉字转拼音
小写转大写
大写转小写
加密和解密
繁体转简体
实用工具 »
Bootstrap图标定制
CSS 颜色选择器
字数统计
正则表达式测试
htpasswd 生成器
全世界数据库
IP归属地查询
实用计算器
生成二维码
ICO图标制作
CSS3 气泡对话框
CSS & JS Hack 大全
CSS3 背景渐变色生成器
CSS3 阴影边框生成器
CSS3 动画工具
Web 常用字体演示
CSS3 选择器演示
CSS 中文字体 Unicode 编码表
CSS3 GitHub Buttons
CSS Webkit 自定义滚动条样式
在线自动分词
ionic图标
阿里巴巴矢量图标库
IcoMoon 图标库
CSS3 代码生成
CSS3 Flexbox 演示
便民工具 »
快递查询
安全期计算器
周公解梦
笑话大全
常用对照表 »
HTTP Content-type 详细对照表
HTML特殊转义字符对照表
ASCII对照表
HTTP状态码详解
运算符优先级
TCP/UDP常见端口参考
经典小游戏 »
像素小鸟
爱消除
飞更高
俄罗斯方块
台球
贪吃蛇
拼图魔方
坦克大战
解救公主
中国象棋
压扁小鸟
打飞字
Flappy小鸟
登陆
实例代码
“Ctrl+/”
提示
“F11/ESC”
全屏
返回
格式化
恢复
运行
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <title>Cufon圆形缩略图焦点图轮播插件</title> <link rel="stylesheet" href="/api/jq/5733e3208a486/css/style.css" type="text/css" media="screen"/> <script src="/api/jq/5733e3208a486/js/cufon-yui.js" type="text/javascript"></script> <script src="/api/jq/5733e3208a486/js/ChunkFive_400.font.js" type="text/javascript"></script> </head> <body> <div class="top_menu" id="top_menu"> <span id="description" class="description"></span> <a id="back" href="#" class="back"><span></span>back</a> <div class="info"> <span class="album_info">Album 1</span> <span class="image_info"> / Shot 1</span> </div> </div> <div id="loader" class="loader"></div> <div class="header" id="header" style="top:-90px;"><!--top 30 px to show--> <h1>手册网<span>jQuery图片画廊插件</span></h1> </div> <div id="thumbnails_wrapper" class="thumbnails_wrapper" style="top:-255px;"><!--top 110 px to show--> <div id="tshf_container1" class="tshf_container"> <div class="thumbScroller"> <div class="container"> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/18.jpg" alt="PHP+tcpdf演示65种生成PDF文档的实例" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/18.jpg" alt="Makedown在线预览编辑器" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/12.jpg" alt="jQuery背景可滑动的导航菜单" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/23.jpg" alt="php判断当前浏览器类型" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/18.jpg" alt="两款不同的placeholder插件" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/15.jpg" alt="Highcharts折线图" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/5.jpg" alt="PHP简单漂亮的分页类" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/9.jpg" alt="PHP+Mysql+jQuery统计文件下载次数" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/5.jpg" alt="slick淡入淡出的焦点图" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/19.jpg" alt="BreakingNews演示3种间歇滚动效果" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/6.jpg" alt="owlCarousel足球世界杯焦点轮播效果" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/10.jpg" alt="tabslet制作世界杯时间轴幻灯片" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/17.jpg" alt="selectordie演示11种美化下拉框select方法" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/3.jpg" alt="OwlCarousel演示10种不同的调用方法" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/11.jpg" alt="anoSlide演示8种焦点图轮播效果" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/17.jpg" alt="OwlCarousel足球世界杯轮播效果" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/20.jpg" alt="Flickerplate演示5种幻灯片轮播效果" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/5.jpg" alt="simpleGal小图切换大图插件" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/9.jpg" alt="jquery.toggle-password显示密码插件" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/24.jpg" alt="Covering-Bad演示5种图片对比效果" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/12.jpg" alt="jQuery+Orbit实现电影幻灯片效果" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/11.jpg" alt="jqueryrotate演示7种不同的旋转效果" class="thumb" /> </a> <span> </span> </div> </div> <div class="content"> <div> <a href="#" target="_blank"> <img src="/api/jq/5733e3208a486/images/albums/album1/thumbs/10.jpg" alt="least.js响应式画廊插件演示" class="thumb" /> </a> <span> </span> </div> </div> </div> </div> </div> </div> <div class="bubble"> <img id="bubble" src="/api/jq/5733e3208a486/images/bubble.png" alt=""/> </div> <div id="preview" class="preview"> <a id="prev_image" href="#" class="prev_image"></a> <a id="next_image" href="#" class="next_image"></a> </div> <!-- The JavaScript --> <script type="text/javascript" src="http://libs.useso.com/js/jquery/1.4.3/jquery.min.js"></script> <script type="text/javascript" src="/api/jq/5733e3208a486/js/jquery.easing.1.3.js"></script> <script type="text/javascript" src="/api/jq/5733e3208a486/js/jquery.thumbnailScroller.js"></script> <script type="text/javascript"> $(window).load(function() { //caching some elements var $thumbnails_wrapper = $('#thumbnails_wrapper'), $thumbs = $thumbnails_wrapper.find('.tshf_container').find('.content'), $top_menu = $('#top_menu'), $header = $('#header'), $bubble = $('#bubble'), $loader = $('#loader'), $preview = $('#preview'), $thumb_images = $thumbnails_wrapper.find('img'), total_thumbs = $thumb_images.length, $next_img = $('#next_image'), $prev_img = $('#prev_image'), $back = $('#back'), $description = $('#description'), //current album and current photo //(indexes of the tshf_container and content elements) currentAlbum = -1, currentPhoto = -1; //show the loading image until we //preload all the thumb images $loader.show(); //show the main menu and thumbs menu openPhotoAlbums(); function openPhotoAlbums() { //preload all the thumb images var cnt_loaded = 0; $thumb_images.each(function() { var $thumb = $(this); var image_src = $thumb.attr('src'); $('<img/>').load(function() { ++cnt_loaded; if (cnt_loaded == total_thumbs) { $loader.hide(); createThumbnailScroller(); //show the main menu and thumbs menu $header.stop() .animate({'top': '30px'}, 700, 'easeOutBack'); $thumbnails_wrapper.stop() .animate({'top': '110px'}, 700, 'easeOutBack'); } }).attr('src', image_src); }); } //thumb click event $thumbs.bind('click', function(e) { //show loading image $loader.show(); var $thumb = $(this), //source of the corresponding large image img_src = $thumb.find('img.thumb') .attr('src') .replace('/thumbs', ''); //track the current album / photo currentPhoto = $thumb.index(), currentAlbum = $thumb.closest('.tshf_container') .index(); //displays the current album and current photo updateInfo(currentAlbum, currentPhoto); //preload the large image $('<img/>').load(function() { var $this = $(this); //record the size that the large image //should have when it is shown saveFinalPositions($this); //margin_circle is the diameter for the //bubble image var w_w = $(window).width(), w_h = $(window).height(), margin_circle = w_w + w_w / 3; if (w_h > w_w) margin_circle = w_h + w_h / 3; //the image will be positioned on the center, //with width and height of 0px $this.css({ 'width': '0px', 'height': '0px', 'marginTop': w_h / 2 + 'px', 'marginLeft': w_w / 2 + 'px' }); $preview.append($this); //hide the header $header.stop().animate({'top': '-90px'}, 400, function() { $loader.hide(); //show the top menu with the back button, //and current album/picture info $top_menu.stop() .animate({'top': '0px'}, 400, 'easeOutBack'); //animate the bubble image $bubble.stop().animate({ 'width': margin_circle + 'px', 'height': margin_circle + 'px', 'marginTop': -margin_circle / 2 + 'px', 'marginLeft': -margin_circle / 2 + 'px' }, 700, function() { //solve resize problem $('BODY').css('background', '#FFD800'); }); //after 200ms animate the large image //and show the navigation buttons setTimeout(function() { var final_w = $this.data('width'), final_h = $this.data('height'); $this.stop().animate({ 'width': final_w + 'px', 'height': final_h + 'px', 'marginTop': w_h / 2 - final_h / 2 + 'px', 'marginLeft': w_w / 2 - final_w / 2 + 'px' }, 700, showNav); //show the description $description.html($thumb.find('img.thumb').attr('alt')); }, 200); }); //hide the thumbs $thumbnails_wrapper.stop() .animate({ 'top': w_h + 'px' }, 400, function() { //solve resize problem $(this).hide(); }); }).attr('src', img_src); }); //next button click event $next_img.bind('click', function() { //increment the currentPhoto ++currentPhoto; //current album: var $album = $thumbnails_wrapper.find('.tshf_container') .eq(currentAlbum), //the next element / thumb to show $next = $album.find('.content').eq(currentPhoto), $current = $preview.find('img'); if ($next.length == 0 || $current.is(':animated')) { --currentPhoto; return false; } else { $loader.show(); updateInfo(currentAlbum, currentPhoto); //preload the large image var img_src = $next.find('img.thumb') .attr('src') .replace('/thumbs', ''), w_w = $(window).width(), w_h = $(window).height(); $('<img/>').load(function() { var $this = $(this); //record the size that the large image //should have when it is shown saveFinalPositions($this); $loader.hide(); $current.stop() .animate({'marginLeft': '-' + ($current.width() + 20) + 'px'}, 500, function() { //the current image gets removed $(this).remove(); }); //the new image will be positioned on the center, //with width and height of 0px $this.css({ 'width': '0px', 'height': '0px', 'marginTop': w_h / 2 + 'px', 'marginLeft': w_w / 2 + 'px' }); $preview.prepend($this); var final_w = $this.data('width'), final_h = $this.data('height'); $this.stop().animate({ 'width': final_w + 'px', 'height': final_h + 'px', 'marginTop': w_h / 2 - final_h / 2 + 'px', 'marginLeft': w_w / 2 - final_w / 2 + 'px' }, 700); //show the description $description.html($next.find('img.thumb').attr('alt')); }).attr('src', img_src); } }); //previous button click event $prev_img.bind('click', function() { --currentPhoto; //current album: var $album = $thumbnails_wrapper.find('.tshf_container') .eq(currentAlbum), $prev = $album.find('.content').eq(currentPhoto), $current = $preview.find('img'); if ($prev.length == 0 || $current.is(':animated') || currentPhoto < 0) { ++currentPhoto; return false; } else { $loader.show(); updateInfo(currentAlbum, currentPhoto); //preload the large image var img_src = $prev.find('img.thumb') .attr('src') .replace('/thumbs', ''), w_w = $(window).width(), w_h = $(window).height(); $('<img/>').load(function() { var $this = $(this); //record the size that the large image //should have when it is shown saveFinalPositions($this); $loader.hide(); $current.stop() .animate({'marginLeft': (w_w + 20) + 'px'}, 500, function() { //the current image gets removed $(this).remove(); }); //the new image will be positioned on the center, //with width and height of 0px $this.css({ 'width': '0px', 'height': '0px', 'marginTop': w_h / 2 + 'px', 'marginLeft': w_w / 2 + 'px' }); $preview.append($this); var final_w = $this.data('width'), final_h = $this.data('height'); $this.stop().animate({ 'width': final_w + 'px', 'height': final_h + 'px', 'marginTop': w_h / 2 - final_h / 2 + 'px', 'marginLeft': w_w / 2 - final_w / 2 + 'px' }, 700); //show the description $description.html($prev.find('img.thumb').attr('alt')); }).attr('src', img_src); } }); //on window resize we recalculate the sizes of the current image $(window).resize(function() { var $current = $preview.find('img'), w_w = $(window).width(), w_h = $(window).height(); if ($current.length > 0) { saveFinalPositions($current); var final_w = $current.data('width'), final_h = $current.data('height'); $current.css({ 'width': final_w + 'px', 'height': final_h + 'px', 'marginTop': w_h / 2 - final_h / 2 + 'px', 'marginLeft': w_w / 2 - final_w / 2 + 'px' }); } }); //back button click event $back.bind('click', closePreview) //shows the navigation buttons function showNav() { $next_img.stop().animate({ 'right': '10px' }, 300); $prev_img.stop().animate({ 'left': '10px' }, 300); } //hides the navigation buttons function hideNav() { $next_img.stop().animate({ 'right': '-50px' }, 300); $prev_img.stop().animate({ 'left': '-50px' }, 300); } //updates the current album and current photo info function updateInfo(album, photo) { $top_menu.find('.album_info') .html('Album ' + (album + 1)) .end() .find('.image_info') .html(' / Shot ' + (photo + 1)) } //calculates the final width and height //of an image about to expand //based on the window size function saveFinalPositions($image) { var theImage = new Image(); theImage.src = $image.attr("src"); var imgwidth = theImage.width; var imgheight = theImage.height; //140 is 2*60 of next/previous buttons plus 20 of extra margin var containerwidth = $(window).width() - 140; //150 is 30 of header + 30 of footer + extra 90 var containerheight = $(window).height() - 150; if (imgwidth > containerwidth) { var newwidth = containerwidth; var ratio = imgwidth / containerwidth; var newheight = imgheight / ratio; if (newheight > containerheight) { var newnewheight = containerheight; var newratio = newheight / containerheight; var newnewwidth = newwidth / newratio; theImage.width = newnewwidth; theImage.height = newnewheight; } else { theImage.width = newwidth; theImage.height = newheight; } } else if (imgheight > containerheight) { var newheight = containerheight; var ratio = imgheight / containerheight; var newwidth = imgwidth / ratio; if (newwidth > containerwidth) { var newnewwidth = containerwidth; var newratio = newwidth / containerwidth; var newnewheight = newheight / newratio; theImage.height = newnewheight; theImage.width = newnewwidth; } else { theImage.width = newwidth; theImage.height = newheight; } } $image.data({'width': theImage.width, 'height': theImage.height}); } //triggered when user clicks the back button. //hides the current image and the bubble image, //and shows the main menu and the thumbs function closePreview() { var $current = $preview.find('img'), w_w = $(window).width(), w_h = $(window).height(), margin_circle = w_w + w_w / 3; if (w_h > w_w) margin_circle = w_h + w_h / 3; if ($current.is(':animated')) return false; //hide the navigation hideNav(); //hide the topmenu $top_menu.stop() .animate({'top': '-30px'}, 400, 'easeOutBack'); //hide the image $current.stop().animate({ 'width': '0px', 'height': '0px', 'marginTop': w_h / 2 + 'px', 'marginLeft': w_w / 2 + 'px' }, 700, function() { $(this).remove(); }); //animate the bubble image //first set the positions correctly - //it could have changed on a window resize setTimeout(function() { $bubble.css({ 'width': margin_circle + 'px', 'height': margin_circle + 'px', 'margin-top': -margin_circle / 2 + 'px', 'margin-left': -margin_circle / 2 + 'px' }); $('BODY').css('background', 'url("bg.jpg") repeat scroll left top #222222'); $bubble.animate({ 'width': '0px', 'height': '0px', 'marginTop': '0px', 'marginLeft': '0px' }, 500); }, 200); setTimeout(function() { $header.stop() .animate({'top': '30px'}, 700, 'easeOutBack'); $thumbnails_wrapper.stop() .show() .animate({'top': '110px'}, 700, 'easeOutBack'); }, 600); } //builds the scrollers for the thumbs //done by Manos //(http://manos.malihu.gr/jquery-thumbnail-scroller) function createThumbnailScroller() { /* ThumbnailScroller function parameters: 1) id of the container (div id) 2) thumbnail scroller type. Values: "horizontal", "vertical" 3) first and last thumbnail margin (for better cursor interaction) 4) scroll easing amount (0 for no easing) 5) scroll easing type 6) thumbnails default opacity 7) thumbnails mouseover fade speed (in milliseconds) */ ThumbnailScroller("tshf_container1", "horizontal", 10, 800, "easeOutCirc", 0.5, 300); //ThumbnailScroller("tshf_container2","horizontal",10,800,"easeOutCirc",0.5,300); //ThumbnailScroller("tshf_container3","horizontal",10,800,"easeOutCirc",0.5,300); } }); </script> </body> </html>