Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initial commit

  • Loading branch information...
commit 51c7ca4a70940f8bae1206b52aae1b9ca1086bfc 0 parents
@jdsharp authored
Showing with 81,811 additions and 0 deletions.
  1. +4 −0 .htaccess
  2. +40 −0 examples/02/2.1.html
  3. +57 −0 examples/02/2.2.html
  4. +37 −0 examples/02/2.3.1.html
  5. +25 −0 examples/02/2.3.html
  6. +26 −0 examples/02/2.4.html
  7. +47 −0 examples/02/2.5.html
  8. +36 −0 examples/02/2.6.html
  9. +34 −0 examples/02/2.7.html
  10. +46 −0 examples/02/2.8.html
  11. +29 −0 examples/02/2.9.html
  12. BIN  examples/02/images/2.8/beach1.jpg
  13. BIN  examples/02/images/2.8/beach2.jpg
  14. BIN  examples/02/images/2.8/beach3.jpg
  15. BIN  examples/02/screenshots/2.1.png
  16. BIN  examples/02/screenshots/2.2.png
  17. BIN  examples/02/screenshots/2.3.1.png
  18. BIN  examples/02/screenshots/2.3.png
  19. BIN  examples/02/screenshots/2.4.png
  20. BIN  examples/02/screenshots/2.5.png
  21. BIN  examples/02/screenshots/2.6.png
  22. BIN  examples/02/screenshots/2.7.png
  23. BIN  examples/02/screenshots/2.9.png
  24. +28 −0 examples/02/scripts/2.8/jquery.cycle.all.min.js
  25. +16 −0 examples/03/3.1-browser.html
  26. +16 −0 examples/03/3.2-each.html
  27. +15 −0 examples/03/3.3-grep.html
  28. +15 −0 examples/03/3.4-map.html
  29. +15 −0 examples/03/3.5-merge.html
  30. +15 −0 examples/03/3.6-unique.html
  31. +15 −0 examples/03/3.7-isfunction.html
  32. +16 −0 examples/03/3.8-trim.html
  33. +17 −0 examples/03/3.9-data-time.html
  34. +15 −0 examples/03/3.9-data.html
  35. BIN  examples/03/browser-back.gif
  36. +17 −0 examples/03/browser.css
  37. +19 −0 examples/03/browser.js
  38. +17 −0 examples/03/data-time.js
  39. +9 −0 examples/03/data.js
  40. +17 −0 examples/03/each.js
  41. +10 −0 examples/03/grep.js
  42. +19 −0 examples/03/isfunction.js
  43. +9 −0 examples/03/map.js
  44. +9 −0 examples/03/merge.js
  45. +8 −0 examples/03/trim.js
  46. +30 −0 examples/04/add.html
  47. +103 −0 examples/04/cache-your-objects.html
  48. +150 −0 examples/04/cache-your-objects.js
  49. +71 −0 examples/04/fastest-table-in-the-west.html
  50. +66 −0 examples/04/format-your-jquery-chains.html
  51. +62 −0 examples/04/good-composers-borrow.html
  52. +136 −0 examples/04/make-your-pages-accessible.html
  53. +99 −0 examples/04/names/city.suffixes
  54. +40,000 −0 examples/04/names/dist.all.last
  55. +4,275 −0 examples/04/names/dist.female.first
  56. +1,219 −0 examples/04/names/dist.male.first
  57. +85 −0 examples/04/names/makenames.rb
  58. +1 −0  examples/04/names/names-10.json
  59. +83 −0 examples/04/names/names-10.xml
  60. +1 −0  examples/04/names/names-100.json
  61. +803 −0 examples/04/names/names-100.xml
  62. +1 −0  examples/04/names/names-1000.json
  63. +8,003 −0 examples/04/names/names-1000.xml
  64. +19 −0 examples/04/names/readme.txt
  65. +102 −0 examples/04/names/street.suffixes
  66. +48 −0 examples/04/progressive-enhancement-with-jquery.html
  67. +180 −0 examples/04/remove-redundant-repetition.html
  68. +60 −0 examples/04/slowest-table-in-the-west.html
  69. +11 −0 examples/04/style.css
  70. +133 −0 examples/04/toggle-an-attribute.html
  71. +89 −0 examples/04/tools.js
  72. +94 −0 examples/04/whats-wrong-with-this.html
  73. +138 −0 examples/04/write-a-custom-iterator.html
  74. +55 −0 examples/04/write-unobtrusive-javascript.html
  75. +15 −0 examples/05/5.1.html
  76. +7 −0 examples/05/5.1.js
  77. +25 −0 examples/05/5.2.html
  78. +26 −0 examples/05/5.2.js
  79. +24 −0 examples/05/5.3-a.html
  80. +31 −0 examples/05/5.3-a.js
  81. +19 −0 examples/05/5.3-b.html
  82. +31 −0 examples/05/5.3-b.js
  83. +26 −0 examples/05/5.4-a.html
  84. +7 −0 examples/05/5.4-a.js
  85. +36 −0 examples/05/5.4-b.html
  86. +15 −0 examples/05/5.4-b.js
  87. +21 −0 examples/05/5.5-a.html
  88. +26 −0 examples/05/5.5-a.js
  89. +21 −0 examples/05/5.5-b.html
  90. +26 −0 examples/05/5.5-b.js
  91. +21 −0 examples/05/5.5-c.html
  92. +70 −0 examples/05/5.5-c.js
  93. +25 −0 examples/05/5.6.html
  94. +15 −0 examples/05/5.6.js
  95. +23 −0 examples/05/5.7-a.html
  96. +24 −0 examples/05/5.7-a.js
  97. +29 −0 examples/05/5.8-a.html
  98. +12 −0 examples/05/5.8-a.js
  99. +29 −0 examples/05/5.8-b.html
  100. +12 −0 examples/05/5.8-b.js
  101. +25 −0 examples/05/5.9-a.html
  102. +20 −0 examples/05/5.9-a.js
  103. +19 −0 examples/05/5.9-b.html
  104. +20 −0 examples/05/5.9-b.js
  105. +22 −0 examples/05/5.9-c.html
  106. +31 −0 examples/05/5.9-c.js
  107. BIN  examples/05/images/5_1.jpg
  108. BIN  examples/05/images/5_2.jpg
  109. +3 −0  examples/05/size-large.css
  110. +3 −0  examples/05/size-small.css
  111. +25 −0 examples/05/your-css.css
  112. +57 −0 examples/06/ch6-1.html
  113. +38 −0 examples/06/ch6-10.html
  114. +54 −0 examples/06/ch6-2.html
  115. +85 −0 examples/06/ch6-3.html
  116. +30 −0 examples/06/ch6-4.html
  117. +53 −0 examples/06/ch6-5.html
  118. +48 −0 examples/06/ch6-6.html
  119. +33 −0 examples/06/ch6-7.html
  120. +36 −0 examples/06/ch6-8.html
  121. +27 −0 examples/06/ch6-9.html
  122. +119 −0 examples/06/ch6.js
  123. +164 −0 examples/06/chapter6-complete.html
  124. +196 −0 examples/06/chapter6.css
  125. BIN  examples/06/images/blue.png
  126. BIN  examples/06/images/green.png
  127. BIN  examples/06/images/red.png
  128. +23 −0 examples/06/index.html
  129. +4,376 −0 examples/06/jquery-latest.js
  130. +149 −0 examples/06/jquery-ui-1.7.1.custom.min.js
  131. +205 −0 examples/06/jquery.easing.1.3.js
  132. +20 −0 examples/07/01/index.html
  133. +51 −0 examples/07/02/index.html
  134. +1 −0  examples/07/02/style.css
  135. +31 −0 examples/07/03/index.html
  136. +50 −0 examples/07/04/index.html
  137. +1 −0  examples/07/jquery.log.js
  138. +58 −0 examples/08/01/index.html
  139. +7 −0 examples/08/01/try-document.ready.js
  140. +36 −0 examples/08/02/index.html
  141. +1 −0  examples/08/02/jquery.listener.js
  142. +36 −0 examples/08/03/index.html
  143. +1 −0  examples/08/03/jquery.selected.event.js
  144. +1 −0  examples/08/03/style.css
  145. BIN  examples/08/05/1.jpg
  146. BIN  examples/08/05/2.jpg
  147. BIN  examples/08/05/3.jpg
  148. BIN  examples/08/05/4.jpg
  149. +45 −0 examples/08/05/index.html
  150. +1 −0  examples/08/05/jquery.slideshow.js
  151. BIN  examples/08/05/next.png
  152. BIN  examples/08/05/prev.png
  153. +1 −0  examples/08/05/style.css
  154. +33 −0 examples/08/06/index.html
  155. +1 −0  examples/08/06/jquery.broadcast.js
  156. +52 −0 examples/08/07/index.html
  157. +1 −0  examples/08/jquery.log.js
  158. +70 −0 examples/09/09-01-focusing-a-text-input-by-default.html
  159. +123 −0 examples/09/09-02-disabling-and-enabling-form-elements.html
  160. +108 −0 examples/09/09-03-selecting-radio-buttons-automatically.html
  161. +90 −0 examples/09/09-04-de-selecting-all-check-boxes-using-dedicated-links.html
  162. +113 −0 examples/09/09-05-de-selecting-all-check-boxes-using-a-single-toggle.html
  163. +92 −0 examples/09/09-06-adding-and-removing-select-options.html
  164. +86 −0 examples/09/09-07-auto-tabbing-based-on-character-count.html
  165. +82 −0 examples/09/09-08-displaying-remaining-character-count.html
  166. +74 −0 examples/09/09-09-constraining-text-input-to-specific-characters.html
  167. +94 −0 examples/09/09-10-submitting-a-form-using-ajax.html
  168. +1 −0  examples/09/09-10-submitting-a-form-using-ajax.process.html
  169. +215 −0 examples/09/09-11-validating-forms.html
  170. +41 −0 examples/09/basic.css
  171. +31 −0 examples/09/index.html
  172. +79 −0 examples/10/01-validating-forms/index.html
  173. +1,112 −0 examples/10/01-validating-forms/jquery.validate.js
  174. +18 −0 examples/10/02-creating-masked-input-fields/index.html
  175. +252 −0 examples/10/02-creating-masked-input-fields/jquery.maskedinput.js
  176. BIN  examples/10/03-autocompleting-text-fields/images/ui-bg_glass_75_e6e6e6_1x400.png
  177. BIN  examples/10/03-autocompleting-text-fields/images/ui-bg_glass_75_ffffff_1x400.png
  178. +25 −0 examples/10/03-autocompleting-text-fields/index.html
  179. +17 −0 examples/10/03-autocompleting-text-fields/ui.autocomplete.css
  180. +797 −0 examples/10/03-autocompleting-text-fields/ui.autocomplete.js
  181. +37 −0 examples/10/03-autocompleting-text-fields/ui.core.css
  182. +519 −0 examples/10/03-autocompleting-text-fields/ui.core.js
  183. +243 −0 examples/10/03-autocompleting-text-fields/ui.theme.css
  184. +41 −0 examples/10/04-selecting-a-range-of-values/from-select.html
  185. BIN  examples/10/04-selecting-a-range-of-values/images/ui-bg_glass_65_ffffff_1x400.png
  186. BIN  examples/10/04-selecting-a-range-of-values/images/ui-bg_glass_75_dadada_1x400.png
  187. BIN  examples/10/04-selecting-a-range-of-values/images/ui-bg_glass_75_e6e6e6_1x400.png
  188. BIN  examples/10/04-selecting-a-range-of-values/images/ui-bg_glass_75_ffffff_1x400.png
  189. BIN  examples/10/04-selecting-a-range-of-values/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  190. +35 −0 examples/10/04-selecting-a-range-of-values/index.html
  191. +37 −0 examples/10/04-selecting-a-range-of-values/ui.core.css
  192. +519 −0 examples/10/04-selecting-a-range-of-values/ui.core.js
  193. +17 −0 examples/10/04-selecting-a-range-of-values/ui.slider.css
  194. +532 −0 examples/10/04-selecting-a-range-of-values/ui.slider.js
  195. +243 −0 examples/10/04-selecting-a-range-of-values/ui.theme.css
  196. BIN  examples/10/05-entering-a-range-constrained-value/images/ui-bg_glass_65_ffffff_1x400.png
  197. BIN  examples/10/05-entering-a-range-constrained-value/images/ui-bg_glass_75_dadada_1x400.png
  198. BIN  examples/10/05-entering-a-range-constrained-value/images/ui-bg_glass_75_e6e6e6_1x400.png
  199. BIN  examples/10/05-entering-a-range-constrained-value/images/ui-icons_454545_256x240.png
  200. BIN  examples/10/05-entering-a-range-constrained-value/images/ui-icons_888888_256x240.png
  201. +38 −0 examples/10/05-entering-a-range-constrained-value/index.html
  202. +37 −0 examples/10/05-entering-a-range-constrained-value/ui.core.css
  203. +612 −0 examples/10/05-entering-a-range-constrained-value/ui.core.js
  204. +24 −0 examples/10/05-entering-a-range-constrained-value/ui.spinner.css
  205. +631 −0 examples/10/05-entering-a-range-constrained-value/ui.spinner.js
  206. +244 −0 examples/10/05-entering-a-range-constrained-value/ui.theme.css
  207. +22 −0 examples/10/06-uploading-files-in-the-background/index.html
  208. +637 −0 examples/10/06-uploading-files-in-the-background/jquery.form.js
  209. +19 −0 examples/10/07-limiting-the-length-of-text-inputs/index.html
  210. +98 −0 examples/10/07-limiting-the-length-of-text-inputs/jquery.maxlength.js
  211. +25 −0 examples/10/08-displaying-labels-above-input-fields/index.html
  212. +7 −0 examples/10/08-displaying-labels-above-input-fields/jquery.watermark.css
  213. +33 −0 examples/10/08-displaying-labels-above-input-fields/jquery.watermark.js
  214. +17 −0 examples/10/09-growing-an-input-with-its-content/index.html
  215. +65 −0 examples/10/09-growing-an-input-with-its-content/jquery.elastic.js
  216. +32 −0 examples/10/10-choosing-a-date/date-range.html
  217. BIN  examples/10/10-choosing-a-date/images/ui-bg_flat_0_aaaaaa_40x100.png
  218. BIN  examples/10/10-choosing-a-date/images/ui-bg_glass_55_fbf9ee_1x400.png
  219. BIN  examples/10/10-choosing-a-date/images/ui-bg_glass_65_ffffff_1x400.png
  220. BIN  examples/10/10-choosing-a-date/images/ui-bg_glass_75_dadada_1x400.png
  221. BIN  examples/10/10-choosing-a-date/images/ui-bg_glass_75_e6e6e6_1x400.png
  222. BIN  examples/10/10-choosing-a-date/images/ui-bg_glass_75_ffffff_1x400.png
  223. BIN  examples/10/10-choosing-a-date/images/ui-bg_highlight-soft_75_cccccc_1x100.png
  224. BIN  examples/10/10-choosing-a-date/images/ui-bg_inset-soft_95_fef1ec_1x100.png
  225. BIN  examples/10/10-choosing-a-date/images/ui-icons_222222_256x240.png
  226. BIN  examples/10/10-choosing-a-date/images/ui-icons_2e83ff_256x240.png
  227. BIN  examples/10/10-choosing-a-date/images/ui-icons_454545_256x240.png
  228. BIN  examples/10/10-choosing-a-date/images/ui-icons_888888_256x240.png
  229. BIN  examples/10/10-choosing-a-date/images/ui-icons_cd0a0a_256x240.png
  230. +22 −0 examples/10/10-choosing-a-date/index.html
  231. +37 −0 examples/10/10-choosing-a-date/ui.core.css
  232. +519 −0 examples/10/10-choosing-a-date/ui.core.js
  233. +62 −0 examples/10/10-choosing-a-date/ui.datepicker.css
  234. +1,630 −0 examples/10/10-choosing-a-date/ui.datepicker.js
  235. +243 −0 examples/10/10-choosing-a-date/ui.theme.css
  236. +46 −0 examples/11/11.3-first-plugin.html
  237. +56 −0 examples/11/11.4-options.html
  238. +60 −0 examples/11/11.4b-options-new-defaults.html
  239. +54 −0 examples/11/11.5-using-dollar-shortcut.html
  240. +57 −0 examples/11/11.6-private-functions.html
  241. +62 −0 examples/11/11.7-supporting-metadata.html
  242. +94 −0 examples/11/11.8-static-method.html
  243. +46 −0 examples/11/11.9-unit-testing.html
  244. +21 −0 examples/11/index.html
  245. +57 −0 examples/11/jquery.pulse.js
  246. +33 −0 examples/11/metadata/META.json
  247. +20 −0 examples/11/metadata/README
  248. +122 −0 examples/11/metadata/jquery.metadata.js
  249. +13 −0 examples/11/metadata/jquery.metadata.min.js
  250. +13 −0 examples/11/metadata/jquery.metadata.pack.js
  251. +58 −0 examples/11/metadata/test/index.html
  252. +3,363 −0 examples/11/metadata/test/jquery.js
  253. +79 −0 examples/11/metadata/test/test.js
  254. +299 −0 examples/11/metadata/test/testrunner.js
  255. +12 −0 examples/11/metadata/test/testsuite.css
  256. +4 −0 examples/11/plugins.css
  257. +26 −0 examples/12/12.1-creating-custom-tooltips/index.html
  258. +36 −0 examples/12/12.1-creating-custom-tooltips/tooltip.css
  259. +85 −0 examples/12/12.1-creating-custom-tooltips/tooltip.js
  260. +571 −0 examples/12/12.2-navigating-file-tree-expander/index.html
  261. +7 −0 examples/12/12.2-navigating-file-tree-expander/preload.css
  262. +81 −0 examples/12/12.2-navigating-file-tree-expander/tree.css
  263. +52 −0 examples/12/12.2-navigating-file-tree-expander/tree.js
  264. +94 −0 examples/12/12.3-expanding-accordion/accordion.css
  265. +56 −0 examples/12/12.3-expanding-accordion/accordion.js
  266. +73 −0 examples/12/12.3-expanding-accordion/index.html
  267. +3 −0  examples/12/12.3-expanding-accordion/preload.css
  268. +139 −0 examples/12/12.4-tabbing-through-document/index.html
  269. +3 −0  examples/12/12.4-tabbing-through-document/preload.css
  270. +72 −0 examples/12/12.4-tabbing-through-document/tabs.css
  271. +38 −0 examples/12/12.4-tabbing-through-document/tabs.js
  272. +226 −0 examples/12/12.5-displaying-simple-modal-window/index.html
  273. +116 −0 examples/12/12.5-displaying-simple-modal-window/modal.css
  274. +144 −0 examples/12/12.5-displaying-simple-modal-window/modal.js
  275. +14 −0 examples/12/12.5-displaying-simple-modal-window/modal_markup.html
  276. +6 −0 examples/12/12.5-displaying-simple-modal-window/modal_text.txt
  277. +75 −0 examples/12/12.6-building-drop-down-menus/dropdown.css
  278. +27 −0 examples/12/12.6-building-drop-down-menus/dropdown.js
  279. +278 −0 examples/12/12.6-building-drop-down-menus/index.html
  280. +58 −0 examples/12/12.7-cross-fading-rotating-images/index.html
  281. +3 −0  examples/12/12.7-cross-fading-rotating-images/preload.css
  282. +87 −0 examples/12/12.7-cross-fading-rotating-images/rotator.css
  283. +113 −0 examples/12/12.7-cross-fading-rotating-images/rotator.js
  284. +50 −0 examples/12/12.8-sliding-panels/index.html
  285. +75 −0 examples/12/12.8-sliding-panels/panels.css
  286. +61 −0 examples/12/12.8-sliding-panels/panels.js
  287. BIN  examples/12/_common/arrow.gif
  288. +37 −0 examples/12/_common/basic.css
  289. BIN  examples/12/_common/close.gif
  290. BIN  examples/12/_common/gradient.gif
  291. BIN  examples/12/_common/grey_line.gif
  292. +19 −0 examples/12/_common/jquery.js
  293. BIN  examples/12/_common/loading.gif
  294. BIN  examples/12/_common/photo_1.jpg
  295. BIN  examples/12/_common/photo_2.jpg
  296. BIN  examples/12/_common/photo_3.jpg
  297. BIN  examples/12/_common/photo_4.jpg
  298. BIN  examples/12/_common/photo_5.jpg
  299. BIN  examples/12/_common/radial.png
  300. BIN  examples/12/_common/tree_icons.gif
Sorry, we could not display the entire diff because too many files (598) changed.
4 .htaccess
@@ -0,0 +1,4 @@
+RewriteEngine On
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteRule (.*) go.php?go=$1 [L]
40 examples/02/2.1.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+ <title>Chapter 2 - Recipe 1 - Looping through a set of selected results</title>
+ <style type="text/css">
+ .even { background-color: #ffffff; }
+ .odd { background-color: #cccccc; }
+ </style>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
+ <script type="text/javascript">
+ (function($){
+ $(document).ready(function() {
+ $("ul > li").each(function(i) {
+ if (i % 2 == 1)
+ {
+ $(this).addClass("odd");
+ }
+ else
+ {
+ $(this).addClass("even");
+ }
+ });
+ });
+ })(jQuery);
+ </script>
+</head>
+<body>
+ <h2>Family Members</h2>
+ <ul>
+ <li>Ralph</li>
+ <li>Hope</li>
+ <li>Brandon</li>
+ <li>Jordan</li>
+ <li>Ralphie</li>
+ </ul>
+</body>
+</html>
57 examples/02/2.2.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+ <title>Chapter 2 - Recipe 2 - Reduce the selection set to specified item</title>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+ <script type="text/javascript">
+ (function($){
+ $(document).ready(function(){
+ $("ol#east > li").eq(7).css("border-bottom", "1px solid #000000");
+ $("ol#west > li").eq(7).css("border-bottom", "1px solid #000000");
+ });
+ })(jQuery);
+ </script>
+</head>
+<body>
+ <h2>Eastern Conference</h2>
+ <ol id="east">
+ <li>Boston Bruins</li>
+ <li>Washington Capitals</li>
+ <li>New Jersey Devils</li>
+ <li>Pittsburgh Penguins</li>
+ <li>Philadephia Flyers</li>
+ <li>Carolina Hurricanes</li>
+ <li>New York Rangers</li>
+ <li>Montreal Canadians</li>
+ <li>Florida Panthers</li>
+ <li>Buffalo Sabres</li>
+ <li>Ottawa Senators</li>
+ <li>Toronto Maple Leafs</li>
+ <li>Atlanta Thrashers</li>
+ <li>Tampa Bay</li>
+ <li>New York Islanders</li>
+ </ol>
+
+ <h2>Western Conference</h2>
+ <ol id="west">
+ <li>San Jose Sharks</li>
+ <li>Detroit Red Wings</li>
+ <li>Vancouver Canucks</li>
+ <li>Chicago Blackhawks</li>
+ <li>Calgary Flames</li>
+ <li>St. Louis Blues</li>
+ <li>Columbus Blue Jackets</li>
+ <li>Anaheim Ducks</li>
+ <li>Minnesota Wild</li>
+ <li>Nashville Predators</li>
+ <li>Edmonton Oilers</li>
+ <li>Dallas Stars</li>
+ <li>Phoenix Coyotes</li>
+ <li>Los Angeles Kings</li>
+ <li>Colorado Avalanche</li>
+ </ol>
+</body>
+</html>
37 examples/02/2.3.1.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+ <title>Chapter 2 - Recipe 3.1 - Convert a selected jQuery object into a raw DOM object</title>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+ <script type="text/javascript">
+ <!--
+ (function($){
+ $(document).ready(function(){
+ var lis = $("ol li").get().reverse();
+ $("ol").empty();
+ $.each(lis, function(i){
+ $("ol").append("<li>" + lis[i].innerHTML + "</li>");
+ });
+ });
+ })(jQuery);
+ //-->
+ </script>
+</head>
+<body>
+ <h2>New York Yankees - Batting Line-up</h2>
+ <ol>
+ <li>Jeter</li>
+ <li>Damon</li>
+ <li>Teixeira</li>
+ <li>Posada</li>
+ <li>Swisher</li>
+ <li>Cano</li>
+ <li>Cabrera</li>
+ <li>Molina</li>
+ <li>Ransom</li>
+ </ol>
+</body>
+</html>
25 examples/02/2.3.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+ <title>Chapter 2 - Recipe 3 - Convert a selected jQuery object into a raw DOM object</title>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+ <script type="text/javascript">
+ (function($){
+ $(document).ready(function(){
+ var inner = $("div").get(0).innerHTML;
+ alert(inner);
+ });
+ })(jQuery);
+ </script>
+</head>
+<body>
+ <div>
+ <p>
+ jQuery, the write less, do more javascript library. Saving the day for web developers since 2006.
+ </p>
+ </div>
+</body>
+</html>
26 examples/02/2.4.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+ <title>Chapter 2 - Recipe 4 - Get the index of an item in a selection</title>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+ <script type="text/javascript">
+ <!--
+ (function($){
+ $(document).ready(function(){
+ $("div").click(function() {
+ alert("You clicked on div with an index of " + $("div").index(this));
+ });
+ });
+ })(jQuery);
+ //-->
+ </script>
+</head>
+<body>
+ <div>click me</div>
+ <div class="test">test</div>
+ <div>click me</div>
+</body>
+</html>
47 examples/02/2.5.html
@@ -0,0 +1,47 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+ <title>Chapter 2 - Recipe 5 - Make a unique array of values from an existing array</title>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+ <script type="text/javascript">
+ <!--
+ (function($){
+ $(document).ready(function(){
+ var arr = $.map($("LI"), function(item, index){
+ while (index < 3)
+ {
+ return $(item).html();
+ }
+ return null;
+ });
+
+ $(document.body).append("<span>The first three authors are: " + arr.join(", ") + "</span>");
+ });
+ })(jQuery);
+ //-->
+ </script>
+</head>
+<body>
+ <h1>jQuery Cookbook Authors</h1>
+ <ol>
+ <li>John Resig</li>
+ <li>Cody Lindley</li>
+ <li>Ralph Whitbeck</li>
+ <li>Jonathan Sharp</li>
+ <li>Micheal Geary</li>
+ <li>Scott González</li>
+ <li>Rebecca Murphy</li>
+ <li>Remy Sharp</li>
+ <li>Ariel Flesler</li>
+ <li>Brian Cherne</li>
+ <li>Jörn Zaefferer</li>
+ <li>Mike Hostetler</li>
+ <li>Nathan Smith</li>
+ <li>Richard Worth</li>
+ <li>James Padolsey</li>
+ </ol>
+</body>
+</html>
36 examples/02/2.6.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+ <title>Chapter 2 - Recipe 6 - Perform an action on a subset of the selected set</title>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+ <script type="text/javascript">
+ <!--
+ (function($){
+ $(document).ready(function(){
+ $("p").slice(1,3).wrap("<i></i>");
+ });
+ })(jQuery);
+ //-->
+ </script>
+</head>
+<body>
+ <p>
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin eget nibh ut tortor egestas pharetra. Nullam a hendrerit urna. Aenean augue arcu, vestibulum eget faucibus nec, auctor vel velit. Fusce eget velit non nunc auctor rutrum id et ante. Donec nec malesuada arcu. Suspendisse eu nibh nulla, congue aliquet metus. Integer porta dignissim magna, eu facilisis magna luctus ac. Aliquam convallis condimentum purus, at lacinia nisi semper volutpat. Nulla non risus justo. In ac elit vitae elit posuere adipiscing.
+ </p>
+ <p>
+ Aliquam gravida metus sit amet orci facilisis eu ultricies risus iaculis. Nunc tempus tristique magna, molestie adipiscing nibh bibendum vel. Donec sed nisi luctus sapien scelerisque pretium id eu augue. Mauris ipsum arcu, feugiat non tempor tincidunt, tincidunt sit amet turpis. Vestibulum scelerisque rutrum luctus. Curabitur eu ornare nisl. Cras in sem ut eros consequat fringilla nec vitae felis. Nulla facilisi. Mauris suscipit feugiat odio, a condimentum felis luctus in. Nulla interdum dictum risus, accumsan dignissim tortor ultricies in. Duis justo mauris, posuere vel convallis ut, auctor non libero. Ut a diam magna, ut egestas dolor. Nulla convallis, orci in sodales blandit, lorem augue feugiat nulla, vitae dapibus mi ligula quis ligula. Aenean mattis pulvinar est quis bibendum.
+ </p>
+ <p>
+ Donec posuere pulvinar ligula, nec sagittis lacus pharetra ac. Cras nec tortor mi. Pellentesque et magna vel erat consequat commodo a id nunc. Donec velit elit, vulputate nec tristique vitae, scelerisque ac sem. Proin blandit quam ut magna ultrices porttitor. Fusce rhoncus faucibus tincidunt. Cras ac erat lacus, dictum elementum urna. Nulla facilisi. Praesent ac neque nulla, in rutrum ipsum. Aenean imperdiet, turpis sit amet porttitor hendrerit, ante dui eleifend purus, eu fermentum dolor enim et elit.
+ </p>
+ <p>
+ Suspendisse facilisis molestie hendrerit. Aenean congue congue sapien, ac luctus nulla rutrum vel. Fusce vitae dui urna. Fusce iaculis mattis justo sit amet varius. Duis velit massa, varius in congue ut, tristique sit amet lorem. Curabitur porta, mauris non pretium ultrices, justo elit tristique enim, et elementum tellus enim sit amet felis. Sed sollicitudin rutrum libero sit amet malesuada. Duis vitae gravida purus. Proin in nunc at ligula bibendum pharetra sit amet sit amet felis. Integer ut justo at massa ullamcorper sagittis. Mauris blandit tortor lacus, convallis iaculis libero. Etiam non pellentesque dolor. Fusce ac facilisis ipsum. Suspendisse eget ornare ligula. Aliquam erat volutpat. Aliquam in porttitor purus.
+ </p>
+ <p>
+ Suspendisse facilisis euismod purus in dictum. Vivamus ac neque ut sapien fermentum placerat. Sed malesuada pellentesque tempor. Aenean cursus, metus a lacinia scelerisque, nulla mi malesuada nisi, eget laoreet massa risus eu felis. Vivamus imperdiet rutrum convallis. Proin porta, nunc a interdum facilisis, nunc dui aliquet sapien, non consectetur ipsum nisi et felis. Nullam quis ligula nisi, sed scelerisque arcu. Nam lorem arcu, mollis ac sodales eget, aliquet ac eros. Duis hendrerit mi vitae odio convallis eget lobortis nibh sodales. Nunc ut nunc vitae nibh scelerisque tempor at malesuada sapien. Nullam elementum rutrum odio nec aliquet.
+ </p>
+</body>
+</html>
34 examples/02/2.7.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+ <title>Chapter 2 - Recipe 7 - Configure jQuery to free up a conflict with another library</title>
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js"></script>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+ <script type="text/javascript">
+ <!--
+ jQuery.noConflict();
+
+ // Use jQuery via jQuery(...)
+ jQuery(document).ready(function(){
+ jQuery("div#jQuery").css("font-weight","bold");
+ });
+
+ // Use Prototype with $(...), etc.
+ document.observe("dom:loaded", function() {
+ $('prototype').setStyle({
+ fontSize: '10px'
+ });
+ });
+ //-->
+ </script>
+
+</head>
+<body>
+ <div id="jQuery">Hello I am a jQuery div</div>
+ <div id="prototype">Hello I am a Prototype div</div>
+</body>
+</html>
46 examples/02/2.8.html
@@ -0,0 +1,46 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+ <title>Chapter 2 - Recipe 8 - jQuery does not provide functionality that is required</title>
+ <style type="text/css">
+ .pics {
+ height: 232px;
+ width: 232px;
+ padding: 0;
+ margin: 0;
+ }
+
+ .pics img {
+ padding: 15px;
+ border: 1px solid #ccc;
+ background-color: #eee;
+ width: 200px;
+ height: 200px;
+ top: 0;
+ left: 0
+ }
+ </style>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+ <script type="text/javascript" src="scripts/2.8/jquery.cycle.all.min.js?v2.60"></script>
+ <script type="text/javascript">
+ <!--
+ (function($){
+ $(document).ready(function(){
+ $('.pics').cycle('fade');
+ });
+ })(jQuery);
+ //-->
+ </script>
+
+</head>
+<body>
+ <div class="pics">
+ <img src="images/2.8/beach1.jpg" width="200" height="200" alt="Beach 1" />
+ <img src="images/2.8/beach2.jpg" width="200" height="200" alt="Beach 2" />
+ <img src="images/2.8/beach3.jpg" width="200" height="200" alt="Beach 3" />
+ </div>
+</body>
+</html>
29 examples/02/2.9.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
+ <title>Chapter 2 - Recipe 9 - Determining the exact query that was used</title>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
+ <script type="text/javascript">
+ <!--
+ (function($){
+ $.fn.ShowQuery = function(i) {
+ alert("$(\""+ $(this).selector + "\", " + $(this).context +")");
+ if (i < 3)
+ {
+ $($(this).selector, $(this).context).ShowQuery(i+1);
+ }
+ };
+ $("div").ShowQuery(1);
+ })(jQuery);
+ //-->
+ </script>
+</head>
+<body>
+ <div>
+ This is a div.
+ </div>
+</body>
+</html>
BIN  examples/02/images/2.8/beach1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/images/2.8/beach2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/images/2.8/beach3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/screenshots/2.1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/screenshots/2.2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/screenshots/2.3.1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/screenshots/2.3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/screenshots/2.4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/screenshots/2.5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/screenshots/2.6.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/screenshots/2.7.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN  examples/02/screenshots/2.9.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 examples/02/scripts/2.8/jquery.cycle.all.min.js
@@ -0,0 +1,28 @@
+/*
+ * jQuery Cycle Plugin (with Transition Definitions)
+ * Examples and documentation at: http://jquery.malsup.com/cycle/
+ * Copyright (c) 2007-2009 M. Alsup
+ * Version: 2.65 (07-APR-2009)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ * Requires: jQuery v1.2.6 or later
+ *
+ * Originally based on the work of:
+ * 1) Matt Oakes
+ * 2) Torsten Baldes (http://medienfreunde.com/lab/innerfade/)
+ * 3) Benjamin Sterling (http://www.benjaminsterling.com/experiments/jqShuffle/)
+ */
+;(function($){var ver="2.65";if($.support==undefined){$.support={opacity:!($.browser.msie)};}function log(){if(window.console&&window.console.log){window.console.log("[cycle] "+Array.prototype.join.call(arguments," "));}}$.fn.cycle=function(options,arg2){var o={s:this.selector,c:this.context};if(this.length==0&&options!="stop"){if(!$.isReady&&o.s){log("DOM not ready, queuing slideshow");$(function(){$(o.s,o.c).cycle(options,arg2);});return this;}log("terminating; zero elements found by selector"+($.isReady?"":" (DOM not ready)"));return this;}return this.each(function(){options=handleArguments(this,options,arg2);if(options===false){return;}if(this.cycleTimeout){clearTimeout(this.cycleTimeout);}this.cycleTimeout=this.cyclePause=0;var $cont=$(this);var $slides=options.slideExpr?$(options.slideExpr,this):$cont.children();var els=$slides.get();if(els.length<2){log("terminating; too few slides: "+els.length);return;}var opts=buildOptions($cont,$slides,els,options,o);if(opts===false){return;}if(opts.timeout||opts.continuous){this.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},opts.continuous?10:opts.timeout+(opts.delay||0));}});};function handleArguments(cont,options,arg2){if(cont.cycleStop==undefined){cont.cycleStop=0;}if(options===undefined||options===null){options={};}if(options.constructor==String){switch(options){case"stop":cont.cycleStop++;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);}cont.cycleTimeout=0;$(cont).removeData("cycle.opts");return false;case"pause":cont.cyclePause=1;return false;case"resume":cont.cyclePause=0;if(arg2===true){options=$(cont).data("cycle.opts");if(!options){log("options not found, can not resume");return false;}if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}go(options.elements,options,1,1);}return false;default:options={fx:options};}}else{if(options.constructor==Number){var num=options;options=$(cont).data("cycle.opts");if(!options){log("options not found, can not advance slide");return false;}if(num<0||num>=options.elements.length){log("invalid slide index: "+num);return false;}options.nextSlide=num;if(cont.cycleTimeout){clearTimeout(cont.cycleTimeout);cont.cycleTimeout=0;}if(typeof arg2=="string"){options.oneTimeFx=arg2;}go(options.elements,options,1,num>=options.currSlide);return false;}}return options;}function removeFilter(el,opts){if(!$.support.opacity&&opts.cleartype&&el.style.filter){try{el.style.removeAttribute("filter");}catch(smother){}}}function buildOptions($cont,$slides,els,options,o){var opts=$.extend({},$.fn.cycle.defaults,options||{},$.metadata?$cont.metadata():$.meta?$cont.data():{});if(opts.autostop){opts.countdown=opts.autostopCount||els.length;}var cont=$cont[0];$cont.data("cycle.opts",opts);opts.$cont=$cont;opts.stopCount=cont.cycleStop;opts.elements=els;opts.before=opts.before?[opts.before]:[];opts.after=opts.after?[opts.after]:[];opts.after.unshift(function(){opts.busy=0;});if(!$.support.opacity&&opts.cleartype){opts.after.push(function(){removeFilter(this,opts);});}if(opts.continuous){opts.after.push(function(){go(els,opts,0,!opts.rev);});}saveOriginalOpts(opts);if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($slides);}if($cont.css("position")=="static"){$cont.css("position","relative");}if(opts.width){$cont.width(opts.width);}if(opts.height&&opts.height!="auto"){$cont.height(opts.height);}if(opts.startingSlide){opts.startingSlide=parseInt(opts.startingSlide);}if(opts.random){opts.randomMap=[];for(var i=0;i<els.length;i++){opts.randomMap.push(i);}opts.randomMap.sort(function(a,b){return Math.random()-0.5;});opts.randomIndex=0;opts.startingSlide=opts.randomMap[0];}else{if(opts.startingSlide>=els.length){opts.startingSlide=0;}}opts.currSlide=opts.startingSlide=opts.startingSlide||0;var first=opts.startingSlide;$slides.css({position:"absolute",top:0,left:0}).hide().each(function(i){var z=first?i>=first?els.length-(i-first):first-i:els.length-i;$(this).css("z-index",z);});$(els[first]).css("opacity",1).show();removeFilter(els[first],opts);if(opts.fit&&opts.width){$slides.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}var reshape=opts.containerResize&&!$cont.innerHeight();if(reshape){var maxw=0,maxh=0;for(var i=0;i<els.length;i++){var $e=$(els[i]),e=$e[0],w=$e.outerWidth(),h=$e.outerHeight();if(!w){w=e.offsetWidth;}if(!h){h=e.offsetHeight;}maxw=w>maxw?w:maxw;maxh=h>maxh?h:maxh;}if(maxw>0&&maxh>0){$cont.css({width:maxw+"px",height:maxh+"px"});}}if(opts.pause){$cont.hover(function(){this.cyclePause++;},function(){this.cyclePause--;});}if(supportMultiTransitions(opts)===false){return false;}if(!opts.multiFx){var init=$.fn.cycle.transitions[opts.fx];if($.isFunction(init)){init($cont,$slides,opts);}else{if(opts.fx!="custom"&&!opts.multiFx){log("unknown transition: "+opts.fx,"; slideshow terminating");return false;}}}var requeue=false;options.requeueAttempts=options.requeueAttempts||0;$slides.each(function(){var $el=$(this);this.cycleH=(opts.fit&&opts.height)?opts.height:$el.height();this.cycleW=(opts.fit&&opts.width)?opts.width:$el.width();if($el.is("img")){var loadingIE=($.browser.msie&&this.cycleW==28&&this.cycleH==30&&!this.complete);var loadingOp=($.browser.opera&&this.cycleW==42&&this.cycleH==19&&!this.complete);var loadingOther=(this.cycleH==0&&this.cycleW==0&&!this.complete);if(loadingIE||loadingOp||loadingOther){if(o.s&&opts.requeueOnImageNotLoaded&&++options.requeueAttempts<100){log(options.requeueAttempts," - img slide not loaded, requeuing slideshow: ",this.src,this.cycleW,this.cycleH);setTimeout(function(){$(o.s,o.c).cycle(options);},opts.requeueTimeout);requeue=true;return false;}else{log("could not determine size of image: "+this.src,this.cycleW,this.cycleH);}}}return true;});if(requeue){return false;}opts.cssBefore=opts.cssBefore||{};opts.animIn=opts.animIn||{};opts.animOut=opts.animOut||{};$slides.not(":eq("+first+")").css(opts.cssBefore);if(opts.cssFirst){$($slides[first]).css(opts.cssFirst);}if(opts.timeout){opts.timeout=parseInt(opts.timeout);if(opts.speed.constructor==String){opts.speed=$.fx.speeds[opts.speed]||parseInt(opts.speed);}if(!opts.sync){opts.speed=opts.speed/2;}while((opts.timeout-opts.speed)<250){opts.timeout+=opts.speed;}}if(opts.easing){opts.easeIn=opts.easeOut=opts.easing;}if(!opts.speedIn){opts.speedIn=opts.speed;}if(!opts.speedOut){opts.speedOut=opts.speed;}opts.slideCount=els.length;opts.currSlide=opts.lastSlide=first;if(opts.random){opts.nextSlide=opts.currSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.startingSlide>=(els.length-1)?0:opts.startingSlide+1;}var e0=$slides[first];if(opts.before.length){opts.before[0].apply(e0,[e0,e0,opts,true]);}if(opts.after.length>1){opts.after[1].apply(e0,[e0,e0,opts,true]);}if(opts.next){$(opts.next).click(function(){return advance(opts,opts.rev?-1:1);});}if(opts.prev){$(opts.prev).click(function(){return advance(opts,opts.rev?1:-1);});}if(opts.pager){buildPager(els,opts);}exposeAddSlide(opts,els);return opts;}function saveOriginalOpts(opts){opts.original={before:[],after:[]};opts.original.cssBefore=$.extend({},opts.cssBefore);opts.original.cssAfter=$.extend({},opts.cssAfter);opts.original.animIn=$.extend({},opts.animIn);opts.original.animOut=$.extend({},opts.animOut);$.each(opts.before,function(){opts.original.before.push(this);});$.each(opts.after,function(){opts.original.after.push(this);});}function supportMultiTransitions(opts){var txs=$.fn.cycle.transitions;if(opts.fx.indexOf(",")>0){opts.multiFx=true;opts.fxs=opts.fx.replace(/\s*/g,"").split(",");for(var i=0;i<opts.fxs.length;i++){var fx=opts.fxs[i];var tx=txs[fx];if(!tx||!txs.hasOwnProperty(fx)||!$.isFunction(tx)){log("discarding unknown transition: ",fx);opts.fxs.splice(i,1);i--;}}if(!opts.fxs.length){log("No valid transitions named; slideshow terminating.");return false;}}else{if(opts.fx=="all"){opts.multiFx=true;opts.fxs=[];for(p in txs){var tx=txs[p];if(txs.hasOwnProperty(p)&&$.isFunction(tx)){opts.fxs.push(p);}}}}if(opts.multiFx&&opts.randomizeEffects){var r1=Math.floor(Math.random()*20)+30;for(var i=0;i<r1;i++){var r2=Math.floor(Math.random()*opts.fxs.length);opts.fxs.push(opts.fxs.splice(r2,1)[0]);}log("randomized fx sequence: ",opts.fxs);}return true;}function exposeAddSlide(opts,els){opts.addSlide=function(newSlide,prepend){var $s=$(newSlide),s=$s[0];if(!opts.autostopCount){opts.countdown++;}els[prepend?"unshift":"push"](s);if(opts.els){opts.els[prepend?"unshift":"push"](s);}opts.slideCount=els.length;$s.css("position","absolute");$s[prepend?"prependTo":"appendTo"](opts.$cont);if(prepend){opts.currSlide++;opts.nextSlide++;}if(!$.support.opacity&&opts.cleartype&&!opts.cleartypeNoBg){clearTypeFix($s);}if(opts.fit&&opts.width){$s.width(opts.width);}if(opts.fit&&opts.height&&opts.height!="auto"){$slides.height(opts.height);}s.cycleH=(opts.fit&&opts.height)?opts.height:$s.height();s.cycleW=(opts.fit&&opts.width)?opts.width:$s.width();$s.css(opts.cssBefore);if(opts.pager){$.fn.cycle.createPagerAnchor(els.length-1,s,$(opts.pager),els,opts);}if($.isFunction(opts.onAddSlide)){opts.onAddSlide($s);}else{$s.hide();}};}$.fn.cycle.resetState=function(opts,fx){fx=fx||opts.fx;opts.before=[];opts.after=[];opts.cssBefore=$.extend({},opts.original.cssBefore);opts.cssAfter=$.extend({},opts.original.cssAfter);opts.animIn=$.extend({},opts.original.animIn);opts.animOut=$.extend({},opts.original.animOut);opts.fxFn=null;$.each(opts.original.before,function(){opts.before.push(this);});$.each(opts.original.after,function(){opts.after.push(this);});var init=$.fn.cycle.transitions[fx];if($.isFunction(init)){init(opts.$cont,$(opts.elements),opts);}};function go(els,opts,manual,fwd){if(manual&&opts.busy&&opts.manualTrump){$(els).stop(true,true);opts.busy=false;}if(opts.busy){return;}var p=opts.$cont[0],curr=els[opts.currSlide],next=els[opts.nextSlide];if(p.cycleStop!=opts.stopCount||p.cycleTimeout===0&&!manual){return;}if(!manual&&!p.cyclePause&&((opts.autostop&&(--opts.countdown<=0))||(opts.nowrap&&!opts.random&&opts.nextSlide<opts.currSlide))){if(opts.end){opts.end(opts);}return;}if(manual||!p.cyclePause){var fx=opts.fx;curr.cycleH=curr.cycleH||$(curr).height();curr.cycleW=curr.cycleW||$(curr).width();next.cycleH=next.cycleH||$(next).height();next.cycleW=next.cycleW||$(next).width();if(opts.multiFx){if(opts.lastFx==undefined||++opts.lastFx>=opts.fxs.length){opts.lastFx=0;}fx=opts.fxs[opts.lastFx];opts.currFx=fx;}if(opts.oneTimeFx){fx=opts.oneTimeFx;opts.oneTimeFx=null;}$.fn.cycle.resetState(opts,fx);if(opts.before.length){$.each(opts.before,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});}var after=function(){$.each(opts.after,function(i,o){if(p.cycleStop!=opts.stopCount){return;}o.apply(next,[curr,next,opts,fwd]);});};if(opts.nextSlide!=opts.currSlide){opts.busy=1;if(opts.fxFn){opts.fxFn(curr,next,opts,after,fwd);}else{if($.isFunction($.fn.cycle[opts.fx])){$.fn.cycle[opts.fx](curr,next,opts,after);}else{$.fn.cycle.custom(curr,next,opts,after,manual&&opts.fastOnEvent);}}}opts.lastSlide=opts.currSlide;if(opts.random){opts.currSlide=opts.nextSlide;if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{var roll=(opts.nextSlide+1)==els.length;opts.nextSlide=roll?0:opts.nextSlide+1;opts.currSlide=roll?els.length-1:opts.nextSlide-1;}if(opts.pager){$.fn.cycle.updateActivePagerLink(opts.pager,opts.currSlide);}}var ms=0;if(opts.timeout&&!opts.continuous){ms=getTimeout(curr,next,opts,fwd);}else{if(opts.continuous&&p.cyclePause){ms=10;}}if(ms>0){p.cycleTimeout=setTimeout(function(){go(els,opts,0,!opts.rev);},ms);}}$.fn.cycle.updateActivePagerLink=function(pager,currSlide){$(pager).find("a").removeClass("activeSlide").filter("a:eq("+currSlide+")").addClass("activeSlide");};function getTimeout(curr,next,opts,fwd){if(opts.timeoutFn){var t=opts.timeoutFn(curr,next,opts,fwd);if(t!==false){return t;}}return opts.timeout;}$.fn.cycle.next=function(opts){advance(opts,opts.rev?-1:1);};$.fn.cycle.prev=function(opts){advance(opts,opts.rev?1:-1);};function advance(opts,val){var els=opts.elements;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if(opts.random&&val<0){opts.randomIndex--;if(--opts.randomIndex==-2){opts.randomIndex=els.length-2;}else{if(opts.randomIndex==-1){opts.randomIndex=els.length-1;}}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{if(opts.random){if(++opts.randomIndex==els.length){opts.randomIndex=0;}opts.nextSlide=opts.randomMap[opts.randomIndex];}else{opts.nextSlide=opts.currSlide+val;if(opts.nextSlide<0){if(opts.nowrap){return false;}opts.nextSlide=els.length-1;}else{if(opts.nextSlide>=els.length){if(opts.nowrap){return false;}opts.nextSlide=0;}}}}if($.isFunction(opts.prevNextClick)){opts.prevNextClick(val>0,opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,val>=0);return false;}function buildPager(els,opts){var $p=$(opts.pager);$.each(els,function(i,o){$.fn.cycle.createPagerAnchor(i,o,$p,els,opts);});$.fn.cycle.updateActivePagerLink(opts.pager,opts.startingSlide);}$.fn.cycle.createPagerAnchor=function(i,el,$p,els,opts){var a=($.isFunction(opts.pagerAnchorBuilder))?opts.pagerAnchorBuilder(i,el):'<a href="#">'+(i+1)+"</a>";if(!a){return;}var $a=$(a);if($a.parents("body").length==0){var arr=[];if($p.length>1){$p.each(function(){var $clone=$a.clone(true);$(this).append($clone);arr.push($clone);});$a=$(arr);}else{$a.appendTo($p);}}$a.bind(opts.pagerEvent,function(){opts.nextSlide=i;var p=opts.$cont[0],timeout=p.cycleTimeout;if(timeout){clearTimeout(timeout);p.cycleTimeout=0;}if($.isFunction(opts.pagerClick)){opts.pagerClick(opts.nextSlide,els[opts.nextSlide]);}go(els,opts,1,opts.currSlide<i);return false;});if(opts.pauseOnPagerHover){$a.hover(function(){opts.$cont[0].cyclePause++;},function(){opts.$cont[0].cyclePause--;});}};$.fn.cycle.hopsFromLast=function(opts,fwd){var hops,l=opts.lastSlide,c=opts.currSlide;if(fwd){hops=c>l?c-l:opts.slideCount-l;}else{hops=c<l?l-c:l+opts.slideCount-c;}return hops;};function clearTypeFix($slides){function hex(s){s=parseInt(s).toString(16);return s.length<2?"0"+s:s;}function getBg(e){for(;e&&e.nodeName.toLowerCase()!="html";e=e.parentNode){var v=$.css(e,"background-color");if(v.indexOf("rgb")>=0){var rgb=v.match(/\d+/g);return"#"+hex(rgb[0])+hex(rgb[1])+hex(rgb[2]);}if(v&&v!="transparent"){return v;}}return"#ffffff";}$slides.each(function(){$(this).css("background-color",getBg(this));});}$.fn.cycle.commonReset=function(curr,next,opts,w,h,rev){$(opts.elements).not(curr).hide();opts.cssBefore.opacity=1;opts.cssBefore.display="block";if(w!==false&&next.cycleW>0){opts.cssBefore.width=next.cycleW;}if(h!==false&&next.cycleH>0){opts.cssBefore.height=next.cycleH;}opts.cssAfter=opts.cssAfter||{};opts.cssAfter.display="none";$(curr).css("zIndex",opts.slideCount+(rev===true?1:0));$(next).css("zIndex",opts.slideCount+(rev===true?0:1));};$.fn.cycle.custom=function(curr,next,opts,cb,speedOverride){var $l=$(curr),$n=$(next);var speedIn=opts.speedIn,speedOut=opts.speedOut,easeIn=opts.easeIn,easeOut=opts.easeOut;$n.css(opts.cssBefore);if(speedOverride){if(typeof speedOverride=="number"){speedIn=speedOut=speedOverride;}else{speedIn=speedOut=1;}easeIn=easeOut=null;}var fn=function(){$n.animate(opts.animIn,speedIn,easeIn,cb);};$l.animate(opts.animOut,speedOut,easeOut,function(){if(opts.cssAfter){$l.css(opts.cssAfter);}if(!opts.sync){fn();}});if(opts.sync){fn();}};$.fn.cycle.transitions={fade:function($cont,$slides,opts){$slides.not(":eq("+opts.currSlide+")").css("opacity",0);opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.opacity=0;});opts.animIn={opacity:1};opts.animOut={opacity:0};opts.cssBefore={top:0,left:0};}};$.fn.cycle.ver=function(){return ver;};$.fn.cycle.defaults={fx:"fade",timeout:4000,timeoutFn:null,continuous:0,speed:1000,speedIn:null,speedOut:null,next:null,prev:null,prevNextClick:null,pager:null,pagerClick:null,pagerEvent:"click",pagerAnchorBuilder:null,before:null,after:null,end:null,easing:null,easeIn:null,easeOut:null,shuffle:null,animIn:null,animOut:null,cssBefore:null,cssAfter:null,fxFn:null,height:"auto",startingSlide:0,sync:1,random:0,fit:0,containerResize:1,pause:0,pauseOnPagerHover:0,autostop:0,autostopCount:0,delay:0,slideExpr:null,cleartype:!$.support.opacity,nowrap:0,fastOnEvent:0,randomizeEffects:1,rev:0,manualTrump:true,requeueOnImageNotLoaded:true,requeueTimeout:250};})(jQuery);
+
+/*
+ * jQuery Cycle Plugin Transition Definitions
+ * This script is a plugin for the jQuery Cycle Plugin
+ * Examples and documentation at: http://malsup.com/jquery/cycle/
+ * Copyright (c) 2007-2008 M. Alsup
+ * Version: 2.52
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ */
+;(function($){$.fn.cycle.transitions.scrollUp=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssBefore={top:h,left:0};opts.cssFirst={top:0};opts.animIn={top:0};opts.animOut={top:-h};};$.fn.cycle.transitions.scrollDown=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var h=$cont.height();opts.cssFirst={top:0};opts.cssBefore={top:-h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.scrollLeft=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:0-w};};$.fn.cycle.transitions.scrollRight=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push($.fn.cycle.commonReset);var w=$cont.width();opts.cssFirst={left:0};opts.cssBefore={left:-w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.scrollHorz=function($cont,$slides,opts){$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.left=fwd?(next.cycleW-1):(1-next.cycleW);opts.animOut.left=fwd?-curr.cycleW:curr.cycleW;});opts.cssFirst={left:0};opts.cssBefore={top:0};opts.animIn={left:0};opts.animOut={top:0};};$.fn.cycle.transitions.scrollVert=function($cont,$slides,opts){$cont.css("overflow","hidden");opts.before.push(function(curr,next,opts,fwd){$.fn.cycle.commonReset(curr,next,opts);opts.cssBefore.top=fwd?(1-next.cycleH):(next.cycleH-1);opts.animOut.top=fwd?curr.cycleH:-curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0};opts.animIn={top:0};opts.animOut={left:0};};$.fn.cycle.transitions.slideX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;});opts.cssBefore={left:0,top:0,width:0};opts.animIn={width:"show"};opts.animOut={width:0};};$.fn.cycle.transitions.slideY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$(opts.elements).not(curr).hide();$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;});opts.cssBefore={left:0,top:0,height:0};opts.animIn={height:"show"};opts.animOut={height:0};};$.fn.cycle.transitions.shuffle=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();$slides.css({left:0,top:0});opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);});opts.speed=opts.speed/2;opts.random=0;opts.shuffle=opts.shuffle||{left:-w,top:15};opts.els=[];for(var i=0;i<$slides.length;i++){opts.els.push($slides[i]);}for(var i=0;i<opts.currSlide;i++){opts.els.push(opts.els.shift());}opts.fxFn=function(curr,next,opts,cb,fwd){var $el=fwd?$(curr):$(next);$(next).css(opts.cssBefore);var count=opts.slideCount;$el.animate(opts.shuffle,opts.speedIn,opts.easeIn,function(){var hops=$.fn.cycle.hopsFromLast(opts,fwd);for(var k=0;k<hops;k++){fwd?opts.els.push(opts.els.shift()):opts.els.unshift(opts.els.pop());}if(fwd){for(var i=0,len=opts.els.length;i<len;i++){$(opts.els[i]).css("z-index",len-i+count);}}else{var z=$(curr).css("z-index");$el.css("z-index",parseInt(z)+1+count);}$el.animate({left:0,top:0},opts.speedOut,opts.easeOut,function(){$(fwd?this:curr).hide();if(cb){cb();}});});};opts.cssBefore={display:"block",opacity:1,top:0,left:0};};$.fn.cycle.transitions.turnUp=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=next.cycleH;opts.animIn.height=next.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,height:0};opts.animIn={top:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnDown=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssFirst={top:0};opts.cssBefore={left:0,top:0,height:0};opts.animOut={height:0};};$.fn.cycle.transitions.turnLeft=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=next.cycleW;opts.animIn.width=next.cycleW;});opts.cssBefore={top:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.turnRight=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={top:0,left:0,width:0};opts.animIn={left:0};opts.animOut={width:0};};$.fn.cycle.transitions.zoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false,true);opts.cssBefore.top=next.cycleH/2;opts.cssBefore.left=next.cycleW/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};opts.animOut={width:0,height:0,top:curr.cycleH/2,left:curr.cycleW/2};});opts.cssFirst={top:0,left:0};opts.cssBefore={width:0,height:0};};$.fn.cycle.transitions.fadeZoom=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,false);opts.cssBefore.left=next.cycleW/2;opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,left:0,width:next.cycleW,height:next.cycleH};});opts.cssBefore={width:0,height:0};opts.animOut={opacity:0};};$.fn.cycle.transitions.blindX=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.width=next.cycleW;opts.animOut.left=curr.cycleW;});opts.cssBefore={left:w,top:0};opts.animIn={left:0};opts.animOut={left:w};};$.fn.cycle.transitions.blindY=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:0};opts.animIn={top:0};opts.animOut={top:h};};$.fn.cycle.transitions.blindZ=function($cont,$slides,opts){var h=$cont.css("overflow","hidden").height();var w=$cont.width();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);opts.animIn.height=next.cycleH;opts.animOut.top=curr.cycleH;});opts.cssBefore={top:h,left:w};opts.animIn={top:0,left:0};opts.animOut={top:h,left:w};};$.fn.cycle.transitions.growX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true);opts.cssBefore.left=this.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:0};});opts.cssBefore={width:0,top:0};};$.fn.cycle.transitions.growY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false);opts.cssBefore.top=this.cycleH/2;opts.animIn={top:0,height:this.cycleH};opts.animOut={top:0};});opts.cssBefore={height:0,left:0};};$.fn.cycle.transitions.curtainX=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,false,true,true);opts.cssBefore.left=next.cycleW/2;opts.animIn={left:0,width:this.cycleW};opts.animOut={left:curr.cycleW/2,width:0};});opts.cssBefore={top:0,width:0};};$.fn.cycle.transitions.curtainY=function($cont,$slides,opts){opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,false,true);opts.cssBefore.top=next.cycleH/2;opts.animIn={top:0,height:next.cycleH};opts.animOut={top:curr.cycleH/2,height:0};});opts.cssBefore={left:0,height:0};};$.fn.cycle.transitions.cover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts);if(d=="right"){opts.cssBefore.left=-w;}else{if(d=="up"){opts.cssBefore.top=h;}else{if(d=="down"){opts.cssBefore.top=-h;}else{opts.cssBefore.left=w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.uncover=function($cont,$slides,opts){var d=opts.direction||"left";var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(d=="right"){opts.animOut.left=w;}else{if(d=="up"){opts.animOut.top=-h;}else{if(d=="down"){opts.animOut.top=h;}else{opts.animOut.left=-w;}}}});opts.animIn={left:0,top:0};opts.animOut={opacity:1};opts.cssBefore={top:0,left:0};};$.fn.cycle.transitions.toss=function($cont,$slides,opts){var w=$cont.css("overflow","visible").width();var h=$cont.height();opts.before.push(function(curr,next,opts){$.fn.cycle.commonReset(curr,next,opts,true,true,true);if(!opts.animOut.left&&!opts.animOut.top){opts.animOut={left:w*2,top:-h/2,opacity:0};}else{opts.animOut.opacity=0;}});opts.cssBefore={left:0,top:0};opts.animIn={left:0};};$.fn.cycle.transitions.wipe=function($cont,$slides,opts){var w=$cont.css("overflow","hidden").width();var h=$cont.height();opts.cssBefore=opts.cssBefore||{};var clip;if(opts.clip){if(/l2r/.test(opts.clip)){clip="rect(0px 0px "+h+"px 0px)";}else{if(/r2l/.test(opts.clip)){clip="rect(0px "+w+"px "+h+"px "+w+"px)";}else{if(/t2b/.test(opts.clip)){clip="rect(0px "+w+"px 0px 0px)";}else{if(/b2t/.test(opts.clip)){clip="rect("+h+"px "+w+"px "+h+"px 0px)";}else{if(/zoom/.test(opts.clip)){var t=parseInt(h/2);var l=parseInt(w/2);clip="rect("+t+"px "+l+"px "+t+"px "+l+"px)";}}}}}}opts.cssBefore.clip=opts.cssBefore.clip||clip||"rect(0px 0px 0px 0px)";var d=opts.cssBefore.clip.match(/(\d+)/g);var t=parseInt(d[0]),r=parseInt(d[1]),b=parseInt(d[2]),l=parseInt(d[3]);opts.before.push(function(curr,next,opts){if(curr==next){return;}var $curr=$(curr),$next=$(next);$.fn.cycle.commonReset(curr,next,opts,true,true,false);opts.cssAfter.display="block";var step=1,count=parseInt((opts.speedIn/13))-1;(function f(){var tt=t?t-parseInt(step*(t/count)):0;var ll=l?l-parseInt(step*(l/count)):0;var bb=b<h?b+parseInt(step*((h-b)/count||1)):h;var rr=r<w?r+parseInt(step*((w-r)/count||1)):w;$next.css({clip:"rect("+tt+"px "+rr+"px "+bb+"px "+ll+"px)"});(step++<=count)?setTimeout(f,13):$curr.css("display","none");})();});opts.cssBefore={display:"block",opacity:1,top:0,left:0};opts.animIn={left:0};opts.animOut={left:0};};})(jQuery);
16 examples/03/3.1-browser.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>jQuery Cookbook - 3.1 Detecting Browsers with jQuery.browser</title>
+ <link rel="stylesheet" type="text/css" href="../common.css" />
+ <link rel="stylesheet" type="text/css" href="browser.css" />
+ <script type="text/javascript" src="../jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="browser.js"></script>
+</head>
+<body>
+ <h1>Detecting Browsers with jQuery.browser</h1>
+ <p>Here is a sample page with content</p>
+</body>
+</html>
16 examples/03/3.2-each.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>jQuery Cookbook - 3.2 Iterating Over Arrays with jQuery.each</title>
+ <link rel="stylesheet" type="text/css" href="../common.css" />
+ <script type="text/javascript" src="../jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="each.js"></script>
+</head>
+<body>
+ <h1>Iterating Over Arrays with jQuery.each</h1>
+ <ul id="months"></ul>
+ <ul id="days"></ul>
+</body>
+</html>
15 examples/03/3.3-grep.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>jQuery Cookbook - 3.3 Filtering Arrays with jQuery.grep</title>
+ <link rel="stylesheet" type="text/css" href="../common.css" />
+ <script type="text/javascript" src="../jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="grep.js"></script>
+</head>
+<body>
+ <h1>Filtering Arrays with jQuery.grep</h1>
+ <ul id="months"></ul>
+</body>
+</html>
15 examples/03/3.4-map.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>jQuery Cookbook - 3.4 Iterating and Modifying Array Entries with jQuery.map</title>
+ <link rel="stylesheet" type="text/css" href="../common.css" />
+ <script type="text/javascript" src="../jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="map.js"></script>
+</head>
+<body>
+ <h1>Modifying Array Entries with jQuery.map</h1>
+ <ul id="months"></ul>
+</body>
+</html>
15 examples/03/3.5-merge.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>jQuery Cookbook - 3.5 Combining Two Arrays with jQuery.merge</title>
+ <link rel="stylesheet" type="text/css" href="../common.css" />
+ <script type="text/javascript" src="../jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="merge.js"></script>
+</head>
+<body>
+ <h1>Combining Two Arrays with jQuery.merge</h1>
+ <ul id="horses"></ul>
+</body>
+</html>
15 examples/03/3.6-unique.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>jQuery Cookbook - 3.5 Combining Two Arrays with jQuery.merge</title>
+ <link rel="stylesheet" type="text/css" href="../common.css" />
+ <script type="text/javascript" src="../jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="unique.js"></script>
+</head>
+<body>
+ <h1>Combining Two Arrays with jQuery.merge</h1>
+ <ul id="months"></ul>
+</body>
+</html>
15 examples/03/3.7-isfunction.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>jQuery Cookbook - 3.7 Testing Callback Functions with jQuery.isFunction</title>
+ <link rel="stylesheet" type="text/css" href="../common.css" />
+ <script type="text/javascript" src="../jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="isfunction.js"></script>
+</head>
+<body>
+ <h1>Testing Callback Functions with jQuery.isFunction()</h1>
+ <div style="display: none;">Hello world!</div>
+</body>
+</html>
16 examples/03/3.8-trim.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>jQuery Cookbook - 3.8 Removing Whitespace From Strings or Form Values with jQuery.trim</title>
+ <link rel="stylesheet" type="text/css" href="../common.css" />
+ <script type="text/javascript" src="../jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="trim.js"></script>
+</head>
+<body>
+ <h1>Removing Whitespace From Strings or Form Values with jQuery.trim</h1>
+ First Name: <input type="text" name="first_name" class="cleanup" /><br/>
+ Last Name: <input type="text" name="last_name" class="cleanup" />
+</body>
+</html>
17 examples/03/3.9-data-time.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>jQuery Cookbook - 3.9 Attaching Objects & Data to DOM with jQuery.data</title>
+ <link rel="stylesheet" type="text/css" href="../common.css" />
+ <script type="text/javascript" src="../jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="data-time.js"></script>
+</head>
+<body>
+ <h1>Attaching Objects & Data to DOM with jQuery.data</h1>
+ Current Time: <div class="updateTime"></div>
+ <br/><br/>
+ Another Time Element: <span class="updateTime"></span>
+</body>
+</html>
15 examples/03/3.9-data.html
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>jQuery Cookbook - 3.5 Combining Two Arrays with jQuery.merge</title>
+ <link rel="stylesheet" type="text/css" href="../common.css" />
+ <script type="text/javascript" src="../jquery-1.3.2.min.js"></script>
+ <script type="text/javascript" src="data.js"></script>
+</head>
+<body>
+ <h1>Combining Two Arrays with jQuery.merge</h1>
+ <div id="myId">My div element</div>
+</body>
+</html>
BIN  examples/03/browser-back.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 examples/03/browser.css
@@ -0,0 +1,17 @@
+#upgradeBrowser {
+ position: absolute;
+ background: url(browser-back.gif) no-repeat;
+ display: block;
+ width: 670px;
+ height: 43px;
+ text-align: center;
+ color: #FFF;
+ padding: 5px;
+ text-decoration: none;
+ font-size: 1.5em;
+ top: -1px;
+ left: 25%;
+}
+#upgradeBrowser:hover {
+ text-decoration: underline;
+}
19 examples/03/browser.js
@@ -0,0 +1,19 @@
+(function($) {
+ $(document).ready(function() {
+ if ( $.browser.msie && $.browser.version < 7 ) {
+ $('body').append([ '<a id="upgradeBrowser" href="http://www.microsoft.com/ie/">You are using ',
+ ' Internet Explorer version ',
+ $.browser.version,
+ '. This web site is best experienced with Internet Explorer 7 or greater, click ',
+ 'here to upgrade.',
+ ' <span>[Hide]</span></a>'
+ ].join('') );
+ $('#upgradeBrowser span').click(function() {
+ $(this).parent().slideUp('normal', function() {
+ $(this).remove();
+ });
+ return false;
+ });
+ }
+ });
+})(jQuery);
17 examples/03/data-time.js
@@ -0,0 +1,17 @@
+(function($) {
+ $(document).ready(function() {
+ // Evertime data is set on the document object the 'setData' event is triggered
+ // We're testing for data with a key of 'clock' and executing a selector and updating the
+ // html of those elements
+ $(document).bind('setData', function(evt, key, value) {
+ if ( key == 'clock' ) {
+ $('.updateTime').html( value );
+ }
+ });
+
+ // Every 3 seconds this function is triggered setting data for 'clock' on the document object
+ setInterval(function() {
+ $(document).data('clock', (new Date()).toString() );
+ }, 3000);
+ });
+})(jQuery);
9 examples/03/data.js
@@ -0,0 +1,9 @@
+(function($) {
+ $(function() {
+ $('#myId').data('myObject', {
+ label: $('#myLabel').get()[0]
+ });
+ var myObject = $('#myId').data('myObject');
+ myObject.label;
+ });
+})(jQuery);
17 examples/03/each.js
@@ -0,0 +1,17 @@
+(function($) {
+ $(document).ready(function() {
+ var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
+ $.each(months, function(index, value) {
+ $('#months').append('<li>' + value + '</li>');
+ // Could also be written as
+ //$('#months').append('<li>' + this + '</li>');
+ });
+
+ var days = { Sunday: 0, Monday: 1, Tuesday: 2, Wednesday: 3, Thursday: 4, Friday: 5, Saturday: 6 };
+ $.each(days, function(key, value) {
+ $('#days').append('<li>' + key + ' (' + value + ')</li>');
+ // Could also be written as
+ //$('#days').append('<li>' + key + ' (' + this + ')</li>');
+ });
+ });
+})(jQuery);
10 examples/03/grep.js
@@ -0,0 +1,10 @@
+(function($) {
+ $(document).ready(function() {
+ var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
+ months = $.grep(months, function(value, i) {
+ return ( value.indexOf('J') == 0 );
+ //return ( i % 2 ) == 0;
+ });
+ $('#months').html( '<li>' + months.join('</li><li>') + '</li>' );
+ });
+})(jQuery);
19 examples/03/isfunction.js
@@ -0,0 +1,19 @@
+(function($) {
+ $.fn.myPlugin = function(settings) {
+ return this.each(function() {
+ settings = $.extend({ onShow: null }, settings);
+ $(this).show();
+ if ( $.isFunction( settings.onShow ) ) {
+ settings.onShow.call(this);
+ }
+ });
+ };
+
+ $(document).ready(function() {
+ $('div').myPlugin({
+ onShow: function() {
+ alert('My callback!');
+ }
+ });
+ });
+})(jQuery);
9 examples/03/map.js
@@ -0,0 +1,9 @@
+(function($) {
+ $(document).ready(function() {
+ var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
+ months = $.map(months, function(value, i) {
+ return value.substr(0, 3);
+ });
+ $('#months').html( '<li>' + months.join('</li><li>') + '</li>' );
+ });
+})(jQuery);
9 examples/03/merge.js
@@ -0,0 +1,9 @@
+(function($) {
+ $(document).ready(function() {
+ var horseBreeds = ['Quarter Horse', 'Thoroughbred', 'Arabian'];
+ var draftBreeds = ['Belgian', 'Percheron'];
+
+ var breeds = $.merge( horseBreeds, draftBreeds );
+ $('#horses').html( '<li>' + breeds.join('</li><li>') + '</li>' );
+ });
+})(jQuery);
8 examples/03/trim.js
@@ -0,0 +1,8 @@
+(function($) {
+ $(document).ready(function() {
+ $('input.cleanup').blur(function() {
+ var value = $.trim( $(this).val() );
+ $(this).val( value );
+ });
+ });
+})(jQuery);
30 examples/04/add.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Language" content="en-us" />
+ <title>Add User</title>
+</head>
+<body>
+
+<form action="add.html" method="post">
+ <div>
+ <label for="username">Username:</label>
+ <input name="username" id="username" />
+ </div>
+ <div>
+ <label for="firstname">First Name:</label>
+ <input name="firstname" id="firstname" />
+ </div>
+ <div>
+ <label for="lastname">Last Name:</label>
+ <input name="lastname" id="lastname" />
+ </div>
+ <div>
+ <input type="submit" value="add user" />
+ </div>
+</form>
+
+</body>
+</html>
103 examples/04/cache-your-objects.html
@@ -0,0 +1,103 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Write Faster Selectors and Cache Your Objects - jQuery </title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Language" content="en-us" />
+
+ <script type="text/javascript" src="cache-your-objects.js"></script>
+ <script type="text/javascript" src="tools.js"></script>
+
+ <link rel="stylesheet" type="text/css" href="style.css" />
+ <style type="text/css">
+ .mark {
+ cursor: default;
+ width: 5px;
+ height: 5px;
+ background-color: red;
+ position: absolute;
+ z-index: -1;
+ }
+ </style>
+
+ <script type="text/javascript">
+ main();
+ </script>
+
+</head>
+<body style="width:100%; height:100%; margin:0; padding:0; overflow:hidden;">
+
+ <div style="margin:8px;">
+
+ <div style="margin-bottom:16px;">
+ <div style="float:left; margin-right:30px;">
+ <script type="text/javascript">
+ writeSelect();
+ </script>
+ </div>
+ <div id="methods" style="float:left;">
+ <div>
+ <label for="rdoClass">
+ <input type="radio" name="method" value="class" id="rdoClass" checked="checked" />
+ <code>$('.foo')</code> - Class Selectors
+ </label>
+ </div>
+ <div>
+ <label for="rdoScoped">
+ <input type="radio" name="method" value="scoped" id="rdoScoped" />
+ <code>$('#foo td.bar')</code> - Scoped Selectors
+ </label>
+ </div>
+ <div>
+ <label for="rdoId">
+ <input type="radio" name="method" value="id" id="rdoId" />
+ <code>$('#foo')</code> - ID Selectors
+ </label>
+ </div>
+ <div>
+ <label for="rdoCache">
+ <input type="radio" name="method" value="cache" id="rdoCache" />
+ <code>var $foo</code> - Cache Objects
+ </label>
+ </div>
+ </div>
+ <div style="clear:left;">
+ </div>
+ </div>
+
+ <div style="margin-bottom:16px;">
+ </div>
+
+ <div style="margin-bottom:16px;">
+ Move the mouse and observe the trail smoothness and the Update Time shown below.<br />
+ Each point in the mouse trail represents one <code>mousemove</code> event.<br />
+ The trail "cleanup" runs on a <code>setInterval()</code> timer.
+ If the cleanup falls far behind it means the timer is not being called
+ often enough, probably because the other JavaScript code takes too long.<br />
+ Try both versions of jQuery and each of the selector options.<br />
+ Especially note performance in IE7 and IE8.<br />
+ Bonus fun: Overlap a few windows from different browsers and move the mouse around on all of them.
+ </div>
+
+ <table>
+ <tr><td>Update Time:</td><td id="time"></td></tr>
+ <tr><td>Count:</td><td id="count" class="count"></td></tr>
+ <tr><td>Timestamp:</td><td id="timeStamp" class="timeStamp"></td></tr>
+ <tr><td>Target:</td><td id="target" class="target"></td></tr>
+ <tr><td>Client X:</td><td id="clientX" class="clientX"></td></tr>
+ <tr><td>Client Y:</td><td id="clientY" class="clientY"></td></tr>
+ <tr><td>Page X:</td><td id="pageX" class="pageX"></td></tr>
+ <tr><td>Page Y:</td><td id="pageY" class="pageY"></td></tr>
+ <tr><td>Screen X:</td><td id="screenX" class="screenX"></td></tr>
+ <tr><td>Screen Y:</td><td id="screenY" class="screenY"></td></tr>
+ </table>
+
+ <script type="text/javascript">
+ bigdoc();
+ </script>
+
+ </div>
+
+</body>
+</html>
150 examples/04/cache-your-objects.js
@@ -0,0 +1,150 @@
+// cache-your-objects.js
+
+var jq = location.hash == '#126' ?
+ { ver:'1.2.6', other:'1.3.2', hash:'#132' } :
+ { ver:'1.3.2', other:'1.2.6', hash:'#126' };
+
+document.title += jq.ver;
+
+document.write(
+ '<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/', jq.ver, '/jquery.js">',
+ '<\/script>'
+);
+
+function main() {
+
+ jQuery(function() {
+
+ function trail( event ) {
+ var x = event.clientX, y = event.clientY;
+ if( x == trail.last.x && y == trail.last.y ) return;
+ trail.last = { x: x, y: y };
+ trail.queue.push({
+ $mark: $('<div class="mark">&nbsp;</div>')
+ .css({ left: x - 2, top: y - 2 })
+ .appendTo('body'),
+ time: +new Date
+ });
+ }
+ trail.keeptime = 1000;
+ trail.queue = [];
+ trail.last = {};
+
+ setInterval( function() {
+ while(
+ trail.queue[0] &&
+ trail.queue[0].time + trail.keeptime < +new Date
+ ) {
+ trail.queue.shift().$mark.remove();
+ }
+ }, 25 );
+
+ var count = 0;
+
+ $('#switch').click( function() {
+ setTimeout( function() { location.reload(); }, 1 );
+ });
+
+ function tf( value ) { return value ? 'true' : 'false'; }
+
+ function tagInfo( event ) {
+ var target = event.target;
+ return S(
+ target.tagName.toLowerCase(),
+ target.id ? '#' + target.id : '',
+ target.className ? '.' + target.className : ''
+ );
+ }
+
+ var technique =
+ $('#methods input:radio')
+ .click( function() { technique = this.value; })
+ .filter(':checked').val();
+
+ var $count = $('#count');
+ var $timeStamp = $('#timeStamp');
+ var $target = $('#target');
+ var $clientX = $('#clientX');
+ var $clientY = $('#clientY');
+ var $pageX = $('#pageX');
+ var $pageY = $('#pageY');
+ var $screenX = $('#screenX');
+ var $screenY = $('#screenY');
+
+ $('html').mousemove( function( event ) {
+
+ ++count;
+ var start = +new Date;
+
+ switch( technique ) {
+
+ case 'class':
+ $('.count').html( count );
+ $('.timeStamp').html( event.timeStamp );
+ $('.target').html( tagInfo(event) );
+ $('.clientX').html( event.clientX );
+ $('.clientY').html( event.clientY );
+ $('.pageX').html( event.pageX );
+ $('.pageY').html( event.pageY );
+ $('.screenX').html( event.screenX );
+ $('.screenY').html( event.screenY );
+ break;
+
+ case 'scoped':
+ $('#log td.count').html( count );
+ $('#log td.timeStamp').html( event.timeStamp );
+ $('#log td.target').html( tagInfo(event) );
+ $('#log td.clientX').html( event.clientX );
+ $('#log td.clientY').html( event.clientY );
+ $('#log td.pageX').html( event.pageX );
+ $('#log td.pageY').html( event.pageY );
+ $('#log td.screenX').html( event.screenX );
+ $('#log td.screenY').html( event.screenY );
+ break;
+
+ case 'id':
+ $('#count').html( count );
+ $('#timeStamp').html( event.timeStamp );
+ $('#target').html( tagInfo(event) );
+ $('#clientX').html( event.clientX );
+ $('#clientY').html( event.clientY );
+ $('#pageX').html( event.pageX );
+ $('#pageY').html( event.pageY );
+ $('#screenX').html( event.screenX );
+ $('#screenY').html( event.screenY );
+ break;
+
+ case 'cache':
+ $count.html( count );
+ $timeStamp.html( event.timeStamp );
+ $target.html( tagInfo(event) );
+ $clientX.html( event.clientX );
+ $clientY.html( event.clientY );
+ $pageX.html( event.pageX );
+ $pageY.html( event.pageY );
+ $screenX.html( event.screenX );
+ $screenY.html( event.screenY );
+ break;
+ }
+
+ var now = +new Date;
+
+ $('#time').html( ( ( now - start ) / 1000 ).toFixed(3) );
+
+ trail( event );
+ });
+
+ });
+
+}
+
+function writeSelect() {
+ document.write(
+ '<div style="margin-bottom:6px; font-weight:bold;">',
+ 'Using jQuery ', jq.ver,
+ '</div>',
+ '<div>',
+ '<a id="switch" href="', jq.hash, '">Switch to jQuery ', jq.other, '</a>',
+ '</div>'
+ );
+}
71 examples/04/fastest-table-in-the-west.html
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html lang="en">
+<head>
+ <title>Table loader - fast</title>
+
+ <link rel="stylesheet" type="text/css" href="style.css" />
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"></script>
+ <script type="text/javascript" src="tools.js"></script>
+
+ <script type="text/javascript">
+
+ function esc( text ) {
+ return text
+ .replace( '&', '&amp;' )
+ .replace( '<', '&lt;' )
+ .replace( '>', '&gt;' );
+ }
+
+ $(document).ready( function() {
+
+ time( '$(ready)' );
+
+ function fillTable( names ) {
+ var e = esc;
+ var html = [], h = -1;
+ html[++h] = '<table id="nameTable">';
+ html[++h] = '<tbody>';
+ for( var name, i = -1; name = names[++i]; ) {
+ html[++h] = '<tr><td class="name">';
+ html[++h] = e(name.first);
+ html[++h] = ' ';
+ html[++h] = e(name.last);
+ html[++h] = '</td><td class="address">';
+ html[++h] = e(name.street);
+ html[++h] = '<br />';
+ html[++h] = e(name.city);
+ html[++h] = ', ';
+ html[++h] = e(name.state);
+ html[++h] = ' ';
+ html[++h] = e(name.zip);
+ html[++h] = '</td></tr>';
+ }
+ html[++h] = '</tbody>';
+ html[++h] = '</table>';
+
+ $('#container')[0].innerHTML = html.join('');
+ }
+
+ $.getJSON( 'names/names-1000.json', function( json ) {
+ time( 'getJSON' );
+ fillTable( json.names );
+ time( 'fillTable' );
+ time.done( '#log' );
+ });
+ });
+
+ </script>
+
+</head>
+<body>
+
+ <div id="log">
+ Loading&#8230;
+ </div>
+
+ <div id="container">
+ </div>
+
+</body>
+</html>
66 examples/04/format-your-jquery-chains.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Language" content="en-us" />
+ <title>Format Your jQuery Chains - jQuery Cookbook</title>
+
+ <style type="text/css">
+ .contentBox {
+ border: 1px solid #333;
+ width: 600px;
+ }
+ .contentTitle {
+ font-size: 1.5em;
+ margin: 0;
+ padding: 5px;
+ text-align: center;
+ }
+ .contentBody {
+ border-top: 1px solid #333;
+ padding: 5px;
+ }
+ .contentFooter {
+ background-color: #ccc;
+ border-top: 1px solid #333;
+ padding: 5px;
+ }
+ </style>
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js">',
+ </script>
+
+ <script type="text/javascript">
+
+ $(document).ready(function() {
+ $('#box')
+ .addClass('contentBox')
+ .children(':header')
+ .addClass('contentTitle')
+ .click(function() {
+ $(this).siblings('.contentBody').toggle();
+ })
+ .end()
+ .children(':not(.contentTitle)')
+ .addClass('contentBody')
+ .end()
+ .append('<div class="contentFooter"></div>')
+ .children('.contentFooter')
+ .text('generated content');
+ });
+
+ </script>
+</head>
+<body>
+
+<div id="box">
+ <h1>Click here to expand or collapse</h1>
+ <div>
+ <p>write less</p>
+ <p>do more</p>
+ </div>
+</div>
+
+</body>
+</html>
62 examples/04/good-composers-borrow.html
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Good Composers Borrow - jQuery Cookbook</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Language" content="en-us" />
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js">',
+ </script>
+
+ <style type="text/css">
+ .clickme {
+ margin: 8px;
+ padding: 8px;
+ border: 1px solid #888;
+ background-color: #EEE;
+ width: 8em;
+ text-align: center;
+ cursor: pointer;
+ }
+ .active {
+ border: 1px solid #F00;
+ background-color:#FCC;
+ }
+ </style>
+
+ <script type="text/javascript">
+
+ jQuery.fn.radioClass = function( cls ) {
+ return this // Start chain, will return its result
+ .siblings() // Select all siblings of selected elements
+ .removeClass(cls) // Remove class from those siblings
+ .end() // Go back to original selection
+ .addClass(cls); // Add class to selected elements
+ };
+
+ $(document).ready( function() {
+
+ $('.clickme').click( function() {
+ $(this).radioClass( 'active' );
+ });
+
+ });
+
+ </script>
+
+</head>
+<body style="">
+
+ <div style="margin:8px;">
+
+ <div class="clickme">Click Me</div>
+ <div class="clickme">Click Me</div>
+ <div class="clickme">Click Me</div>
+ <div class="clickme">Click Me</div>
+ <div class="clickme">Click Me</div>
+
+ </div>
+
+</body>
+</html>
136 examples/04/make-your-pages-accessible.html
@@ -0,0 +1,136 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta http-equiv="Content-Language" content="en-us" />
+ <title>Dialog Demo</title>
+
+ <style type="text/css">
+ table {
+ border-collapse: collapse;
+ width: 500px;
+ }
+ th, td {
+ border: 1px solid #000;
+ padding: 2px 5px;
+ }
+ .dialog {
+ position: absolute;
+ background-color: #fff;
+ border: 1px solid #000;
+ width: 400px;
+ padding: 10px;
+ }
+ .dialog h1 {
+ margin: 0 0 10px;
+ }
+ .dialog .close {
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ }
+ </style>
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js">',
+ </script>
+
+ <script type="text/javascript">
+
+ $(document).ready(function() {
+ function close() {
+ dialog.hide();
+ $('#add-user').focus();
+ }
+
+ var title = $('<h1>Add User</h1>')
+ .attr('id', 'add-user-title'),
+
+ closeButton = $('<button>close</button>')
+ .addClass('close')
+ .click(close)
+ .appendTo(title),
+
+ content = $('<div/>')
+ .load('add.html'),
+
+ dialog = $('<div/>')
+ .attr({
+ role: 'dialog',
+ 'aria-labelledby': 'add-user-title'
+ })
+ .addClass('dialog')
+ .keypress(function(event) {
+ if (event.keyCode == 27) {
+ close();
+ }
+ })
+ .append(title)
+ .append(content)
+ .hide()
+ .appendTo('body');
+
+ $('#add-user').click(function() {
+ var height = dialog.height(),
+ width = dialog.width();
+
+ dialog
+ .css({
+ top: ($(window).height() - height) / 2 + $(document).scrollTop(),
+ left: ($(window).width() - width) / 2 + $(document).scrollLeft()
+ })
+ .show();
+
+ dialog.find('#username').focus();
+
+ return false;
+ });
+ });
+
+ </script>
+</head>
+<body>
+
+<h1>Users</h1>
+
+<a id="add-user" href="add.html">add a user</a>
+
+<table>
+<thead>
+ <tr>
+ <th>User</th>
+ <th>First Name</th>
+ <th>Last Name</th>
+ </tr>
+</thead>
+<tbody>
+ <tr>
+ <td>jsmith</td>
+ <td>John</td>
+ <td>Smith</td>
+ </tr>
+ <tr>
+ <td>mrobertson</td>
+ <td>Mike</td>
+ <td>Robertson</td>
+ </tr>
+ <tr>
+ <td>arodriguez</td>
+ <td>Angela</td>
+ <td>Rodriguez</td>
+ </tr>
+ <tr>
+ <td>lsamseil</td>
+ <td>Lee</td>
+ <td>Samseil</td>
+ </tr>
+ <tr>
+ <td>lweick</td>
+ <td>Lauren</td>
+ <td>Weick</td>
+ </tr>
+</tbody>
+</table>
+
+</body>
+</html>
99 examples/04/names/city.suffixes
@@ -0,0 +1,99 @@
+Annex
+Bayoo
+Beach
+Bluff
+Bluffs
+Branch
+Brook
+Brooks
+Burg
+Burgs
+Camp
+Canyon
+Center
+Centers
+Common
+Corner
+Corners
+Cove
+Coves
+Creek
+Divide
+Estate
+Estates
+Fall
+Falls
+Ferry
+Field
+Fields
+Flat
+Flats
+Forge
+Forges
+Fort
+Garden
+Gardens
+Glen
+Glens
+Green
+Greens
+Grove
+Groves
+Harbor
+Harbors
+Hill
+Hills
+Hollow
+Island
+Islands
+Isle
+Key
+Keys
+Lake
+Lakes
+Land
+Landing
+Loaf
+Lock
+Locks
+Manor
+Manors
+Meadow
+Meadows
+Mews
+Mill
+Mills
+Mount
+Mountain
+Mountains
+Neck
+Orchard
+Plain
+Plains
+Point
+Points
+Port
+Ports
+Prairie
+Ranch
+Rapid
+Rapids
+Ridge
+Ridges
+River
+Shoal
+Shoals
+Shore
+Shores
+Spring
+Springs
+Station
+Stream
+Summit
+Union
+Unions
+Valley
+Valleys
+Village
+Villages
+Ville
40,000 examples/04/names/dist.all.last
40,000 additions, 0 deletions not shown
4,275 examples/04/names/dist.female.first
@@ -0,0 +1,4275 @@
+Mary
+Patricia
+Linda
+Barbara
+Elizabeth
+Jennifer
+Maria
+Susan
+Margaret
+Dorothy
+Lisa
+Nancy
+Karen
+Betty
+Helen
+Sandra
+Donna
+Carol
+Ruth
+Sharon
+Michelle
+Laura
+Sarah
+Kimberly
+Deborah
+Jessica
+Shirley
+Cynthia
+Angela
+Melissa
+Brenda
+Amy
+Anna
+Rebecca
+Virginia
+Kathleen
+Pamela
+Martha
+Debra
+Amanda
+Stephanie
+Carolyn
+Christine
+Marie
+Janet
+Catherine
+Frances
+Ann
+Joyce
+Diane
+Alice
+Julie
+Heather
+Teresa
+Doris
+Gloria
+Evelyn
+Jean
+Cheryl
+Mildred
+Katherine
+Joan
+Ashley
+Judith
+Rose
+Janice
+Kelly
+Nicole
+Judy
+Christina
+Kathy
+Theresa
+Beverly
+Denise
+Tammy
+Irene
+Jane
+Lori
+Rachel
+Marilyn
+Andrea
+Kathryn
+Louise
+Sara
+Anne
+Jacqueline
+Wanda
+Bonnie
+Julia
+Ruby
+Lois
+Tina
+Phyllis
+Norma
+Paula
+Diana
+Annie
+Lillian
+Emily
+Robin
+Peggy
+Crystal
+Gladys
+Rita
+Dawn
+Connie
+Florence
+Tracy
+Edna
+Tiffany
+Carmen
+Rosa
+Cindy
+Grace
+Wendy
+Victoria
+Edith
+Kim
+Sherry
+Sylvia
+Josephine
+Thelma
+Shannon
+Sheila
+Ethel
+Ellen
+Elaine
+Marjorie
+Carrie
+Charlotte
+Monica
+Esther
+Pauline
+Emma
+Juanita
+Anita
+Rhonda
+Hazel
+Amber
+Eva
+Debbie
+April
+Leslie
+Clara
+Lucille
+Jamie
+Joanne
+Eleanor
+Valerie
+Danielle
+Megan
+Alicia
+Suzanne
+Michele
+Gail
+Bertha
+Darlene
+Veronica
+Jill
+Erin
+Geraldine
+Lauren
+Cathy
+Joann
+Lorraine
+Lynn
+Sally
+Regina
+Erica
+Beatrice
+Dolores
+Bernice
+Audrey
+Yvonne
+Annette
+June
+Samantha
+Marion
+Dana
+Stacy
+Ana
+Renee
+Ida
+Vivian
+Roberta
+Holly
+Brittany
+Melanie
+Loretta
+Yolanda
+Jeanette
+Laurie
+Katie
+Kristen
+Vanessa
+Alma
+Sue
+Elsie
+Beth
+Jeanne
+Vicki
+Carla
+Tara
+Rosemary
+Eileen
+Terri
+Gertrude
+Lucy
+Tonya
+Ella
+Stacey
+Wilma
+Gina
+Kristin
+Jessie
+Natalie
+Agnes
+Vera
+Willie
+Charlene
+Bessie
+Delores
+Melinda
+Pearl
+Arlene
+Maureen
+Colleen
+Allison
+Tamara
+Joy
+Georgia
+Constance
+Lillie
+Claudia
+Jackie
+Marcia
+Tanya
+Nellie
+Minnie
+Marlene
+Heidi
+Glenda
+Lydia
+Viola
+Courtney
+Marian