f66e67c679a739fb7f9d969c28ed26b1ee98e1ae.svn-base 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <title></title>
  6. <!--框架必需start-->
  7. <script type="text/javascript" src="../../libs/js/jquery.js"></script>
  8. <script type="text/javascript" src="../../libs/js/language/cn.js"></script>
  9. <script type="text/javascript" src="../../libs/js/framework.js"></script>
  10. <link href="../../libs/css/import_basic.css" rel="stylesheet" type="text/css"/>
  11. <link rel="stylesheet" type="text/css" id="skin" prePath="../../"/>
  12. <link rel="stylesheet" type="text/css" id="customSkin"/>
  13. <!--框架必需end-->
  14. <!--图片滚动可控start-->
  15. <script type="text/javascript" src="../../libs/js/pic/switchable.js"></script>
  16. <script type="text/javascript" src="../../libs/js/pic/switchable.effect.js"></script>
  17. <!--图片滚动可控end-->
  18. <script type="text/javascript">
  19. function initComplete(){
  20. //基本使用
  21. $("#trigger0").switchable("#panel0 > div > img", {
  22. triggerType: "click", /* 触发方式*/
  23. effect: "scroll", /* 滚动效果,也可是fade*/
  24. steps: 3, /* 每次滚动个数*/
  25. visible: 3, /* 可见个数*/
  26. circular: true /* 是否循环*/
  27. })
  28. var api0 = $("#trigger0").switchable();
  29. $("#next0").click(function(){
  30. api0.next();
  31. });
  32. $("#prev0").click(function(){
  33. api0.prev();
  34. });
  35. //自动播放并添加控制按钮
  36. window.api = $("#trigger1").switchable("#panel1 > div > img", {
  37. triggerType: "click",
  38. effect: "scroll",
  39. steps: 3,
  40. visible: 3,
  41. circular: true
  42. }).autoplay({ api: true });
  43. $("#next1").click(function(){
  44. api.next();
  45. });
  46. $("#prev1").click(function(){
  47. api.prev();
  48. });
  49. //末尾不返回
  50. $("#trigger2").switchable("#panel2 > div > img", {
  51. triggerType: "click",
  52. effect: "scroll",
  53. steps: 3,
  54. visible: 3
  55. }).carousel();
  56. var api2 = $("#trigger2").switchable();
  57. $("#next2").click(function(){
  58. api2.next();
  59. });
  60. $("#prev2").click(function(){
  61. api2.prev();
  62. });
  63. //鼠标滚轮控制
  64. $("#trigger3").switchable("#panel3 > div > img", {
  65. triggerType: "click",
  66. effect: "scroll",
  67. steps: 3,
  68. visible: 3
  69. }).mousewheel().carousel();
  70. var api3 = $("#trigger3").switchable();
  71. $("#next3").click(function(){
  72. api3.next();
  73. });
  74. $("#prev3").click(function(){
  75. api3.prev();
  76. });
  77. //自定义显示个数
  78. $("#trigger4").switchable("#panel4 > div > img", {
  79. triggerType: "click",
  80. effect: "scroll",
  81. steps: 4,
  82. visible: 4
  83. }).carousel();
  84. var api4 = $("#trigger4").switchable();
  85. $("#next4").click(function(){
  86. api4.next();
  87. });
  88. $("#prev4").click(function(){
  89. api4.prev();
  90. });
  91. //自动播放
  92. $("#trigger5").switchable("#panel5 > div > img", {
  93. triggerType: "click",
  94. effect: "scroll",
  95. steps: 3,
  96. visible: 3,
  97. circular: true
  98. }).autoplay({ api: true });
  99. };
  100. </script>
  101. </head>
  102. <body>
  103. <div class="box1" style="width: 800px;"><div class="box_topcenter"><div class="box_topleft"><div class="box_topright"></div></div></div><div class="box_middlecenter"><div class="box_middleleft"><div class="box_middleright"><div class="boxContent" style="overflow: visible;">
  104. <fieldset>
  105. <legend>1、基本用法</legend>
  106. <div class="trigger-bar">
  107. <a href="javascript:void(0);" title="下翻" id="next0" class="next"></a>
  108. <a href="javascript:void(0);" title="上翻" id="prev0" class="prev"></a>
  109. <div id="trigger0" class="scrollable-trigger"></div>
  110. </div>
  111. <div id="panel0" class="scrollable-panel">
  112. <div class="clearfix">
  113. <img src="../../libs/images/demo/demo2.jpg" />
  114. <img src="../../libs/images/demo/demo3.jpg" />
  115. <img src="../../libs/images/demo/demo2.jpg" />
  116. <img src="../../libs/images/demo/demo3.jpg" />
  117. <img src="../../libs/images/demo/demo2.jpg" />
  118. <img src="../../libs/images/demo/demo3.jpg" />
  119. <img src="../../libs/images/demo/demo2.jpg" />
  120. <img src="../../libs/images/demo/demo3.jpg" />
  121. <img src="../../libs/images/demo/demo2.jpg" />
  122. </div>
  123. </div>
  124. </fieldset>
  125. <div class="height_15"></div>
  126. <fieldset>
  127. <legend>2、自动播放并添加控制按钮</legend>
  128. <div class="trigger-bar">
  129. <a href="javascript:void(0);" title="下翻" id="next1" class="next"></a>
  130. <a href="javascript:void(0);" title="上翻" id="prev1" class="prev"></a>
  131. <div id="trigger1" class="scrollable-trigger"></div>
  132. </div>
  133. <div id="panel1" class="scrollable-panel">
  134. <div class="clearfix">
  135. <img src="../../libs/images/demo/demo2.jpg" />
  136. <img src="../../libs/images/demo/demo3.jpg" />
  137. <img src="../../libs/images/demo/demo2.jpg" />
  138. <img src="../../libs/images/demo/demo3.jpg" />
  139. <img src="../../libs/images/demo/demo2.jpg" />
  140. <img src="../../libs/images/demo/demo3.jpg" />
  141. <img src="../../libs/images/demo/demo2.jpg" />
  142. <img src="../../libs/images/demo/demo3.jpg" />
  143. <img src="../../libs/images/demo/demo2.jpg" />
  144. </div>
  145. </div>
  146. <div class="ctrl" style="width:437px;">
  147. <input type="button" keepDefaultStyle="true" class="play" onClick="api.play();" title="播放"/>
  148. <input type="button" keepDefaultStyle="true" class="pause" onClick="api.pause();" title="暂停"/>
  149. <input type="button" keepDefaultStyle="true" class="stop" onClick="api.stop();" title="停止"/>
  150. </div>
  151. </fieldset>
  152. <div class="height_15"></div>
  153. <fieldset>
  154. <legend>3、末尾不返回</legend>
  155. <div class="trigger-bar">
  156. <a href="javascript:void(0);" title="下翻" id="next2" class="next"></a>
  157. <a href="javascript:void(0);" title="上翻" id="prev2" class="prev"></a>
  158. <div id="trigger2" class="scrollable-trigger"></div>
  159. </div>
  160. <div id="panel2" class="scrollable-panel">
  161. <div class="clearfix">
  162. <img src="../../libs/images/demo/demo2.jpg" />
  163. <img src="../../libs/images/demo/demo3.jpg" />
  164. <img src="../../libs/images/demo/demo2.jpg" />
  165. <img src="../../libs/images/demo/demo3.jpg" />
  166. <img src="../../libs/images/demo/demo2.jpg" />
  167. <img src="../../libs/images/demo/demo3.jpg" />
  168. <img src="../../libs/images/demo/demo2.jpg" />
  169. <img src="../../libs/images/demo/demo3.jpg" />
  170. <img src="../../libs/images/demo/demo2.jpg" />
  171. </div>
  172. </div>
  173. </fieldset>
  174. <div class="height_15"></div>
  175. <fieldset>
  176. <legend>4、鼠标滚轮控制</legend>
  177. <div class="trigger-bar">
  178. <a href="javascript:void(0);" title="下翻" id="next3" class="next"></a>
  179. <a href="javascript:void(0);" title="上翻" id="prev3" class="prev"></a>
  180. <div id="trigger3" class="scrollable-trigger"></div>
  181. </div>
  182. <div id="panel3" class="scrollable-panel">
  183. <div class="clearfix">
  184. <img src="../../libs/images/demo/demo2.jpg" />
  185. <img src="../../libs/images/demo/demo3.jpg" />
  186. <img src="../../libs/images/demo/demo2.jpg" />
  187. <img src="../../libs/images/demo/demo3.jpg" />
  188. <img src="../../libs/images/demo/demo2.jpg" />
  189. <img src="../../libs/images/demo/demo3.jpg" />
  190. <img src="../../libs/images/demo/demo2.jpg" />
  191. <img src="../../libs/images/demo/demo3.jpg" />
  192. <img src="../../libs/images/demo/demo2.jpg" />
  193. </div>
  194. </div>
  195. </fieldset>
  196. <div class="height_15"></div>
  197. <fieldset>
  198. <legend>5、自定义宽高和显示个数</legend>
  199. <div class="trigger-bar" style="width:750px;">
  200. <a href="javascript:void(0);" title="下翻" id="next4" class="next"></a>
  201. <a href="javascript:void(0);" title="上翻" id="prev4" class="prev"></a>
  202. <div id="trigger4" class="scrollable-trigger"></div>
  203. </div>
  204. <div id="panel4" class="scrollable-panel" style="width:750px;height:110px;">
  205. <div class="clearfix">
  206. <img src="../../libs/images/demo/demo2.jpg" style="width:200px;height:110px;"/>
  207. <img src="../../libs/images/demo/demo3.jpg" style="width:200px;height:110px;"/>
  208. <img src="../../libs/images/demo/demo2.jpg" style="width:200px;height:110px;"/>
  209. <img src="../../libs/images/demo/demo3.jpg" style="width:200px;height:110px;"/>
  210. <img src="../../libs/images/demo/demo2.jpg" style="width:200px;height:110px;"/>
  211. <img src="../../libs/images/demo/demo3.jpg" style="width:200px;height:110px;"/>
  212. <img src="../../libs/images/demo/demo2.jpg" style="width:200px;height:110px;"/>
  213. <img src="../../libs/images/demo/demo3.jpg" style="width:200px;height:110px;"/>
  214. </div>
  215. </div>
  216. </fieldset>
  217. <fieldset>
  218. <legend>6、自动播放</legend>
  219. <div class="trigger-bar" style="display:none;height:0px;overflow:hidden;">
  220. <div id="trigger5" class="scrollable-trigger"></div>
  221. </div>
  222. <div id="panel5" class="scrollable-panel" style="width:750px;height:110px;">
  223. <div class="clearfix">
  224. <img src="../../libs/images/demo/demo2.jpg" style="width:200px;height:110px;"/>
  225. <img src="../../libs/images/demo/demo3.jpg" style="width:200px;height:110px;"/>
  226. <img src="../../libs/images/demo/demo2.jpg" style="width:200px;height:110px;"/>
  227. <img src="../../libs/images/demo/demo3.jpg" style="width:200px;height:110px;"/>
  228. <img src="../../libs/images/demo/demo2.jpg" style="width:200px;height:110px;"/>
  229. <img src="../../libs/images/demo/demo3.jpg" style="width:200px;height:110px;"/>
  230. <img src="../../libs/images/demo/demo2.jpg" style="width:200px;height:110px;"/>
  231. <img src="../../libs/images/demo/demo3.jpg" style="width:200px;height:110px;"/>
  232. </div>
  233. </div>
  234. </fieldset>
  235. </div></div></div></div><div class="box_bottomcenter"><div class="box_bottomleft"><div class="box_bottomright"></div></div></div></div>
  236. </body>
  237. </html>