index.html 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. <title>Jericho TabPanel</title>
  5. <style type="text/css">
  6. body,html{font-size:12px;font-family:Calibri;padding:0;margin:0;background:#7d9edb;} a img{border:0px;}
  7. .functree{margin:0;padding:0;} .functree ul,.functree li{list-style-type:none;margin:0;padding:0;}
  8. .functree li{padding-left:14px;line-height:18px;} .functree span.modules{cursor:pointer;color:#783432;}
  9. .divTop span{padding-left:20px;line-height:70px;font-size:16px;} .divMain{float:left;clear:both;}
  10. .divLeft,.divRight{display:none;float:left;background-color:White;border:double 4px #eee;padding:5px;}
  11. #divMainLoader{position:absolute;top:15px;right:15px;z-index:100;width:80px;height:20px;line-height:20px;background:#EEF3F7 url(../images/smallloader.gif) no-repeat 8px center;border:1px solid #A5B6C8;padding-left:30px;font-family:10px;display:none;}
  12. </style>
  13. <link rel="Stylesheet" href="css/jquery.jerichotab.css" />
  14. <script type="text/javascript" src="../jquery/jquery-3.5.0.min.js"></script>
  15. <script type="text/javascript" src="js/jquery.jerichotab.js"></script>
  16. <script type="text/javascript">
  17. var jericho = {
  18. showLoader: function() {
  19. $('#divMainLoader').css('display', 'block');
  20. },
  21. removeLoader: function() {
  22. $('#divMainLoader').css('display', 'none');
  23. },
  24. buildTree: function() {/*
  25. $('.functree li').each(function() {
  26. if ($(this).is(':has(ul)'))
  27. $(this).addClass('collapse');
  28. if ($(this).next().is('li') || $(this).next().is('ul'))
  29. $(this).css({ borderLeft: 'dashed 1px #dedede' });
  30. })
  31. $('li.collapse>span').click(function() {
  32. $(this).next('ul').slideToggle('fast', function() {
  33. if ($(this).parent().hasClass('collapse'))
  34. $(this).parent().removeClass('collapse').addClass('expand');
  35. else
  36. $(this).parent().removeClass('expand').addClass('collapse');
  37. })
  38. })*/
  39. $('span.func').css({ 'cursor': 'pointer' }).hover(function() {
  40. $(this).css({ 'color': '#3de', 'text-decoration': 'underline' });
  41. }, function() {
  42. $(this).css({ 'color': '#000', 'text-decoration': 'none' });
  43. }).click(function() {
  44. $.fn.jerichoTab.addTab({
  45. tabFirer: $(this),
  46. title: $(this).text(),
  47. //closeable: true,
  48. //iconImg: $(this).attr('iconImg'),
  49. data: {
  50. dataType: $(this).attr('dataType'),
  51. dataLink: $(this).attr('dataLink')
  52. }
  53. }).loadData();
  54. });
  55. },
  56. buildTabpanel: function() {
  57. $.fn.initJerichoTab({
  58. renderTo: '.divRight',
  59. uniqueId: 'myJerichoTab',
  60. contentCss: { 'height': $('.divRight').height() - 50 },
  61. tabs: [{
  62. title: 'JeirchoTab',
  63. closeable: false,
  64. iconImg: 'images/jerichotab.png',
  65. data: { dataType: 'formtag', dataLink: '#tbNews' },
  66. onLoadCompleted: function(h) {
  67. $('<b style="color:red" />').html('The JerichoTab processed in ' + (new Date().getTime() - d1) + ' milliseconds!').appendTo(h);
  68. }
  69. }, {
  70. title: 'ASPX',
  71. closeable: false,
  72. data: { dataType: 'iframe', dataLink: 'a.aspx' }
  73. }],
  74. activeTabIndex: 1,
  75. loadOnce: true
  76. });
  77. }
  78. }
  79. $().ready(function() {
  80. d1 = new Date().getTime();
  81. jericho.showLoader();
  82. var w = $(document).width();
  83. var h = $(document).height();
  84. $('.divLeft').css({ width: 190, height: h - 120, 'display': 'block' });
  85. $('.divRight').css({ width: w - 260, height: h - 120, 'display': 'block', 'margin-left': 7 });
  86. $('#firefoxuser').html(($.browser.mozilla ? 'yes, your browser is Firefox' : 'oh, you are not using Firefox?'));
  87. $('#ieuser').html(($.browser.msie ? 'yes, your browser is Internet Explorer' : 'oh, you are not using Internet Explorer?'));
  88. jericho.buildTree();
  89. jericho.buildTabpanel();
  90. jericho.removeLoader();
  91. })
  92. $(window).resize(function() {
  93. var w = $(document).width();
  94. $('.divRight').css({ width: w - 250 });
  95. })
  96. </script>
  97. </head>
  98. <body>
  99. <div class="divTop">
  100. <span>Jericho TabPanel</span>
  101. </div>
  102. <div class="divMain">
  103. <div class="divLeft">
  104. <ul class="functree">
  105. <li><span class="modules">About</span>
  106. <ul>
  107. <li><span class="func" jerichotabindex="0">JerichoTab</span></li>
  108. </ul>
  109. </li>
  110. <li><span class="modules">Products</span>
  111. <ul>
  112. <li><span class="modules">IM</span>
  113. <ul>
  114. <li><span class="func" dataType='html' dataLink='template/msn.htm' iconImg='images/msn.gif'>MSN</span></li>
  115. <li><span class="func" dataType='html' dataLink='template/skype.htm' iconImg='images/skype.png'>Skype</span></li>
  116. </ul>
  117. </li>
  118. <li><span class="modules" >Browsers</span>
  119. <ul>
  120. <li><span class="func" iconImg='images/firefox.png' dataType='formtag' dataLink='#firefoxuser'>Firefox</span></li>
  121. <li><span class="func" iconImg='images/ie.png' dataType='formtag' dataLink='#ieuser'>Internet Explorer</span></li>
  122. </ul>
  123. </li>
  124. </ul>
  125. </li>
  126. <li><span class="modules">Corporations</span>
  127. <ul>
  128. <li><span class="func" dataType='iframe' dataLink='http://www.g.cn'>Google</span></li>
  129. <li><span class="func" iconImg="images/yahoo.png" dataType="iframe" dataLink="http://www.yahoo.com">Yahoo</span></li>
  130. <li><span class="func" dataType="iframe" dataLink="handler/dataexchange.ashx?action=microsoft">Microsoft</span></li>
  131. </ul>
  132. </li>
  133. <li><span class="modules">News</span>
  134. <ul>
  135. <li><span class="func" iconImg="images/chess.png" dataType="ajax" dataLink="handler/dataexchange.ashx?action=chess">I-go</span></li>
  136. <li><span class="func" iconImg="images/ent.png" dataType="ajax" dataLink="handler/dataexchange.ashx?action=ent">Entertainment</span></li>
  137. <li><span class="func" iconImg="images/whether.png" dataType="ajax" dataLink="handler/dataexchange.ashx?action=whether">Whether</span></li>
  138. </ul>
  139. </li>
  140. <li><span class="modules">Testing...</span>
  141. <ul>
  142. <li><span class="func" iconImg="images/clock.png" dataType='ajax' dataLink='handler/dataexchange.ashx?action=getdatetime'>Get Ticks(AJAX)</span></li>
  143. </ul>
  144. </li>;
  145. </ul>
  146. </div>
  147. <div class="divRight"></div>
  148. </div>
  149. <div id="divMainLoader">Loading...</div>
  150. <b id="firefoxuser" style="display:none"></b>
  151. <b id="ieuser" style="display:none"></b>
  152. <div id="tbNews" style="display:none">
  153. <h4>Wow...just wow!!!</h4>
  154. <p>This plugin is really amazing!</p>
  155. <p>it's light-weight but powerful and perfect</p>
  156. <p>It's easy to use, all the API was opened, you can get them from the remarks that in the head of js file.</p>
  157. <p>JeirchoTab has supported four types of data:</p>
  158. <p>
  159. <ol>
  160. <li>formtag</li>
  161. <li>html</li>
  162. <li>iframe</li>
  163. <li>ajax</li>
  164. </ol>
  165. </p>
  166. <p>You wanna known '<b>How to use it</b>'?</p>
  167. <p>See the demo by yourself!</p>
  168. <p><strong style="color:#7623ee">--jericho</strong><img src="images/china.gif" alt="China" title="China" /></p>
  169. <p><a href="http://www.ajaxplaza.net" target="_blank">http://www.ajaxplaza.net</a></p>
  170. </div>
  171. </body>
  172. </html>