e735bca8f8b60d0c0a9b264598df8fbef713b479.svn-base 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  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/nav/spliter.js"></script>
  16. <!--分隔条end-->
  17. </head>
  18. <body>
  19. <div class="box1" panelWidth="800">
  20. <fieldset>
  21. <legend>1、关闭上侧-初始时关闭</legend>
  22. <div style="border:solid 1px #cccccc;width:200px;">
  23. <div style="Width:100%;height:50px;" id="content1">
  24. 内容区域1
  25. </div>
  26. <div class="spliter spliterStyleH" beforeClickClass="spliterBottom" afterClickClass="spliterTop"
  27. beforeClickTip="展开" afterClickTip="收缩" targetId="content1" init="hide"></div>
  28. <div style="Width:100%;height:50px;">
  29. 内容区域2
  30. </div>
  31. </div>
  32. </fieldset>
  33. <div class="height_15"></div>
  34. <fieldset>
  35. <legend>2、关闭上侧-初始时打开</legend>
  36. <div style="border:solid 1px #cccccc;width:200px;">
  37. <div style="Width:100%;height:50px;" id="content2">
  38. 内容区域1
  39. </div>
  40. <div class="spliter spliterStyleH" beforeClickClass="spliterTop" afterClickClass="spliterBottom"
  41. beforeClickTip="收缩" afterClickTip="展开" targetId="content2"></div>
  42. <div style="Width:100%;height:50px;">
  43. 内容区域2
  44. </div>
  45. </div>
  46. </fieldset>
  47. <div class="height_15"></div>
  48. <fieldset>
  49. <legend>3、关闭下侧-初始时关闭</legend>
  50. <div style="border:solid 1px #cccccc;width:200px;">
  51. <div style="Width:100%;height:50px;">
  52. 内容区域2
  53. </div>
  54. <div class="spliter spliterStyleH" beforeClickClass="spliterBottom" afterClickClass="spliterTop"
  55. beforeClickTip="展开" afterClickTip="收缩" targetId="content3" init="hide"></div>
  56. <div style="Width:100%;height:50px;" id="content3">
  57. 内容区域1
  58. </div>
  59. </div>
  60. </fieldset>
  61. <div class="height_15"></div>
  62. <fieldset>
  63. <legend>4、关闭下侧-初始时打开</legend>
  64. <div style="border:solid 1px #cccccc;width:200px;">
  65. <div style="Width:100%;height:50px;">
  66. 内容区域2
  67. </div>
  68. <div class="spliter spliterStyleH" beforeClickClass="spliterTop" afterClickClass="spliterBottom"
  69. beforeClickTip="收缩" afterClickTip="展开" targetId="content4"></div>
  70. <div style="Width:100%;height:50px;" id="content4">
  71. 内容区域1
  72. </div>
  73. </div>
  74. </fieldset>
  75. <div class="height_15"></div>
  76. <fieldset>
  77. <legend>5、关闭左侧-初始时关闭</legend>
  78. <table cellpadding="0" cellspacing="0">
  79. <td>
  80. <div style="height:150px;width:100px;border:solid 1px #cccccc;border-right:none;" id="content5">
  81. 内容区域1
  82. </div>
  83. </td>
  84. <td style="border-top:solid 1px #cccccc;border-bottom:solid 1px #cccccc;" class="spliter spliterStyleV" init="hide"
  85. beforeClickClass="spliterRight" afterClickClass="spliterLeft" beforeClickTip="展开" afterClickTip="收缩" targetId="content5"></td>
  86. <td>
  87. <div style="height:150px;width:100px;border:solid 1px #cccccc;border-left:none;">
  88. 内容区域2
  89. </div>
  90. </td>
  91. </table>
  92. </fieldset>
  93. <div class="height_15"></div>
  94. <fieldset>
  95. <legend>6、关闭左侧-初始时打开</legend>
  96. <table cellpadding="0" cellspacing="0">
  97. <td>
  98. <div style="height:150px;width:100px;border:solid 1px #cccccc;border-right:none;" id="content6">
  99. 内容区域
  100. </div>
  101. </td>
  102. <td style="border-top:solid 1px #cccccc;border-bottom:solid 1px #cccccc;" class="spliter spliterStyleV"
  103. beforeClickClass="spliterLeft" afterClickClass="spliterRight" beforeClickTip="收缩" afterClickTip="展开" targetId="content6"></td>
  104. <td>
  105. <div style="height:150px;width:100px;border:solid 1px #cccccc;border-left:none;">
  106. 内容区域2
  107. </div>
  108. </td>
  109. </table>
  110. </fieldset>
  111. <div class="height_15"></div>
  112. <fieldset>
  113. <legend>7、关闭右侧-初始时关闭</legend>
  114. <table cellpadding="0" cellspacing="0">
  115. <td>
  116. <div style="height:150px;width:100px;border:solid 1px #cccccc;border-right:none;">
  117. 内容区域1
  118. </div>
  119. </td>
  120. <td style="border-top:solid 1px #cccccc;border-bottom:solid 1px #cccccc;" class="spliter spliterStyleV" init="hide"
  121. beforeClickClass="spliterRight" afterClickClass="spliterLeft" beforeClickTip="展开" afterClickTip="收缩" targetId="content7"></td>
  122. <td>
  123. <div style="height:150px;width:100px;border:solid 1px #cccccc;border-left:none;" id="content7">
  124. 内容区域2
  125. </div>
  126. </td>
  127. </table>
  128. </fieldset>
  129. <div class="height_15"></div>
  130. <fieldset>
  131. <legend>8、关闭右侧-初始时打开</legend>
  132. <table cellpadding="0" cellspacing="0">
  133. <td>
  134. <div style="height:150px;width:100px;border:solid 1px #cccccc;border-right:none;">
  135. 内容区域
  136. </div>
  137. </td>
  138. <td style="border-top:solid 1px #cccccc;border-bottom:solid 1px #cccccc;" class="spliter spliterStyleV"
  139. beforeClickClass="spliterLeft" afterClickClass="spliterRight" beforeClickTip="收缩" afterClickTip="展开" targetId="content8"></td>
  140. <td>
  141. <div style="height:150px;width:100px;border:solid 1px #cccccc;border-left:none;" id="content8">
  142. 内容区域2
  143. </div>
  144. </td>
  145. </table>
  146. </fieldset>
  147. <div class="height_15"></div>
  148. <fieldset>
  149. <legend>9、外部控制</legend>
  150. <div style="border:solid 1px #cccccc;width:200px;">
  151. <div style="Width:100%;height:50px;" id="content9">
  152. 内容区域1
  153. </div>
  154. <div class="spliter spliterStyleH" beforeClickClass="spliterTop" afterClickClass="spliterBottom"
  155. beforeClickTip="收缩" afterClickTip="展开" targetId="content9" id="spliter-9"></div>
  156. <div style="Width:100%;height:50px;">
  157. 内容区域2
  158. </div>
  159. </div>
  160. <br/>
  161. <input type="button" value="点击切换区域状态" onclick="btnClick1()"/><br/><br/>
  162. <input type="button" value="得到区域状态" onclick="btnClick2()"/><br/><br/>
  163. <input type="button" value="点击展开" onclick="btnClick3()"/><br/><br/>
  164. <input type="button" value="点击收缩" onclick="btnClick4()"/>
  165. </fieldset>
  166. <div class="height_15"></div>
  167. <fieldset>
  168. <legend>10、动态创建</legend>
  169. <input type="button" value="点击创建" id="testBtn" onclick="createSpliter()"/>
  170. </fieldset>
  171. <div class="height_15"></div>
  172. <fieldset>
  173. <legend>11、事件</legend>
  174. <div style="border:solid 1px #cccccc;width:200px;">
  175. <div style="Width:100%;height:50px;" id="content11">
  176. 内容区域1
  177. </div>
  178. <div id="spliter-11" class="spliter spliterStyleH" beforeClickClass="spliterBottom" afterClickClass="spliterTop"
  179. beforeClickTip="展开" afterClickTip="收缩" targetId="content11" init="hide"></div>
  180. <div style="Width:100%;height:50px;">
  181. 内容区域2
  182. </div>
  183. </div>
  184. </fieldset>
  185. <div class="height_15"></div>
  186. </div>
  187. <script type="text/javascript">
  188. function initComplete(){
  189. $("#spliter-11").bind("stateChange",function(e,state){
  190. alert(state);
  191. });
  192. }
  193. //切换状态
  194. function btnClick1(){
  195. $("#spliter-9").spliterChangeState();
  196. }
  197. //获取状态
  198. function btnClick2(){
  199. alert($("#spliter-9").spliterGetState());
  200. }
  201. //展开
  202. function btnClick3(){
  203. $("#spliter-9").spliterOpen();
  204. }
  205. //收缩
  206. function btnClick4(){
  207. $("#spliter-9").spliterClose();
  208. }
  209. function createSpliter(){
  210. var $spliter=$('<div style="border:solid 1px #cccccc;width:200px;">'+
  211. '<div style="Width:100%;height:50px;" id="content10">'+
  212. '内容区域1'+
  213. '</div>'+
  214. '<div class="spliter spliterStyleH" beforeClickClass="spliterTop" afterClickClass="spliterBottom" beforeClickTip="收缩" afterClickTip="展开" targetId="content10"></div>'+
  215. '<div style="Width:100%;height:50px;">'+
  216. '内容区域2'+
  217. '</div>'+
  218. '</div>');
  219. $("#testBtn").after($spliter);
  220. $spliter.find(".spliter").render();
  221. }
  222. </script>
  223. </body>
  224. </html>