github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jquery / jquery-api-browser

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 17
    • 2
  • Source
  • Commits
  • Network (2)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Tree: 03d47f5
  • Branches (1)
    • master
  • Tags (0)
  • Comments
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

A standalone browser for the jQuery API (also deployable as an AIR application). — Read more

or cancel

http://api.jquery.com/

or cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Moving over from the jQuery SVN repository.
jeresig (author)
Sat Jul 25 07:50:24 -0700 2009
commit  03d47f5c014207954d7727c044202d4e5ab192aa
tree    8f13eb97249fda49d7ce4ebdb48de31c08f3aa7c
A application.html 51 •••••
A application.xml 126 •••••
A assets/.svn/all-wcprops 5 •••••
A assets/.svn/entries 37 •••••
A assets/.svn/format 1 •
A assets/css/.svn/all-wcprops 23 •••••
A assets/css/.svn/entries 65 •••••
A assets/css/.svn/format 1 •
A assets/css/.svn/prop-base/Print.css.svn-base 5 •••••
A assets/css/.svn/text-base/APIBrowser.css.svn-base 456 •••••
A assets/css/.svn/text-base/Print.css.svn-base 29 •••••
A assets/css/.svn/text-base/Splash.css.svn-base 28 •••••
A assets/css/APIBrowser.css 456 •••••
A assets/css/Print.css 29 •••••
A assets/css/Splash.css 28 •••••
A assets/html/.svn/all-wcprops 17 •••••
A assets/html/.svn/entries 52 •••••
A assets/html/.svn/format 1 •
A assets/html/.svn/text-base/APIBrowser.html.svn-base 11 •••••
A assets/html/.svn/text-base/Splash.html.svn-base 16 •••••
A assets/html/APIBrowser.html 11 •••••
A assets/html/Splash.html 16 •••••
A assets/images/.svn/all-wcprops 203 •••••
A assets/images/.svn/entries 457 •••••
A assets/images/.svn/format 1 •
A assets/images/.svn/prop-base/accept.png.svn-base 9 •••••
A assets/images/.svn/prop-base/background.png.svn-base 5 •••••
A assets/images/.svn/prop-base/badge.jpg.svn-base 5 •••••
A assets/images/.svn/prop-base/badge.png.svn-base 5 •••••
A assets/images/.svn/prop-base/bg_home_tile_sml.jpg.svn-base 5 •••••
A assets/images/.svn/prop-base/bg_secondaryNav_left.gif.svn-base 5 •••••
A assets/images/.svn/prop-base/bg_secondaryNav_right.gif.svn-base 5 •••••
A assets/images/.svn/prop-base/bullet_go.png.svn-base 9 •••••
A assets/images/.svn/prop-base/cancel.png.svn-base 9 •••••
A assets/images/.svn/prop-base/close-ui.png.svn-base 5 •••••
A assets/images/.svn/prop-base/close.png.svn-base 5 •••••
A assets/images/.svn/prop-base/delete.png.svn-base 9 •••••
A assets/images/.svn/prop-base/fav-off.png.svn-base 5 •••••
A assets/images/.svn/prop-base/fav-on.png.svn-base 9 •••••
A assets/images/.svn/prop-base/icons.png.svn-base 5 •••••
A assets/images/.svn/prop-base/jQueryAPIOffline.png.svn-base 5 •••••
A assets/images/.svn/prop-base/jQueryAPIOnline.png.svn-base 5 •••••
A assets/images/.svn/prop-base/jquery.gif.svn-base 5 •••••
A assets/images/.svn/prop-base/large-spinner.gif.svn-base 5 •••••
A assets/images/.svn/prop-base/logo_jquery_215x53.gif.svn-base 5 •••••
A assets/images/.svn/prop-base/op1.png.svn-base 5 •••••
A assets/images/.svn/prop-base/op10.png.svn-base 5 •••••
A assets/images/.svn/prop-base/op2.png.svn-base 5 •••••
A assets/images/.svn/prop-base/op3.png.svn-base 5 •••••
A assets/images/.svn/prop-base/op4.png.svn-base 5 •••••
A assets/images/.svn/prop-base/op5.png.svn-base 5 •••••
A assets/images/.svn/prop-base/op6.png.svn-base 5 •••••
A assets/images/.svn/prop-base/op7.png.svn-base 5 •••••
A assets/images/.svn/prop-base/op8.png.svn-base 5 •••••
A assets/images/.svn/prop-base/op9.png.svn-base 5 •••••
A assets/images/.svn/prop-base/open-ui.png.svn-base 5 •••••
A assets/images/.svn/prop-base/shadow.png.svn-base 5 •••••
A assets/images/.svn/prop-base/spinner.gif.svn-base 5 •••••
A assets/images/.svn/text-base/accept.png.svn-base 0
A assets/images/.svn/text-base/background.png.svn-base 0
A assets/images/.svn/text-base/badge.jpg.svn-base 0
A assets/images/.svn/text-base/badge.png.svn-base 0
A assets/images/.svn/text-base/bg_home_tile_sml.jpg.svn-base 0
A assets/images/.svn/text-base/bg_secondaryNav_left.gif.svn-base 0
A assets/images/.svn/text-base/bg_secondaryNav_right.gif.svn-base 0
A assets/images/.svn/text-base/bullet_go.png.svn-base 0
A assets/images/.svn/text-base/cancel.png.svn-base 0
A assets/images/.svn/text-base/close-ui.png.svn-base 0
A assets/images/.svn/text-base/close.png.svn-base 0
A assets/images/.svn/text-base/delete.png.svn-base 0
A assets/images/.svn/text-base/fav-off.png.svn-base 0
A assets/images/.svn/text-base/fav-on.png.svn-base 0
A assets/images/.svn/text-base/icons.png.svn-base 0
A assets/images/.svn/text-base/jQueryAPIOffline.png.svn-base 0
A assets/images/.svn/text-base/jQueryAPIOnline.png.svn-base 0
A assets/images/.svn/text-base/jquery.gif.svn-base 0
A assets/images/.svn/text-base/large-spinner.gif.svn-base 0
A assets/images/.svn/text-base/logo_jquery_215x53.gif.svn-base 0
A assets/images/.svn/text-base/op1.png.svn-base 0
A assets/images/.svn/text-base/op10.png.svn-base 0
A assets/images/.svn/text-base/op2.png.svn-base 0
A assets/images/.svn/text-base/op3.png.svn-base 0
A assets/images/.svn/text-base/op4.png.svn-base 0
A assets/images/.svn/text-base/op5.png.svn-base 0
A assets/images/.svn/text-base/op6.png.svn-base 0
A assets/images/.svn/text-base/op7.png.svn-base 0
A assets/images/.svn/text-base/op8.png.svn-base 0
A assets/images/.svn/text-base/op9.png.svn-base 0
A assets/images/.svn/text-base/open-ui.png.svn-base 0
A assets/images/.svn/text-base/shadow.png.svn-base 0
A assets/images/.svn/text-base/spinner.gif.svn-base 0
A assets/images/accept.png 0
A assets/images/background.png 0
A assets/images/badge.jpg 0
A assets/images/badge.png 0
A assets/images/bg_home_tile_sml.jpg 0
A assets/images/bg_secondaryNav_left.gif 0
A assets/images/bg_secondaryNav_right.gif 0
A assets/images/bullet_go.png 0
A assets/images/cancel.png 0
A assets/images/close-ui.png 0
A assets/images/close.png 0
A assets/images/delete.png 0
A assets/images/fav-off.png 0
A assets/images/fav-on.png 0
A assets/images/icons.png 0
A assets/images/jQueryAPIOffline.png 0
A assets/images/jQueryAPIOnline.png 0
A assets/images/jquery.gif 0
A assets/images/large-spinner.gif 0
A assets/images/logo_jquery_215x53.gif 0
A assets/images/op1.png 0
A assets/images/op10.png 0
A assets/images/op2.png 0
A assets/images/op3.png 0
A assets/images/op4.png 0
A assets/images/op5.png 0
A assets/images/op6.png 0
A assets/images/op7.png 0
A assets/images/op8.png 0
A assets/images/op9.png 0
A assets/images/open-ui.png 0
A assets/images/shadow.png 0
A assets/images/spinner.gif 0
A badge.swf 0
A certificate.pfx 0
A icons/.svn/all-wcprops 29 •••••
A icons/.svn/entries 80 •••••
A icons/.svn/format 1 •
A icons/.svn/prop-base/AIRApp_128.png.svn-base 5 •••••
A icons/.svn/prop-base/AIRApp_16.png.svn-base 5 •••••
A icons/.svn/prop-base/AIRApp_32.png.svn-base 5 •••••
A icons/.svn/prop-base/AIRApp_48.png.svn-base 5 •••••
A icons/.svn/text-base/AIRApp_128.png.svn-base 0
A icons/.svn/text-base/AIRApp_16.png.svn-base 0
A icons/.svn/text-base/AIRApp_32.png.svn-base 0
A icons/.svn/text-base/AIRApp_48.png.svn-base 0
A icons/AIRApp_128.png 0
A icons/AIRApp_16.png 0
A icons/AIRApp_32.png 0
A icons/AIRApp_48.png 0
A index-blank.html 24 •••••
A index.html 124 •••••
A index.php 373 •••••
A lib/.svn/all-wcprops 5 •••••
A lib/.svn/entries 40 •••••
A lib/.svn/format 1 •
A lib/air/.svn/all-wcprops 53 •••••
A lib/air/.svn/entries 127 •••••
A lib/air/.svn/format 1 •
A lib/air/.svn/prop-base/AC_RunActiveContent.js.svn-base 5 •••••
A lib/air/.svn/prop-base/applicationupdater.swf.svn-base 5 •••••
A lib/air/.svn/prop-base/servicemonitor.swf.svn-base 5 •••••
A lib/air/.svn/text-base/AC_RunActiveContent.js.svn-base 292 •••••
A lib/air/.svn/text-base/AIRAliases.js.svn-base 208 •••••
A lib/air/.svn/text-base/AIRIntrospector.js.svn-base 1,949 •••••
A lib/air/.svn/text-base/AIRLocalizer.js.svn-base 1,325 •••••
A lib/air/.svn/text-base/AIRMenuBuilder.js.svn-base 1,322 •••••
A lib/air/.svn/text-base/AIRSourceViewer.js.svn-base 2,933 •••••
A lib/air/.svn/text-base/applicationupdater.swf.svn-base 0
A lib/air/.svn/text-base/servicemonitor.swf.svn-base 0
A lib/air/AC_RunActiveContent.js 292 •••••
A lib/air/AIRAliases.js 208 •••••
A lib/air/AIRIntrospector.js 1,949 •••••
A lib/air/AIRLocalizer.js 1,325 •••••
A lib/air/AIRMenuBuilder.js 1,322 •••••
A lib/air/AIRSourceViewer.js 2,933 •••••
A lib/air/applicationupdater.swf 0
A lib/air/servicemonitor.swf 0
A lib/docs/.svn/all-wcprops 23 •••••
A lib/docs/.svn/entries 64 •••••
A lib/docs/.svn/format 1 •
A lib/docs/.svn/text-base/api-docs.js.svn-base 1 •
A lib/docs/.svn/text-base/api-docs.xml.svn-base 4,241 •••••
A lib/docs/.svn/text-base/plugins.xml.svn-base 265 •••••
A lib/docs/api-docs.js 1 •
A lib/docs/api-docs.xml 4,241 •••••
A lib/docs/plugins.xml 265 •••••
A lib/jquery/.svn/all-wcprops 17 •••••
A lib/jquery/.svn/entries 52 •••••
A lib/jquery/.svn/format 1 •
A lib/jquery/.svn/text-base/jquery-1.3.min.js.svn-base 19 •••••
A lib/jquery/.svn/text-base/jquery-1.3b1.js.svn-base 4,102 •••••
A lib/jquery/jquery-1.3.min.js 19 •••••
A lib/jquery/jquery-1.3b1.js 4,102 •••••
A lib/jqueryapi/.svn/all-wcprops 47 •••••
A lib/jqueryapi/.svn/entries 113 •••••
A lib/jqueryapi/.svn/format 1 •
A lib/jqueryapi/.svn/prop-base/jquery.history.js.svn-base 13 •••••
A lib/jqueryapi/.svn/text-base/api-browser.js.svn-base 487 •••••
A lib/jqueryapi/.svn/text-base/api-loader.js.svn-base 504 •••••
A lib/jqueryapi/.svn/text-base/cookie.js.svn-base 36 •••••
A lib/jqueryapi/.svn/text-base/jquery.history.js.svn-base 172 •••••
A lib/jqueryapi/.svn/text-base/jquery.tojson.js.svn-base 81 •••••
A lib/jqueryapi/.svn/text-base/json2.js.svn-base 478 •••••
A lib/jqueryapi/.svn/text-base/pretty.js.svn-base 1,484 •••••
A lib/jqueryapi/api-browser.js 487 •••••
A lib/jqueryapi/api-loader.js 504 •••••
A lib/jqueryapi/cookie.js 36 •••••
A lib/jqueryapi/jquery.history.js 172 •••••
A lib/jqueryapi/jquery.tojson.js 81 •••••
A lib/jqueryapi/json2.js 478 •••••
A lib/jqueryapi/pretty.js 1,484 •••••
A no-scroll-application.xml 101 •••••
A src/.svn/all-wcprops 11 •••••
A src/.svn/entries 58 •••••
A src/.svn/format 1 •
A src/.svn/text-base/jQueryAPI.js.svn-base 42 •••••
A src/Chrome/.svn/all-wcprops 23 •••••
A src/Chrome/.svn/entries 64 •••••
A src/Chrome/.svn/format 1 •
A src/Chrome/.svn/text-base/APIBrowser.js.svn-base 91 •••••
A src/Chrome/.svn/text-base/Popup.js.svn-base 48 •••••
A src/Chrome/.svn/text-base/Splash.js.svn-base 101 •••••
A src/Chrome/APIBrowser.js 91 •••••
A src/Chrome/Popup.js 48 •••••
A src/Chrome/Splash.js 101 •••••
A src/Database/.svn/all-wcprops 41 •••••
A src/Database/.svn/entries 100 •••••
A src/Database/.svn/format 1 •
A src/Database/.svn/text-base/ConnectToFile.js.svn-base 37 •••••
A src/Database/.svn/text-base/CreateDB.js.svn-base 12 •••••
A src/Database/.svn/text-base/ErrorHandler.js.svn-base 7 •••••
A src/Database/.svn/text-base/Query.js.svn-base 44 •••••
A src/Database/.svn/text-base/SaveOrCreateOption.js.svn-base 40 •••••
A src/Database/.svn/text-base/SetupFirstRun.js.svn-base 5 •••••
A src/Database/ConnectToFile.js 37 •••••
A src/Database/CreateDB.js 12 •••••
A src/Database/ErrorHandler.js 7 •••••
A src/Database/Query.js 44 •••••
A src/Database/SaveOrCreateOption.js 40 •••••
A src/Database/SetupFirstRun.js 5 •••••
A src/Menu/.svn/all-wcprops 29 •••••
A src/Menu/.svn/entries 76 •••••
A src/Menu/.svn/format 1 •
A src/Menu/.svn/text-base/AddMenuItems.js.svn-base 37 •••••
A src/Menu/.svn/text-base/Initialise.js.svn-base 12 •••••
A src/Menu/.svn/text-base/MenuItemClickHandler.js.svn-base 25 •••••
A src/Menu/.svn/text-base/SystrayClickHandler.js.svn-base 3 •••
A src/Menu/AddMenuItems.js 37 •••••
A src/Menu/Initialise.js 12 •••••
A src/Menu/MenuItemClickHandler.js 25 •••••
A src/Menu/SystrayClickHandler.js 3 •••
A src/Network/.svn/all-wcprops 29 •••••
A src/Network/.svn/entries 76 •••••
A src/Network/.svn/format 1 •
A src/Network/.svn/text-base/Initialise.js.svn-base 19 •••••
A src/Network/.svn/text-base/Offline.js.svn-base 4 ••••
A src/Network/.svn/text-base/Online.js.svn-base 8 •••••
A src/Network/.svn/text-base/URLStatus.js.svn-base 8 •••••
A src/Network/Initialise.js 19 •••••
A src/Network/Offline.js 4 ••••
A src/Network/Online.js 8 •••••
A src/Network/URLStatus.js 8 •••••
A src/System/.svn/all-wcprops 11 •••••
A src/System/.svn/entries 40 •••••
A src/System/.svn/format 1 •
A src/System/.svn/text-base/ParseCLI.js.svn-base 19 •••••
A src/System/ParseCLI.js 19 •••••
A src/Update/.svn/all-wcprops 17 •••••
A src/Update/.svn/entries 52 •••••
A src/Update/.svn/format 1 •
A src/Update/.svn/text-base/AppVersionCheck.js.svn-base 68 •••••
A src/Update/.svn/text-base/InvokeApplicationUpdate.js.svn-base 21 •••••
A src/Update/AppVersionCheck.js 68 •••••
A src/Update/InvokeApplicationUpdate.js 21 •••••
A src/jQueryAPI.js 42 •••••
A update.xml 7 •••••
0
application.html
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
0
@@ -0,0 +1,51 @@
0
+<html>
0
+  <head>
0
+        <title>AIR API Browser</title>
0
+        <script type="text/javascript" src="lib/air/AIRAliases.js"></script>
0
+        <script type="text/javascript" src="lib/air/AIRLocalizer.js"></script>
0
+        <script type="text/javascript" src="lib/air/AIRMenuBuilder.js"></script>
0
+        <script type="text/javascript" src="lib/air/AIRSourceViewer.js"></script>
0
+        <script type="application/x-shockwave-flash" src="lib/air/servicemonitor.swf"></script>
0
+        <script type="application/x-shockwave-flash" src="lib/air/applicationupdater.swf"></script>
0
+        
0
+        <!-- Core Libs -->
0
+        <script type="text/javascript" src="app:/lib/jquery/jquery-1.3.min.js"></script>
0
+        
0
+        
0
+        <!-- jQueryAPI Files -->
0
+        <script type="text/javascript" src="app:/src/jQueryAPI.js"></script>
0
+        <script type="text/javascript" src="app:/src/Chrome/APIBrowser.js"></script>
0
+    <script type="text/javascript" src="app:/src/Chrome/Splash.js"></script>
0
+    <script type="text/javascript" src="app:/src/Chrome/Popup.js"></script>
0
+        <script type="text/javascript" src="app:/src/Database/ConnectToFile.js"></script>
0
+        <script type="text/javascript" src="app:/src/Database/CreateDB.js"></script>
0
+        <script type="text/javascript" src="app:/src/Database/ErrorHandler.js"></script>
0
+        <script type="text/javascript" src="app:/src/Database/Query.js"></script>
0
+        <script type="text/javascript" src="app:/src/Database/SaveOrCreateOption.js"></script>
0
+        <script type="text/javascript" src="app:/src/Database/SetupFirstRun.js"></script>
0
+    <script type="text/javascript" src="app:/src/Network/Initialise.js"></script>
0
+    <script type="text/javascript" src="app:/src/Network/Offline.js"></script>
0
+    <script type="text/javascript" src="app:/src/Network/Online.js"></script>
0
+    <script type="text/javascript" src="app:/src/Network/URLStatus.js"></script>
0
+        <script type="text/javascript" src="app:/src/System/ParseCLI.js"></script>
0
+    <script type="text/javascript" src="app:/src/Update/AppVersionCheck.js"></script>
0
+    <script type="text/javascript" src="app:/src/Update/InvokeApplicationUpdate.js"></script>
0
+        <!-- // End jQueryAPI Files -->
0
+
0
+        <!-- Utils -->
0
+        <script type="text/javascript" src="app:/lib/jqueryapi/jquery.tojson.js"></script>
0
+        <script type="text/javascript" src="app:/lib/jqueryapi/json2.js"></script>
0
+        <script type="text/javascript" src="app:/lib/jqueryapi/api-loader.js"></script>
0
+        
0
+        
0
+        <!-- Initialise jQueryAPI -->
0
+        <script type="text/javascript">
0
+          jQuery(document).ready(function() {
0
+            jQueryAPI.Initialise();
0
+          });
0
+        </script>
0
+        <!-- //End Initialise jQueryAPI -->
0
+  </head>
0
+  <body>
0
+  </body>
0
+</html>
0
\ No newline at end of file
0
application.xml
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
0
@@ -0,0 +1,126 @@
0
+<?xml version="1.0" encoding="utf-8" standalone="no"?>
0
+<application xmlns="http://ns.adobe.com/air/application/1.0">
0
+
0
+<!-- Adobe AIR Applicati
0
+on Descriptor File Template.
0
+
0
+  Specifies parameters for identifying, installing, and launching AIR applications.
0
+
0
+  xmlns - The Adobe AIR namespace: http://ns.adobe.com/air/application/1.5
0
+      The last segment of the namespace specifies the version 
0
+      of the AIR runtime required for this application to run.
0
+      
0
+  minimumPatchLevel - The minimum patch level of the AIR runtime required to run 
0
+      the application. Optional.
0
+-->
0
+
0
+  <!-- The application identifier string, unique to this application. Required. -->
0
+  <id>com.jquery.api</id>
0
+
0
+  <!-- Used as the filename for the application. Required. -->
0
+  <filename>jquery-api-browser</filename>
0
+
0
+  <!-- The name that is displayed in the AIR application installer. Optional. -->
0
+  <name>jQuery API Browser</name>
0
+
0
+  <!-- An application version designator (such as "v1", "2.5", or "Alpha 1"). Required. -->
0
+  <version>2.0</version>
0
+
0
+  <!-- Description, displayed in the AIR application installer. Optional. -->
0
+  <description>The jQuery API Browser</description>
0
+
0
+  <!-- Copyright information. Optional -->
0
+  <copyright/>
0
+
0
+  <!-- Settings for the application's initial window. Required. -->
0
+  <initialWindow>
0
+    <!-- The main HTML file of the application. Required. -->
0
+    <content>application.html</content>
0
+    
0
+    <!-- The title of the main window. Optional. -->
0
+    <title/>
0
+
0
+    <!-- The type of system chrome to use (either "standard" or "none"). Optional. Default standard. -->
0
+    <systemChrome>none</systemChrome>
0
+
0
+    <!-- Whether the window is transparent. Only applicable when systemChrome is false. Optional. Default false. -->
0
+    <transparent>true</transparent>
0
+
0
+    <!-- Whether the window is initially visible. Optional. Default false. -->
0
+    <visible>false</visible>
0
+
0
+    <!-- Whether the user can minimize the window. Optional. Default true. -->
0
+    <minimizable>false</minimizable>
0
+
0
+    <!-- Whether the user can maximize the window. Optional. Default true. -->
0
+    <maximizable>false</maximizable>
0
+
0
+    <!-- Whether the user can resize the window. Optional. Default true. -->
0
+    <resizable>false</resizable>
0
+
0
+    <!-- The window's initial width. Optional. -->
0
+    <width>0</width>
0
+
0
+    <!-- The window's initial height. Optional. -->
0
+    <height>0</height>
0
+
0
+    <!-- The window's initial x position. Optional. -->
0
+    <x>0</x>
0
+
0
+    <!-- The window's initial y position. Optional. -->
0
+    <y>0</y>
0
+
0
+    <!-- The window's minimum size, specified as a width/height pair, such as "400 200". Optional. -->
0
+    <minSize>0 0</minSize>
0
+
0
+    <!-- The window's initial maximum size, specified as a width/height pair, such as "1600 1200". Optional. -->
0
+    <maxSize>0 0</maxSize>
0
+  </initialWindow>
0
+
0
+  <!-- The subpath of the standard default installation location to use. Optional. -->
0
+  <!-- <installFolder></installFolder> -->
0
+
0
+  <!-- The subpath of the Windows Start/Programs menu to use. Optional. -->
0
+  <!-- <programMenuFolder></programMenuFolder> -->
0
+
0
+  <!-- The icon the system uses for the application. For at least one resolution,
0
+     specify the path to a PNG file included in the AIR package. Optional. -->
0
+  <icon>
0
+  <image16x16>icons/AIRApp_16.png</image16x16>
0
+<image32x32>icons/AIRApp_32.png</image32x32>
0
+<image48x48>icons/AIRApp_48.png</image48x48>
0
+<image128x128>icons/AIRApp_128.png</image128x128>
0
+</icon>
0
+
0
+  <!-- Whether the application handles the update when a user double-clicks an update version
0
+  of the AIR file (true), or the default AIR application installer handles the update (false).
0
+  Optional. Default false. -->
0
+  <!-- <customUpdateUI></customUpdateUI> -->
0
+  
0
+  <!-- Whether the application can be launched when the user clicks a link in a web browser.
0
+  Optional. Default false. -->
0
+  <!-- <allowBrowserInvocation></allowBrowserInvocation> -->
0
+
0
+  <!-- Listing of file types for which the application can register. Optional. -->
0
+  <fileTypes>
0
+<!-- Defines one file type. Optional. -->
0
+<!-- <fileType> -->
0
+<!-- The name that the system displays for the registered file type. Required. -->
0
+<!-- <name></name> -->
0
+<!-- The extension to register. Required. -->
0
+<!-- <extension></extension> -->
0
+<!-- The description of the file type. Optional. -->
0
+<!-- <description></description> -->
0
+<!-- The MIME type. Optional. -->
0
+<!-- <contentType></contentType> -->
0
+<!-- The icon to display for the file type. Optional. -->
0
+<!-- <icon>
0
+        <image16x16></image16x16>
0
+        <image32x32></image32x32>
0
+        <image48x48></image48x48>
0
+        <image128x128></image128x128>
0
+      </icon> -->
0
+<!-- </fileType> -->
0
+</fileTypes>
0
+
0
+</application>
0
assets/.svn/all-wcprops
...
 
 
 
 
 
...
1
2
3
4
5
0
@@ -0,0 +1,5 @@
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 56
0
+/svn/!svn/ver/6168/trunk/tools/jquery-api-browser/assets
0
+END
0
assets/.svn/entries
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
0
@@ -0,0 +1,37 @@
0
+8
0
+
0
+dir
0
+6496
0
+https://jqueryjs.googlecode.com/svn/trunk/tools/jquery-api-browser/assets
0
+https://jqueryjs.googlecode.com/svn
0
+
0
+
0
+
0
+2009-01-26T10:33:30.000795Z
0
+6168
0
+remysharp
0
+
0
+
0
+svn:special svn:externals svn:needs-lock
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+c715fcbe-d12f-0410-84c4-316a508785bb
0
+
0
+html
0
+dir
0
+
0
+images
0
+dir
0
+
0
+css
0
+dir
0
+
0
assets/.svn/format
...
 
...
1
0
@@ -0,0 +1 @@
0
+8
0
assets/css/.svn/all-wcprops
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
0
@@ -0,0 +1,23 @@
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 60
0
+/svn/!svn/ver/6168/trunk/tools/jquery-api-browser/assets/css
0
+END
0
+Splash.css
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/css/Splash.css
0
+END
0
+Print.css
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 70
0
+/svn/!svn/ver/6168/trunk/tools/jquery-api-browser/assets/css/Print.css
0
+END
0
+APIBrowser.css
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 75
0
+/svn/!svn/ver/6168/trunk/tools/jquery-api-browser/assets/css/APIBrowser.css
0
+END
0
assets/css/.svn/entries
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
0
@@ -0,0 +1,65 @@
0
+8
0
+
0
+dir
0
+6496
0
+https://jqueryjs.googlecode.com/svn/trunk/tools/jquery-api-browser/assets/css
0
+https://jqueryjs.googlecode.com/svn
0
+
0
+
0
+
0
+2009-01-26T10:33:30.000795Z
0
+6168
0
+remysharp
0
+
0
+
0
+svn:special svn:externals svn:needs-lock
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+c715fcbe-d12f-0410-84c4-316a508785bb
0
+
0
+Splash.css
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+e5011077946864ee28d2b5ff44890944
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+Print.css
0
+file
0
+
0
+
0
+
0
+
0
+2009-02-10T13:17:17.000000Z
0
+6ce28a04d64115109fc11ef497cbdea7
0
+2009-01-26T10:33:30.000795Z
0
+6168
0
+remysharp
0
+has-props
0
+
0
+APIBrowser.css
0
+file
0
+
0
+
0
+
0
+
0
+2009-02-10T13:17:17.000000Z
0
+a4db426ffbed4913ecf133a4b90ee32e
0
+2009-01-26T10:33:30.000795Z
0
+6168
0
+remysharp
0
+
0
assets/css/.svn/format
...
 
...
1
0
@@ -0,0 +1 @@
0
+8
0
assets/css/.svn/prop-base/Print.css.svn-base
...
 
 
 
 
 
...
1
2
3
4
5
0
@@ -0,0 +1,5 @@
0
+K 13
0
+svn:mime-type
0
+V 8
0
+text/css
0
+END
0
assets/css/.svn/text-base/APIBrowser.css.svn-base
456 additions, 0 deletions not shown
0
assets/css/.svn/text-base/Print.css.svn-base
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
0
@@ -0,0 +1,29 @@
0
+html {
0
+  padding: 0;
0
+  margin: 0;
0
+}
0
+
0
+html, body {
0
+  overflow: auto;
0
+}
0
+
0
+#body {
0
+  height: auto;
0
+}
0
+
0
+#navigation,
0
+#browser,
0
+#header,
0
+#credit {
0
+  display: none;
0
+}
0
+
0
+#detail {
0
+  position: static;
0
+  bottom: auto;
0
+  left: auto;
0
+}
0
+
0
+pre {
0
+  overflow: visible;
0
+}
0
\ No newline at end of file
0
assets/css/.svn/text-base/Splash.css.svn-base
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
0
@@ -0,0 +1,28 @@
0
+body {
0
+  color: #fff;
0
+}
0
+
0
+#splash-outer {
0
+  background: #2A3139 url(/assets/images/bg_home_tile_sml.jpg) repeat-x scroll 0 -40px;
0
+  width: 295px;
0
+  height:295px;
0
+  border: 3px solid #000;
0
+  -webkit-border-radius: 10px;
0
+  -moz-border-radius: 10px;
0
+}
0
+
0
+img {
0
+  padding: 20px 40px;
0
+}
0
+
0
+ul {
0
+  position: absolute;
0
+  top: 150px;
0
+  margin: 0;
0
+  list-style: none;
0
+}
0
+
0
+li {
0
+  margin: 0;
0
+  padding: 5px;
0
+}
0
\ No newline at end of file
0
assets/css/APIBrowser.css
456 additions, 0 deletions not shown
0
assets/css/Print.css
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
0
@@ -0,0 +1,29 @@
0
+html {
0
+  padding: 0;
0
+  margin: 0;
0
+}
0
+
0
+html, body {
0
+  overflow: auto;
0
+}
0
+
0
+#body {
0
+  height: auto;
0
+}
0
+
0
+#navigation,
0
+#browser,
0
+#header,
0
+#credit {
0
+  display: none;
0
+}
0
+
0
+#detail {
0
+  position: static;
0
+  bottom: auto;
0
+  left: auto;
0
+}
0
+
0
+pre {
0
+  overflow: visible;
0
+}
0
\ No newline at end of file
0
assets/css/Splash.css
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
0
@@ -0,0 +1,28 @@
0
+body {
0
+  color: #fff;
0
+}
0
+
0
+#splash-outer {
0
+  background: #2A3139 url(/assets/images/bg_home_tile_sml.jpg) repeat-x scroll 0 -40px;
0
+  width: 295px;
0
+  height:295px;
0
+  border: 3px solid #000;
0
+  -webkit-border-radius: 10px;
0
+  -moz-border-radius: 10px;
0
+}
0
+
0
+img {
0
+  padding: 20px 40px;
0
+}
0
+
0
+ul {
0
+  position: absolute;
0
+  top: 150px;
0
+  margin: 0;
0
+  list-style: none;
0
+}
0
+
0
+li {
0
+  margin: 0;
0
+  padding: 5px;
0
+}
0
\ No newline at end of file
0
assets/html/.svn/all-wcprops
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
0
@@ -0,0 +1,17 @@
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 61
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/html
0
+END
0
+APIBrowser.html
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 77
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/html/APIBrowser.html
0
+END
0
+Splash.html
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 73
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/html/Splash.html
0
+END
0
assets/html/.svn/entries
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
0
@@ -0,0 +1,52 @@
0
+8
0
+
0
+dir
0
+6496
0
+https://jqueryjs.googlecode.com/svn/trunk/tools/jquery-api-browser/assets/html
0
+https://jqueryjs.googlecode.com/svn
0
+
0
+
0
+
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+
0
+svn:special svn:externals svn:needs-lock
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+c715fcbe-d12f-0410-84c4-316a508785bb
0
+
0
+APIBrowser.html
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:04.000000Z
0
+14d0469abcd511416eea502af6d1ea11
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+Splash.html
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:04.000000Z
0
+9496d8a2f5f8268b2faba4d985e5c4db
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
assets/html/.svn/format
...
 
...
1
0
@@ -0,0 +1 @@
0
+8
0
assets/html/.svn/text-base/APIBrowser.html.svn-base
...
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
0
@@ -0,0 +1,11 @@
0
+<!DOCTYPE html>
0
+<html>
0
+  <head>
0
+    <title>jQueryAPI Browser</title>
0
+    <link rel="stylesheet" media="screen" href="app:/assets/css/APIBrowser.css" />
0
+  </head>
0
+  <body>
0
+    <div id="api-browser">
0
+    </div>
0
+  </body>
0
+</html>
0
\ No newline at end of file
0
assets/html/.svn/text-base/Splash.html.svn-base
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0
@@ -0,0 +1,16 @@
0
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
0
+<html>
0
+  <head>
0
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
0
+    <link rel="stylesheet" media="screen" href="/assets/css/Splash.css" />
0
+    <title>Splash Screen</title>
0
+  </head>
0
+  <body>
0
+    <div id="splash-outer">
0
+      <div id="splash-inner">
0
+        <img width="215" height="53" src="/assets/images/logo_jquery_215x53.gif" alt="jQuery: Write Less, Do More."/>
0
+        <ul id="loading-message"><li>Loading...</li></ul>
0
+      </div>
0
+    </div>
0
+  </body>
0
+</html>
0
assets/html/APIBrowser.html
...
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
0
@@ -0,0 +1,11 @@
0
+<!DOCTYPE html>
0
+<html>
0
+  <head>
0
+    <title>jQueryAPI Browser</title>
0
+    <link rel="stylesheet" media="screen" href="app:/assets/css/APIBrowser.css" />
0
+  </head>
0
+  <body>
0
+    <div id="api-browser">
0
+    </div>
0
+  </body>
0
+</html>
0
\ No newline at end of file
0
assets/html/Splash.html
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
0
@@ -0,0 +1,16 @@
0
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
0
+<html>
0
+  <head>
0
+    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
0
+    <link rel="stylesheet" media="screen" href="/assets/css/Splash.css" />
0
+    <title>Splash Screen</title>
0
+  </head>
0
+  <body>
0
+    <div id="splash-outer">
0
+      <div id="splash-inner">
0
+        <img width="215" height="53" src="/assets/images/logo_jquery_215x53.gif" alt="jQuery: Write Less, Do More."/>
0
+        <ul id="loading-message"><li>Loading...</li></ul>
0
+      </div>
0
+    </div>
0
+  </body>
0
+</html>
0
assets/images/.svn/all-wcprops
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
0
@@ -0,0 +1,203 @@
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 63
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images
0
+END
0
+op1.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/op1.png
0
+END
0
+bg_secondaryNav_left.gif
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 88
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/bg_secondaryNav_left.gif
0
+END
0
+jquery.gif
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 74
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/jquery.gif
0
+END
0
+op2.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/op2.png
0
+END
0
+op3.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/op3.png
0
+END
0
+op4.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/op4.png
0
+END
0
+op5.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/op5.png
0
+END
0
+op6.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/op6.png
0
+END
0
+op7.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/op7.png
0
+END
0
+op8.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/op8.png
0
+END
0
+op9.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/op9.png
0
+END
0
+open-ui.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 75
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/open-ui.png
0
+END
0
+close-ui.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 76
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/close-ui.png
0
+END
0
+bg_secondaryNav_right.gif
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 89
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/bg_secondaryNav_right.gif
0
+END
0
+fav-off.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 75
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/fav-off.png
0
+END
0
+bg_home_tile_sml.jpg
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 84
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/bg_home_tile_sml.jpg
0
+END
0
+shadow.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 74
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/shadow.png
0
+END
0
+cancel.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 74
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/cancel.png
0
+END
0
+fav-on.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 74
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/fav-on.png
0
+END
0
+badge.jpg
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 73
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/badge.jpg
0
+END
0
+spinner.gif
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 75
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/spinner.gif
0
+END
0
+accept.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 74
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/accept.png
0
+END
0
+delete.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 74
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/delete.png
0
+END
0
+badge.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 73
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/badge.png
0
+END
0
+close.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 73
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/close.png
0
+END
0
+logo_jquery_215x53.gif
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 86
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/logo_jquery_215x53.gif
0
+END
0
+icons.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 73
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/icons.png
0
+END
0
+jQueryAPIOffline.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 84
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/jQueryAPIOffline.png
0
+END
0
+bullet_go.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 77
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/bullet_go.png
0
+END
0
+jQueryAPIOnline.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 83
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/jQueryAPIOnline.png
0
+END
0
+background.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 78
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/background.png
0
+END
0
+op10.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 72
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/op10.png
0
+END
0
+large-spinner.gif
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 81
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/assets/images/large-spinner.gif
0
+END
0
assets/images/.svn/entries
457 additions, 0 deletions not shown
0
assets/images/.svn/format
...
 
...
1
0
@@ -0,0 +1 @@
0
+8
0
assets/images/.svn/prop-base/accept.png.svn-base
0
assets/images/.svn/prop-base/background.png.svn-base
0
assets/images/.svn/prop-base/badge.jpg.svn-base
0
assets/images/.svn/prop-base/badge.png.svn-base
0
assets/images/.svn/prop-base/bg_home_tile_sml.jpg.svn-base
0
assets/images/.svn/prop-base/bg_secondaryNav_left.gif.svn-base
0
assets/images/.svn/prop-base/bg_secondaryNav_right.gif.svn-base
0
assets/images/.svn/prop-base/bullet_go.png.svn-base
0
assets/images/.svn/prop-base/cancel.png.svn-base
0
assets/images/.svn/prop-base/close-ui.png.svn-base
0
assets/images/.svn/prop-base/close.png.svn-base
0
assets/images/.svn/prop-base/delete.png.svn-base
0
assets/images/.svn/prop-base/fav-off.png.svn-base
0
assets/images/.svn/prop-base/fav-on.png.svn-base
0
assets/images/.svn/prop-base/icons.png.svn-base
0
assets/images/.svn/prop-base/jQueryAPIOffline.png.svn-base
0
assets/images/.svn/prop-base/jQueryAPIOnline.png.svn-base
0
assets/images/.svn/prop-base/jquery.gif.svn-base
0
assets/images/.svn/prop-base/large-spinner.gif.svn-base
0
assets/images/.svn/prop-base/logo_jquery_215x53.gif.svn-base
0
assets/images/.svn/prop-base/op1.png.svn-base
0
assets/images/.svn/prop-base/op10.png.svn-base
0
assets/images/.svn/prop-base/op2.png.svn-base
0
assets/images/.svn/prop-base/op3.png.svn-base
0
assets/images/.svn/prop-base/op4.png.svn-base
0
assets/images/.svn/prop-base/op5.png.svn-base
0
assets/images/.svn/prop-base/op6.png.svn-base
0
assets/images/.svn/prop-base/op7.png.svn-base
0
assets/images/.svn/prop-base/op8.png.svn-base
0
assets/images/.svn/prop-base/op9.png.svn-base
0
assets/images/.svn/prop-base/open-ui.png.svn-base
0
assets/images/.svn/prop-base/shadow.png.svn-base
0
assets/images/.svn/prop-base/spinner.gif.svn-base
0
assets/images/.svn/text-base/accept.png.svn-base
0
assets/images/.svn/text-base/background.png.svn-base
0
assets/images/.svn/text-base/badge.jpg.svn-base
0
assets/images/.svn/text-base/badge.png.svn-base
0
assets/images/.svn/text-base/bg_home_tile_sml.jpg.svn-base
0
assets/images/.svn/text-base/bg_secondaryNav_left.gif.svn-base
0
assets/images/.svn/text-base/bg_secondaryNav_right.gif.svn-base
0
assets/images/.svn/text-base/bullet_go.png.svn-base
0
assets/images/.svn/text-base/cancel.png.svn-base
0
assets/images/.svn/text-base/close-ui.png.svn-base
0
assets/images/.svn/text-base/close.png.svn-base
0
assets/images/.svn/text-base/delete.png.svn-base
0
assets/images/.svn/text-base/fav-off.png.svn-base
0
assets/images/.svn/text-base/fav-on.png.svn-base
0
assets/images/.svn/text-base/icons.png.svn-base
0
assets/images/.svn/text-base/jQueryAPIOffline.png.svn-base
0
assets/images/.svn/text-base/jQueryAPIOnline.png.svn-base
0
assets/images/.svn/text-base/jquery.gif.svn-base
0
assets/images/.svn/text-base/large-spinner.gif.svn-base
0
assets/images/.svn/text-base/logo_jquery_215x53.gif.svn-base
0
assets/images/.svn/text-base/op1.png.svn-base
0
assets/images/.svn/text-base/op10.png.svn-base
0
assets/images/.svn/text-base/op2.png.svn-base
0
assets/images/.svn/text-base/op3.png.svn-base
0
assets/images/.svn/text-base/op4.png.svn-base
0
assets/images/.svn/text-base/op5.png.svn-base
0
assets/images/.svn/text-base/op6.png.svn-base
0
assets/images/.svn/text-base/op7.png.svn-base
0
assets/images/.svn/text-base/op8.png.svn-base
0
assets/images/.svn/text-base/op9.png.svn-base
0
assets/images/.svn/text-base/open-ui.png.svn-base
0
assets/images/.svn/text-base/shadow.png.svn-base
0
assets/images/.svn/text-base/spinner.gif.svn-base
0
assets/images/accept.png
0
assets/images/background.png
0
assets/images/badge.jpg
0
assets/images/badge.png
0
assets/images/bg_home_tile_sml.jpg
0
assets/images/bg_secondaryNav_left.gif
0
assets/images/bg_secondaryNav_right.gif
0
assets/images/bullet_go.png
0
assets/images/cancel.png
0
assets/images/close-ui.png
0
assets/images/close.png
0
assets/images/delete.png
0
assets/images/fav-off.png
0
assets/images/fav-on.png
0
assets/images/icons.png
0
assets/images/jQueryAPIOffline.png
0
assets/images/jQueryAPIOnline.png
0
assets/images/jquery.gif
0
assets/images/large-spinner.gif
0
assets/images/logo_jquery_215x53.gif
0
assets/images/op1.png
0
assets/images/op10.png
0
assets/images/op2.png
0
assets/images/op3.png
0
assets/images/op4.png
0
assets/images/op5.png
0
assets/images/op6.png
0
assets/images/op7.png
0
assets/images/op8.png
0
assets/images/op9.png
0
assets/images/open-ui.png
0
assets/images/shadow.png
0
assets/images/spinner.gif
0
badge.swf
Binary file not shown
0
certificate.pfx
Binary file not shown
0
icons/.svn/all-wcprops
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
0
@@ -0,0 +1,29 @@
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 55
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/icons
0
+END
0
+AIRApp_32.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 69
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/icons/AIRApp_32.png
0
+END
0
+AIRApp_16.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 69
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/icons/AIRApp_16.png
0
+END
0
+AIRApp_128.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 70
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/icons/AIRApp_128.png
0
+END
0
+AIRApp_48.png
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 69
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/icons/AIRApp_48.png
0
+END
0
icons/.svn/entries
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
0
@@ -0,0 +1,80 @@
0
+8
0
+
0
+dir
0
+6496
0
+https://jqueryjs.googlecode.com/svn/trunk/tools/jquery-api-browser/icons
0
+https://jqueryjs.googlecode.com/svn
0
+
0
+
0
+
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+
0
+svn:special svn:externals svn:needs-lock
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+c715fcbe-d12f-0410-84c4-316a508785bb
0
+
0
+AIRApp_32.png
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:06.000000Z
0
+0007fcacf8b64f0ea7523c21bb7130bd
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+has-props
0
+
0
+AIRApp_16.png
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:06.000000Z
0
+bf3fa73a6ac15461fe10958b0fb7b6d6
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+has-props
0
+
0
+AIRApp_128.png
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:06.000000Z
0
+a6b975811c0781480f3a7ed9d137c506
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+has-props
0
+
0
+AIRApp_48.png
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:06.000000Z
0
+578e972b84c31e1f5bb081eaa39ef330
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+has-props
0
+
0
icons/.svn/format
...
 
...
1
0
@@ -0,0 +1 @@
0
+8
0
icons/.svn/prop-base/AIRApp_128.png.svn-base
0
icons/.svn/prop-base/AIRApp_16.png.svn-base
0
icons/.svn/prop-base/AIRApp_32.png.svn-base
0
icons/.svn/prop-base/AIRApp_48.png.svn-base
0
icons/.svn/text-base/AIRApp_128.png.svn-base
0
icons/.svn/text-base/AIRApp_16.png.svn-base
0
icons/.svn/text-base/AIRApp_32.png.svn-base
0
icons/.svn/text-base/AIRApp_48.png.svn-base
0
icons/AIRApp_128.png
0
icons/AIRApp_16.png
0
icons/AIRApp_32.png
0
icons/AIRApp_48.png
0
index-blank.html
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
0
@@ -0,0 +1,24 @@
0
+<!DOCTYPE html>
0
+<html>
0
+<head>
0
+<script type="text/javascript">
0
+var wormReady = false;
0
+function writer(s) {
0
+    // wormReady prevents inserted content triggering a load event, and hense this writer
0
+    // function getting called again
0
+    if (!wormReady) {
0
+        document.write(s);
0
+        document.close();
0
+        wormReady = true;
0
+    }
0
+}
0
+
0
+childSandboxBridge = {
0
+    'write' : writer
0
+};
0
+
0
+</script>
0
+</head>
0
+<body>
0
+</body>
0
+</html>
0
\ No newline at end of file
0
index.html
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
0
@@ -0,0 +1,124 @@
0
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
0
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
0
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
0
+<head>
0
+<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
0
+<title>jQuery API Browser</title>
0
+<script type="text/javascript" src="/lib/jquery/jquery-1.3.1.js"></script>
0
+<script src="/lib/jqueryapi/api-browser.js" type="text/javascript" charset="utf-8"></script>
0
+<script src="/lib/air/AC_RunActiveContent.js" type="text/javascript" charset="utf-8"></script>
0
+<link media="screen,print" rel="stylesheet" href="/assets/css/APIBrowser.css" type="text/css" charset="utf-8" />
0
+<link media="print" rel="stylesheet" href="/assets/css/Print.css" type="text/css" charset="utf-8" />
0
+</head>
0
+<body id="page">
0
+    <!-- <noscript>
0
+    <p>Hi there, You've come to the jQuery documentation app, but you have JavaScript disabled.  This <em>view</em> on the documentation requires JavaScript, but don't fret, you can get <strong>all</strong> the information you need from the <a href="http://docs.jquery.com">primary jQuery documentation.</a></p>
0
+    <div style="display: none;">
0
+    </noscript> -->
0
+    <div id="header">
0
+        <img width="215" height="53" alt="jQuery: Write Less, Do More." src="/assets/images/logo_jquery_215x53.gif"/>
0
+        <div id="navigation">
0
+            <ul>
0
+                <li class="first"><a class="selected" href="#api">API</a></li>
0
+                <li><a href="#ui">jQuery UI</a></li>
0
+                <li><a href="#favs">Favs</a></li>
0
+                <li class="last"><label for="query"><span>Filter</span> <input type="text" name="q" value="" id="query" /></label></li>
0
+            </ul>
0
+        </div>
0
+    </div>
0
+    <div id="body">
0
+      <div id="browser">
0
+          <div class="inner">
0
+              <p class="loading"><img src="/assets/images/spinner.gif" /> Loading jQuery API database</p>
0
+          </div>
0
+      </div>
0
+      <div id="detail">
0
+          <div class="inner">
0
+            <h2>Welcome to the jQuery API browser</h2>
0
+            
0
+            <p>To get started, click on a category on the left.</p>
0
+            
0
+            <p>The API browser will work in Safari, Firefox 3 and IE7.</p>
0
+            
0
+            <p>You can also use categorise your filtering by using:</p>
0
+            <ul>
0
+                <li><a href="http://api.jquery.com/?added=1.3">added=1.3</a> for all the latest functions</li>
0
+                <li><a href="http://api.jquery.com/?category=core">category=core</a> for all the methods within on category</li>
0
+                <li>Or just use it to search for method names</li>
0
+            </ul>
0
+
0
+            <p>Please send an feedback via the blog post or: <em>remy at remysharp</em> or Twitter if it's brief <a href="http://twitter.com/rem">@rem</a></p>
0
+            <p>The API browser is available as this web app, or as a downloadable <a href="http://www.adobe.com/products/air/" title="Adobe - Adobe AIR">AIR</a>.</p>
0
+            
0
+<script type="text/javascript" charset="utf-8">
0
+if (!window.runtime) {
0
+    (function () {
0
+        var requiredMajorVersion = 9;
0
+        // Minor version of Flash required
0
+        var requiredMinorVersion = 0;
0
+        // Minor version of Flash required
0
+        var requiredRevision = 115;
0
+        
0
+        // Version check based upon the values entered above in "Globals"
0
+        var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
0
+
0
+        // Check to see if the version meets the requirements for playback
0
+        if (hasReqestedVersion) {
0
+          // if we've detected an acceptable version
0
+          // embed the Flash Content SWF when all tests are passed
0
+
0
+          AC_FL_RunContent(
0
+            'codebase','http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab',
0
+            'width','217',
0
+            'height','180',
0
+            'id','install',
0
+            'align','middle',
0
+            'src','badge',
0
+            'quality','high',
0
+            'bgcolor','#FFFFFF',
0
+            'name','badge',
0
+            'allowscriptaccess','all',
0
+            'pluginspage','http://www.macromedia.com/go/getflashplayer',
0
+            'flashvars','appname=Sample%20Application&appurl=http://api.jquery.com/update/jquery-api-browser-2.0.air&airversion=2.0&imageurl=/assets/images/badge.jpg',
0
+            'movie','badge' ); //end AC code
0
+
0
+        } else {  // flash is too old or we can't detect the plugin
0
+          var alternateContent = '<table id="messageTable"><tr><td>'
0
+          + 'This application requires the following be installed:<ol>'
0
+          + '<li><a href="http://adobe.com/go/getair/">Adobe&#174; AIR&#8482; Runtime</a></li>'
0
+          + '<li><a href="http://api.jquery.com/update/jquery-api-browser-2.0.air">Sample Application</a></li>'
0
+          + '</ol>Please click on each link in the order above to complete the installation process.</td></tr></table>';
0
+          $('#install').html(alternateContent);  // insert non-flash content
0
+        }
0
+    })();
0
+}
0
+</script>
0
+            
0
+            <noscript>
0
+                <p>The API browser requires JavaScript to run, however you can also download the offline AIP browser that runs using AIR:</p>
0
+                <p>Download and install the <a href="http://api.jquery.com/update/jquery-api-browser-2.0.air">offline API browser</a></p>
0
+            </noscript>
0
+          </div>
0
+      </div>
0
+    </div>
0
+    <p id="credit"><a href="http://remysharp.com">Built by Remy Sharp</a></p>
0
+    <!-- <noscript>
0
+    </div>
0
+    </noscript> -->
0
+<script src="/lib/jqueryapi/api-loader.js" type="text/javascript" charset="utf-8"></script>
0
+<script src="/lib/jqueryapi/pretty.js" type="text/javascript" charset="utf-8"></script>
0
+<script src="/lib/jqueryapi/cookie.js" type="text/javascript" charset="utf-8"></script>
0
+<script src="/lib/jqueryapi/jquery.tojson.js" type="text/javascript" charset="utf-8"></script>
0
+<script src="/lib/jqueryapi/jquery.history.js" type="text/javascript" charset="utf-8"></script>
0
+<script type="text/javascript" charset="utf-8">
0
+    // fixes Safari restoring the scroll position *after* load
0
+    setTimeout(function () {
0
+        document.body.scrollTop = 0;
0
+    }, 10);
0
+
0
+    if (!window.runtime) {
0
+        $(apiBrowserMain);        
0
+    }
0
+</script>
0
+</body>
0
+</html>
0
index.php
373 additions, 0 deletions not shown
0
lib/.svn/all-wcprops
...
 
 
 
 
 
...
1
2
3
4
5
0
@@ -0,0 +1,5 @@
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 53
0
+/svn/!svn/ver/6175/trunk/tools/jquery-api-browser/lib
0
+END
0
lib/.svn/entries
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
0
@@ -0,0 +1,40 @@
0
+8
0
+
0
+dir
0
+6496
0
+https://jqueryjs.googlecode.com/svn/trunk/tools/jquery-api-browser/lib
0
+https://jqueryjs.googlecode.com/svn
0
+
0
+
0
+
0
+2009-02-05T23:36:34.003472Z
0
+6175
0
+remysharp
0
+
0
+
0
+svn:special svn:externals svn:needs-lock
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+c715fcbe-d12f-0410-84c4-316a508785bb
0
+
0
+jquery
0
+dir
0
+
0
+docs
0
+dir
0
+
0
+jqueryapi
0
+dir
0
+
0
+air
0
+dir
0
+
0
lib/.svn/format
...
 
...
1
0
@@ -0,0 +1 @@
0
+8
0
lib/air/.svn/all-wcprops
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
0
@@ -0,0 +1,53 @@
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 57
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/air
0
+END
0
+AIRIntrospector.js
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 76
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/air/AIRIntrospector.js
0
+END
0
+AIRMenuBuilder.js
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 75
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/air/AIRMenuBuilder.js
0
+END
0
+applicationupdater.swf
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 80
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/air/applicationupdater.swf
0
+END
0
+servicemonitor.swf
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 76
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/air/servicemonitor.swf
0
+END
0
+AIRAliases.js
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/air/AIRAliases.js
0
+END
0
+AC_RunActiveContent.js
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 80
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/air/AC_RunActiveContent.js
0
+END
0
+AIRSourceViewer.js
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 76
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/air/AIRSourceViewer.js
0
+END
0
+AIRLocalizer.js
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 73
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/air/AIRLocalizer.js
0
+END
0
lib/air/.svn/entries
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
0
@@ -0,0 +1,127 @@
0
+8
0
+
0
+dir
0
+6496
0
+https://jqueryjs.googlecode.com/svn/trunk/tools/jquery-api-browser/lib/air
0
+https://jqueryjs.googlecode.com/svn
0
+
0
+
0
+
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+
0
+svn:special svn:externals svn:needs-lock
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+c715fcbe-d12f-0410-84c4-316a508785bb
0
+
0
+AIRIntrospector.js
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+9c49dec7870a37e0e43d255f8375a21e
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+AIRMenuBuilder.js
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+4daa56358f2456456426cf1b82481b6f
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+applicationupdater.swf
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+030e2c29f858ec4556c5ff9dc9df97e6
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+has-props
0
+
0
+servicemonitor.swf
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+1d17f6d0c20e3deca1c7958bb64e035e
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+has-props
0
+
0
+AIRAliases.js
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+cbcebdac14a9eb9ed1ed037f5851c012
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+AC_RunActiveContent.js
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+3e038cea960c1b650442b85cea237053
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+has-props
0
+
0
+AIRSourceViewer.js
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+06ec012676b7aeaee109e819b2e3cfab
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+AIRLocalizer.js
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+978cc0a6d812f3a78b0660f3f614ca5a
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
lib/air/.svn/format
...
 
...
1
0
@@ -0,0 +1 @@
0
+8
0
lib/air/.svn/prop-base/AC_RunActiveContent.js.svn-base
...
 
 
 
 
 
...
1
2
3
4
5
0
@@ -0,0 +1,5 @@
0
+K 14
0
+svn:executable
0
+V 1
0
+*
0
+END
0
lib/air/.svn/prop-base/applicationupdater.swf.svn-base
...
 
 
 
 
 
...
1
2
3
4
5
0
@@ -0,0 +1,5 @@
0
+K 13
0
+svn:mime-type
0
+V 24
0
+application/octet-stream
0
+END
0
lib/air/.svn/prop-base/servicemonitor.swf.svn-base
...
 
 
 
 
 
...
1
2
3
4
5
0
@@ -0,0 +1,5 @@
0
+K 13
0
+svn:mime-type
0
+V 24
0
+application/octet-stream
0
+END
0
lib/air/.svn/text-base/AC_RunActiveContent.js.svn-base
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
0
@@ -0,0 +1,292 @@
0
+//v1.7
0
+// Flash Player Version Detection
0
+// Detect Client Browser type
0
+// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
0
+var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
0
+var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
0
+var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
0
+
0
+function ControlVersion()
0
+{
0
+  var version;
0
+  var axo;
0
+  var e;
0
+
0
+  // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
0
+
0
+  try {
0
+    // version will be set for 7.X or greater players
0
+    axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
0
+    version = axo.GetVariable("$version");
0
+  } catch (e) {
0
+  }
0
+
0
+  if (!version)
0
+  {
0
+    try {
0
+      // version will be set for 6.X players only
0
+      axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
0
+      
0
+      // installed player is some revision of 6.0
0
+      // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
0
+      // so we have to be careful. 
0
+      
0
+      // default to the first public version
0
+      version = "WIN 6,0,21,0";
0
+
0
+      // throws if AllowScripAccess does not exist (introduced in 6.0r47)    
0
+      axo.AllowScriptAccess = "always";
0
+
0
+      // safe to call for 6.0r47 or greater
0
+      version = axo.GetVariable("$version");
0
+
0
+    } catch (e) {
0
+    }
0
+  }
0
+
0
+  if (!version)
0
+  {
0
+    try {
0
+      // version will be set for 4.X or 5.X player
0
+      axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
0
+      version = axo.GetVariable("$version");
0
+    } catch (e) {
0
+    }
0
+  }
0
+
0
+  if (!version)
0
+  {
0
+    try {
0
+      // version will be set for 3.X player
0
+      axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
0
+      version = "WIN 3,0,18,0";
0
+    } catch (e) {
0
+    }
0
+  }
0
+
0
+  if (!version)
0
+  {
0
+    try {
0
+      // version will be set for 2.X player
0
+      axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
0
+      version = "WIN 2,0,0,11";
0
+    } catch (e) {
0
+      version = -1;
0
+    }
0
+  }
0
+  
0
+  return version;
0
+}
0
+
0
+// JavaScript helper required to detect Flash Player PlugIn version information
0
+function GetSwfVer(){
0
+  // NS/Opera version >= 3 check for Flash plugin in plugin array
0
+  var flashVer = -1;
0
+  
0
+  if (navigator.plugins != null && navigator.plugins.length > 0) {
0
+    if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
0
+      var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
0
+      var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
0
+      var descArray = flashDescription.split(" ");
0
+      var tempArrayMajor = descArray[2].split(".");      
0
+      var versionMajor = tempArrayMajor[0];
0
+      var versionMinor = tempArrayMajor[1];
0
+      var versionRevision = descArray[3];
0
+      if (versionRevision == "") {
0
+        versionRevision = descArray[4];
0
+      }
0
+      if (versionRevision[0] == "d") {
0
+        versionRevision = versionRevision.substring(1);
0
+      } else if (versionRevision[0] == "r") {
0
+        versionRevision = versionRevision.substring(1);
0
+        if (versionRevision.indexOf("d") > 0) {
0
+          versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
0
+        }
0
+      }
0
+      var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
0
+    }
0
+  }
0
+  // MSN/WebTV 2.6 supports Flash 4
0
+  else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
0
+  // WebTV 2.5 supports Flash 3
0
+  else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
0
+  // older WebTV supports Flash 2
0
+  else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
0
+  else if ( isIE && isWin && !isOpera ) {
0
+    flashVer = ControlVersion();
0
+  }  
0
+  return flashVer;
0
+}
0
+
0
+// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
0
+function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
0
+{
0
+  versionStr = GetSwfVer();
0
+  if (versionStr == -1 ) {
0
+    return false;
0
+  } else if (versionStr != 0) {
0
+    if(isIE && isWin && !isOpera) {
0
+      // Given "WIN 2,0,0,11"
0
+      tempArray         = versionStr.split(" ");   // ["WIN", "2,0,0,11"]
0
+      tempString        = tempArray[1];      // "2,0,0,11"
0
+      versionArray      = tempString.split(",");  // ['2', '0', '0', '11']
0
+    } else {
0
+      versionArray      = versionStr.split(".");
0
+    }
0
+    var versionMajor      = versionArray[0];
0
+    var versionMinor      = versionArray[1];
0
+    var versionRevision   = versionArray[2];
0
+
0
+          // is the major.revision >= requested major.revision AND the minor version >= requested minor
0
+    if (versionMajor > parseFloat(reqMajorVer)) {
0
+      return true;
0
+    } else if (versionMajor == parseFloat(reqMajorVer)) {
0
+      if (versionMinor > parseFloat(reqMinorVer))
0
+        return true;
0
+      else if (versionMinor == parseFloat(reqMinorVer)) {
0
+        if (versionRevision >= parseFloat(reqRevision))
0
+          return true;
0
+      }
0
+    }
0
+    return false;
0
+  }
0
+}
0
+
0
+function AC_AddExtension(src, ext)
0
+{
0
+  if (src.indexOf('?') != -1)
0
+    return src.replace(/\?/, ext+'?'); 
0
+  else
0
+    return src + ext;
0
+}
0
+
0
+function AC_Generateobj(objAttrs, params, embedAttrs) 
0
+{ 
0
+  var str = '';
0
+  if (isIE && isWin && !isOpera)
0
+  {
0
+    str += '<object ';
0
+    for (var i in objAttrs)
0
+    {
0
+      str += i + '="' + objAttrs[i] + '" ';
0
+    }
0
+    str += '>';
0
+    for (var i in params)
0
+    {
0
+      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
0
+    }
0
+    str += '</object>';
0
+  }
0
+  else
0
+  {
0
+    str += '<embed ';
0
+    for (var i in embedAttrs)
0
+    {
0
+      str += i + '="' + embedAttrs[i] + '" ';
0
+    }
0
+    str += '> </embed>';
0
+  }
0
+
0
+  document.write(str);
0
+}
0
+
0
+function AC_FL_RunContent(){
0
+  var ret = 
0
+    AC_GetArgs
0
+    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
0
+     , "application/x-shockwave-flash"
0
+    );
0
+  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
0
+}
0
+
0
+function AC_SW_RunContent(){
0
+  var ret = 
0
+    AC_GetArgs
0
+    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
0
+     , null
0
+    );
0
+  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
0
+}
0
+
0
+function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
0
+  var ret = new Object();
0
+  ret.embedAttrs = new Object();
0
+  ret.params = new Object();
0
+  ret.objAttrs = new Object();
0
+  for (var i=0; i < args.length; i=i+2){
0
+    var currArg = args[i].toLowerCase();    
0
+
0
+    switch (currArg){  
0
+      case "classid":
0
+        break;
0
+      case "pluginspage":
0
+        ret.embedAttrs[args[i]] = args[i+1];
0
+        break;
0
+      case "src":
0
+      case "movie":  
0
+        args[i+1] = AC_AddExtension(args[i+1], ext);
0
+        ret.embedAttrs["src"] = args[i+1];
0
+        ret.params[srcParamName] = args[i+1];
0
+        break;
0
+      case "onafterupdate":
0
+      case "onbeforeupdate":
0
+      case "onblur":
0
+      case "oncellchange":
0
+      case "onclick":
0
+      case "ondblclick":
0
+      case "ondrag":
0
+      case "ondragend":
0
+      case "ondragenter":
0
+      case "ondragleave":
0
+      case "ondragover":
0
+      case "ondrop":
0
+      case "onfinish":
0
+      case "onfocus":
0
+      case "onhelp":
0
+      case "onmousedown":
0
+      case "onmouseup":
0
+      case "onmouseover":
0
+      case "onmousemove":
0
+      case "onmouseout":
0
+      case "onkeypress":
0
+      case "onkeydown":
0
+      case "onkeyup":
0
+      case "onload":
0
+      case "onlosecapture":
0
+      case "onpropertychange":
0
+      case "onreadystatechange":
0
+      case "onrowsdelete":
0
+      case "onrowenter":
0
+      case "onrowexit":
0
+      case "onrowsinserted":
0
+      case "onstart":
0
+      case "onscroll":
0
+      case "onbeforeeditfocus":
0
+      case "onactivate":
0
+      case "onbeforedeactivate":
0
+      case "ondeactivate":
0
+      case "type":
0
+      case "codebase":
0
+      case "id":
0
+        ret.objAttrs[args[i]] = args[i+1];
0
+        break;
0
+      case "width":
0
+      case "height":
0
+      case "align":
0
+      case "vspace": 
0
+      case "hspace":
0
+      case "class":
0
+      case "title":
0
+      case "accesskey":
0
+      case "name":
0
+      case "tabindex":
0
+        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
0
+        break;
0
+      default:
0
+        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
0
+    }
0
+  }
0
+  ret.objAttrs["classid"] = classid;
0
+  if (mimeType) ret.embedAttrs["type"] = mimeType;
0
+  return ret;
0
+}
0
lib/air/.svn/text-base/AIRAliases.js.svn-base
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
0
@@ -0,0 +1,208 @@
0
+/* AIRAliases.js - Revision: 1.5 */
0
+
0
+/*
0
+ADOBE SYSTEMS INCORPORATED
0
+Copyright 2007-2008 Adobe Systems Incorporated. All Rights Reserved.
0
+ 
0
+NOTICE:   Adobe permits you to modify and distribute this file only in accordance with
0
+the terms of Adobe AIR SDK license agreement.  You may have received this file from a
0
+source other than Adobe.  Nonetheless, you may modify or
0
+distribute this file only in accordance with such agreement. 
0
+*/
0
+
0
+
0
+var air;
0
+if (window.runtime) 
0
+{
0
+    if (!air) air = {};
0
+    // functions
0
+    air.trace = window.runtime.trace;
0
+    air.navigateToURL = window.runtime.flash.net.navigateToURL;
0
+    air.sendToURL = window.runtime.flash.net.sendToURL;
0
+
0
+
0
+    // file
0
+    air.File = window.runtime.flash.filesystem.File;
0
+    air.FileStream = window.runtime.flash.filesystem.FileStream;
0
+    air.FileMode = window.runtime.flash.filesystem.FileMode;
0
+
0
+    // events
0
+    air.ActivityEvent = window.runtime.flash.events.ActivityEvent;
0
+    air.AsyncErrorEvent = window.runtime.flash.events.AsyncErrorEvent;
0
+    air.BrowserInvokeEvent = window.runtime.flash.events.BrowserInvokeEvent;
0
+    air.DataEvent = window.runtime.flash.events.DataEvent;
0
+    air.DRMAuthenticateEvent = window.runtime.flash.events.DRMAuthenticateEvent;
0
+    air.DRMStatusEvent = window.runtime.flash.events.DRMStatusEvent;
0
+    air.ErrorEvent = window.runtime.flash.events.ErrorEvent;
0
+    air.Event = window.runtime.flash.events.Event;
0
+    air.EventDispatcher = window.runtime.flash.events.EventDispatcher;
0
+    air.FileListEvent = window.runtime.flash.events.FileListEvent;
0
+    air.HTTPStatusEvent = window.runtime.flash.events.HTTPStatusEvent;
0
+    air.IOErrorEvent = window.runtime.flash.events.IOErrorEvent;
0
+    air.InvokeEvent = window.runtime.flash.events.InvokeEvent;
0
+    air.NetStatusEvent = window.runtime.flash.events.NetStatusEvent;
0
+    air.OutputProgressEvent = window.runtime.flash.events.OutputProgressEvent;
0
+    air.ProgressEvent = window.runtime.flash.events.ProgressEvent;
0
+    air.SecurityErrorEvent = window.runtime.flash.events.SecurityErrorEvent;
0
+    air.StatusEvent = window.runtime.flash.events.StatusEvent;
0
+    air.TimerEvent = window.runtime.flash.events.TimerEvent;
0
+    air.SampleDataEvent = window.runtime.flash.events.SampleDataEvent;
0
+    
0
+    // native window
0
+    air.NativeWindow = window.runtime.flash.display.NativeWindow;
0
+    air.NativeWindowDisplayState = window.runtime.flash.display.NativeWindowDisplayState;
0
+    air.NativeWindowInitOptions = window.runtime.flash.display.NativeWindowInitOptions;
0
+    air.NativeWindowSystemChrome = window.runtime.flash.display.NativeWindowSystemChrome;
0
+    air.NativeWindowResize = window.runtime.flash.display.NativeWindowResize;
0
+    air.NativeWindowType = window.runtime.flash.display.NativeWindowType;
0
+
0
+    air.NativeWindowBoundsEvent = window.runtime.flash.events.NativeWindowBoundsEvent;
0
+    air.NativeWindowDisplayStateEvent = window.runtime.flash.events.NativeWindowDisplayStateEvent;
0
+
0
+    // geom
0
+    air.Point = window.runtime.flash.geom.Point;
0
+    air.Rectangle = window.runtime.flash.geom.Rectangle;
0
+    air.Matrix = window.runtime.flash.geom.Matrix;
0
+
0
+    // 3D
0
+    air.Matrix3D  = window.runtime.flash.geom.Matrix3D;
0
+    air.Vector3D  = window.runtime.flash.geom.Vector3D;
0
+    air.Orientation3D  = window.runtime.flash.geom.Orientation3D;
0
+    air.Utils3D  = window.runtime.flash.geom.Utils3D;
0
+    
0
+    // Shader    
0
+    air.Shader = window.runtime.flash.display.Shader;
0
+    air.ShaderFilter = window.runtime.flash.filters.ShaderFilter;
0
+    air.ShaderPrecision = window.runtime.flash.display.ShaderPrecision;
0
+    
0
+    // net
0
+    air.FileFilter = window.runtime.flash.net.FileFilter;
0
+    
0
+    air.LocalConnection = window.runtime.flash.net.LocalConnection;
0
+    air.NetConnection = window.runtime.flash.net.NetConnection;
0
+
0
+    air.URLLoader = window.runtime.flash.net.URLLoader;
0
+    air.URLLoaderDataFormat = window.runtime.flash.net.URLLoaderDataFormat;
0
+    air.URLRequest = window.runtime.flash.net.URLRequest;
0
+    air.URLRequestDefaults = window.runtime.flash.net.URLRequestDefaults;
0
+    air.URLRequestHeader = window.runtime.flash.net.URLRequestHeader;
0
+    air.URLRequestMethod = window.runtime.flash.net.URLRequestMethod;
0
+    air.URLStream = window.runtime.flash.net.URLStream;
0
+    air.URLVariables = window.runtime.flash.net.URLVariables;
0
+    air.Socket = window.runtime.flash.net.Socket;
0
+    air.XMLSocket = window.runtime.flash.net.XMLSocket;
0
+
0
+    air.Responder = window.runtime.flash.net.Responder;
0
+    air.ObjectEncoding = window.runtime.flash.net.ObjectEncoding;
0
+
0
+    air.NetStream = window.runtime.flash.net.NetStream;
0
+    air.NetStreamInfo = window.runtime.flash.net.NetStreamInfo;
0
+    air.NetStreamPlayOptions = window.runtime.flash.net.NetStreamPlayOptions;
0
+    air.NetStreamPlayTransitions = window.runtime.flash.net.NetStreamPlayTransitions;
0
+    air.SharedObject = window.runtime.flash.net.SharedObject;
0
+    air.SharedObjectFlushStatus = window.runtime.flash.net.SharedObjectFlushStatus;
0
+
0
+    // system
0
+    air.Capabilities = window.runtime.flash.system.Capabilities;
0
+    air.System = window.runtime.flash.system.System;
0
+    air.Security = window.runtime.flash.system.Security;
0
+    air.Updater = window.runtime.flash.desktop.Updater;
0
+
0
+    // desktop
0
+    air.Clipboard = window.runtime.flash.desktop.Clipboard;
0
+    air.ClipboardFormats = window.runtime.flash.desktop.ClipboardFormats;
0
+    air.ClipboardTransferMode = window.runtime.flash.desktop.ClipboardTransferMode;
0
+
0
+    air.NativeDragManager = window.runtime.flash.desktop.NativeDragManager;
0
+    air.NativeDragOptions = window.runtime.flash.desktop.NativeDragOptions;
0
+    air.NativeDragActions = window.runtime.flash.desktop.NativeDragActions;
0
+
0
+    air.Icon = window.runtime.flash.desktop.Icon;
0
+    air.DockIcon = window.runtime.flash.desktop.DockIcon;
0
+    air.InteractiveIcon = window.runtime.flash.desktop.InteractiveIcon;
0
+    air.NotificationType = window.runtime.flash.desktop.NotificationType;
0
+    air.SystemTrayIcon = window.runtime.flash.desktop.SystemTrayIcon;
0
+
0
+    air.NativeApplication = window.runtime.flash.desktop.NativeApplication;
0
+
0
+    // display
0
+    air.NativeMenu = window.runtime.flash.display.NativeMenu;
0
+    air.NativeMenuItem = window.runtime.flash.display.NativeMenuItem;
0
+    air.Screen = window.runtime.flash.display.Screen;
0
+    
0
+    air.Loader  = window.runtime.flash.display.Loader;
0
+    air.Bitmap = window.runtime.flash.display.Bitmap;
0
+    air.BitmapData = window.runtime.flash.display.BitmapData;
0
+
0
+    // ui
0
+    air.Keyboard = window.runtime.flash.ui.Keyboard;
0
+    air.KeyLocation = window.runtime.flash.ui.KeyLocation;
0
+    air.Mouse = window.runtime.flash.ui.Mouse;
0
+
0
+
0
+    //security
0
+    air.ReferencesValidationSetting = window.runtime.flash.security.ReferencesValidationSetting;
0
+    air.RevocationCheckSettings = window.runtime.flash.security.RevocationCheckSettings;
0
+    air.SignatureStatus = window.runtime.flash.security.SignatureStatus;
0
+    air.SignerTrustSettings = window.runtime.flash.security.SignerTrustSettings;
0
+    air.XMLSignatureValidator = window.runtime.flash.security.XMLSignatureValidator;
0
+        
0
+
0
+    // utils
0
+    air.ByteArray = window.runtime.flash.utils.ByteArray;
0
+    air.CompressionAlgorithm = window.runtime.flash.utils.CompressionAlgorithm;
0
+    air.Endian = window.runtime.flash.utils.Endian;
0
+    air.Timer = window.runtime.flash.utils.Timer;
0
+
0
+    air.HTMLLoader = window.runtime.flash.html.HTMLLoader;
0
+    air.HTMLPDFCapability = window.runtime.flash.html.HTMLPDFCapability;    
0
+
0
+    // media
0
+    air.ID3Info = window.runtime.flash.media.ID3Info;
0
+    air.Sound = window.runtime.flash.media.Sound;
0
+    air.SoundChannel = window.runtime.flash.media.SoundChannel;
0
+    air.SoundLoaderContext = window.runtime.flash.media.SoundLoaderContext;
0
+    air.SoundMixer = window.runtime.flash.media.SoundMixer;
0
+    air.SoundTransform = window.runtime.flash.media.SoundTransform;
0
+    air.Microphone = window.runtime.flash.media.Microphone;
0
+    air.Video = window.runtime.flash.media.Video;
0
+    air.Camera = window.runtime.flash.media.Camera;
0
+    air.SoundCodec = window.runtime.flash.media.SoundCodec;
0
+
0
+    // data
0
+    air.EncryptedLocalStore = window.runtime.flash.data.EncryptedLocalStore;
0
+    air.SQLCollationType = window.runtime.flash.data.SQLCollationType;
0
+    air.SQLColumnNameStyle = window.runtime.flash.data.SQLColumnNameStyle;
0
+    air.SQLColumnSchema = window.runtime.flash.data.SQLColumnSchema;
0
+    air.SQLConnection = window.runtime.flash.data.SQLConnection;
0
+    air.SQLError = window.runtime.flash.errors.SQLError;
0
+    air.SQLErrorEvent = window.runtime.flash.events.SQLErrorEvent;
0
+    air.SQLErrorOperation = window.runtime.flash.errors.SQLErrorOperation;
0
+    air.SQLEvent = window.runtime.flash.events.SQLEvent;
0
+    air.SQLIndexSchema = window.runtime.flash.data.SQLIndexSchema;
0
+    air.SQLMode = window.runtime.flash.data.SQLMode;
0
+    air.SQLResult = window.runtime.flash.data.SQLResult;
0
+    air.SQLSchema = window.runtime.flash.data.SQLSchema;
0
+    air.SQLSchemaResult = window.runtime.flash.data.SQLSchemaResult;
0
+    air.SQLStatement = window.runtime.flash.data.SQLStatement;
0
+    air.SQLTableSchema = window.runtime.flash.data.SQLTableSchema;
0
+    air.SQLTransactionLockType = window.runtime.flash.data.SQLTransactionLockType;
0
+    air.SQLTriggerSchema = window.runtime.flash.data.SQLTriggerSchema;
0
+    air.SQLUpdateEvent = window.runtime.flash.events.SQLUpdateEvent;
0
+    air.SQLViewSchema = window.runtime.flash.data.SQLViewSchema;
0
+
0
+    // service monitoring framework
0
+    air.__defineGetter__("ServiceMonitor", function() { return window.runtime.air.net.ServiceMonitor; })
0
+    air.__defineGetter__("SocketMonitor", function() { return window.runtime.air.net.SocketMonitor; })
0
+    air.__defineGetter__("URLMonitor", function() { return window.runtime.air.net.URLMonitor; })
0
+    
0
+    // update framework
0
+    air.__defineGetter__("ApplicationUpdater", function() { return window.runtime.air.update.ApplicationUpdater; });
0
+    air.__defineGetter__("ApplicationUpdaterUI", function() { return window.runtime.air.update.ApplicationUpdaterUI; });
0
+    air.__defineGetter__("UpdateEvent", function() { return window.runtime.air.update.events.UpdateEvent; });
0
+    air.__defineGetter__("StatusUpdateEvent", function() { return window.runtime.air.update.events.StatusUpdateEvent; });
0
+    air.__defineGetter__("StatusUpdateErrorEvent", function() { return window.runtime.air.update.events.StatusUpdateErrorEvent; });
0
+    air.__defineGetter__("DownloadErrorEvent", function() { return window.runtime.air.update.events.DownloadErrorEvent; });
0
+    air.__defineGetter__("StatusFileUpdateEvent", function() { return window.runtime.air.update.events.StatusFileUpdateEvent; });
0
+    air.__defineGetter__("StatusFileUpdateErrorEvent", function() { return window.runtime.air.update.events.StatusFileUpdateErrorEvent; });
0
+}
0
\ No newline at end of file
0
lib/air/.svn/text-base/AIRIntrospector.js.svn-base
1949 additions, 0 deletions not shown
0
lib/air/.svn/text-base/AIRLocalizer.js.svn-base
1325 additions, 0 deletions not shown
0
lib/air/.svn/text-base/AIRMenuBuilder.js.svn-base
1322 additions, 0 deletions not shown
0
lib/air/.svn/text-base/AIRSourceViewer.js.svn-base
2933 additions, 0 deletions not shown
0
lib/air/.svn/text-base/applicationupdater.swf.svn-base
Binary file not shown
0
lib/air/.svn/text-base/servicemonitor.swf.svn-base
Binary file not shown
0
lib/air/AC_RunActiveContent.js
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
0
@@ -0,0 +1,292 @@
0
+//v1.7
0
+// Flash Player Version Detection
0
+// Detect Client Browser type
0
+// Copyright 2005-2007 Adobe Systems Incorporated.  All rights reserved.
0
+var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
0
+var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
0
+var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
0
+
0
+function ControlVersion()
0
+{
0
+  var version;
0
+  var axo;
0
+  var e;
0
+
0
+  // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
0
+
0
+  try {
0
+    // version will be set for 7.X or greater players
0
+    axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
0
+    version = axo.GetVariable("$version");
0
+  } catch (e) {
0
+  }
0
+
0
+  if (!version)
0
+  {
0
+    try {
0
+      // version will be set for 6.X players only
0
+      axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");
0
+      
0
+      // installed player is some revision of 6.0
0
+      // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29,
0
+      // so we have to be careful. 
0
+      
0
+      // default to the first public version
0
+      version = "WIN 6,0,21,0";
0
+
0
+      // throws if AllowScripAccess does not exist (introduced in 6.0r47)    
0
+      axo.AllowScriptAccess = "always";
0
+
0
+      // safe to call for 6.0r47 or greater
0
+      version = axo.GetVariable("$version");
0
+
0
+    } catch (e) {
0
+    }
0
+  }
0
+
0
+  if (!version)
0
+  {
0
+    try {
0
+      // version will be set for 4.X or 5.X player
0
+      axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
0
+      version = axo.GetVariable("$version");
0
+    } catch (e) {
0
+    }
0
+  }
0
+
0
+  if (!version)
0
+  {
0
+    try {
0
+      // version will be set for 3.X player
0
+      axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");
0
+      version = "WIN 3,0,18,0";
0
+    } catch (e) {
0
+    }
0
+  }
0
+
0
+  if (!version)
0
+  {
0
+    try {
0
+      // version will be set for 2.X player
0
+      axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
0
+      version = "WIN 2,0,0,11";
0
+    } catch (e) {
0
+      version = -1;
0
+    }
0
+  }
0
+  
0
+  return version;
0
+}
0
+
0
+// JavaScript helper required to detect Flash Player PlugIn version information
0
+function GetSwfVer(){
0
+  // NS/Opera version >= 3 check for Flash plugin in plugin array
0
+  var flashVer = -1;
0
+  
0
+  if (navigator.plugins != null && navigator.plugins.length > 0) {
0
+    if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
0
+      var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
0
+      var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
0
+      var descArray = flashDescription.split(" ");
0
+      var tempArrayMajor = descArray[2].split(".");      
0
+      var versionMajor = tempArrayMajor[0];
0
+      var versionMinor = tempArrayMajor[1];
0
+      var versionRevision = descArray[3];
0
+      if (versionRevision == "") {
0
+        versionRevision = descArray[4];
0
+      }
0
+      if (versionRevision[0] == "d") {
0
+        versionRevision = versionRevision.substring(1);
0
+      } else if (versionRevision[0] == "r") {
0
+        versionRevision = versionRevision.substring(1);
0
+        if (versionRevision.indexOf("d") > 0) {
0
+          versionRevision = versionRevision.substring(0, versionRevision.indexOf("d"));
0
+        }
0
+      }
0
+      var flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
0
+    }
0
+  }
0
+  // MSN/WebTV 2.6 supports Flash 4
0
+  else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
0
+  // WebTV 2.5 supports Flash 3
0
+  else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
0
+  // older WebTV supports Flash 2
0
+  else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
0
+  else if ( isIE && isWin && !isOpera ) {
0
+    flashVer = ControlVersion();
0
+  }  
0
+  return flashVer;
0
+}
0
+
0
+// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
0
+function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision)
0
+{
0
+  versionStr = GetSwfVer();
0
+  if (versionStr == -1 ) {
0
+    return false;
0
+  } else if (versionStr != 0) {
0
+    if(isIE && isWin && !isOpera) {
0
+      // Given "WIN 2,0,0,11"
0
+      tempArray         = versionStr.split(" ");   // ["WIN", "2,0,0,11"]
0
+      tempString        = tempArray[1];      // "2,0,0,11"
0
+      versionArray      = tempString.split(",");  // ['2', '0', '0', '11']
0
+    } else {
0
+      versionArray      = versionStr.split(".");
0
+    }
0
+    var versionMajor      = versionArray[0];
0
+    var versionMinor      = versionArray[1];
0
+    var versionRevision   = versionArray[2];
0
+
0
+          // is the major.revision >= requested major.revision AND the minor version >= requested minor
0
+    if (versionMajor > parseFloat(reqMajorVer)) {
0
+      return true;
0
+    } else if (versionMajor == parseFloat(reqMajorVer)) {
0
+      if (versionMinor > parseFloat(reqMinorVer))
0
+        return true;
0
+      else if (versionMinor == parseFloat(reqMinorVer)) {
0
+        if (versionRevision >= parseFloat(reqRevision))
0
+          return true;
0
+      }
0
+    }
0
+    return false;
0
+  }
0
+}
0
+
0
+function AC_AddExtension(src, ext)
0
+{
0
+  if (src.indexOf('?') != -1)
0
+    return src.replace(/\?/, ext+'?'); 
0
+  else
0
+    return src + ext;
0
+}
0
+
0
+function AC_Generateobj(objAttrs, params, embedAttrs) 
0
+{ 
0
+  var str = '';
0
+  if (isIE && isWin && !isOpera)
0
+  {
0
+    str += '<object ';
0
+    for (var i in objAttrs)
0
+    {
0
+      str += i + '="' + objAttrs[i] + '" ';
0
+    }
0
+    str += '>';
0
+    for (var i in params)
0
+    {
0
+      str += '<param name="' + i + '" value="' + params[i] + '" /> ';
0
+    }
0
+    str += '</object>';
0
+  }
0
+  else
0
+  {
0
+    str += '<embed ';
0
+    for (var i in embedAttrs)
0
+    {
0
+      str += i + '="' + embedAttrs[i] + '" ';
0
+    }
0
+    str += '> </embed>';
0
+  }
0
+
0
+  document.write(str);
0
+}
0
+
0
+function AC_FL_RunContent(){
0
+  var ret = 
0
+    AC_GetArgs
0
+    (  arguments, ".swf", "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
0
+     , "application/x-shockwave-flash"
0
+    );
0
+  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
0
+}
0
+
0
+function AC_SW_RunContent(){
0
+  var ret = 
0
+    AC_GetArgs
0
+    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
0
+     , null
0
+    );
0
+  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
0
+}
0
+
0
+function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
0
+  var ret = new Object();
0
+  ret.embedAttrs = new Object();
0
+  ret.params = new Object();
0
+  ret.objAttrs = new Object();
0
+  for (var i=0; i < args.length; i=i+2){
0
+    var currArg = args[i].toLowerCase();    
0
+
0
+    switch (currArg){  
0
+      case "classid":
0
+        break;
0
+      case "pluginspage":
0
+        ret.embedAttrs[args[i]] = args[i+1];
0
+        break;
0
+      case "src":
0
+      case "movie":  
0
+        args[i+1] = AC_AddExtension(args[i+1], ext);
0
+        ret.embedAttrs["src"] = args[i+1];
0
+        ret.params[srcParamName] = args[i+1];
0
+        break;
0
+      case "onafterupdate":
0
+      case "onbeforeupdate":
0
+      case "onblur":
0
+      case "oncellchange":
0
+      case "onclick":
0
+      case "ondblclick":
0
+      case "ondrag":
0
+      case "ondragend":
0
+      case "ondragenter":
0
+      case "ondragleave":
0
+      case "ondragover":
0
+      case "ondrop":
0
+      case "onfinish":
0
+      case "onfocus":
0
+      case "onhelp":
0
+      case "onmousedown":
0
+      case "onmouseup":
0
+      case "onmouseover":
0
+      case "onmousemove":
0
+      case "onmouseout":
0
+      case "onkeypress":
0
+      case "onkeydown":
0
+      case "onkeyup":
0
+      case "onload":
0
+      case "onlosecapture":
0
+      case "onpropertychange":
0
+      case "onreadystatechange":
0
+      case "onrowsdelete":
0
+      case "onrowenter":
0
+      case "onrowexit":
0
+      case "onrowsinserted":
0
+      case "onstart":
0
+      case "onscroll":
0
+      case "onbeforeeditfocus":
0
+      case "onactivate":
0
+      case "onbeforedeactivate":
0
+      case "ondeactivate":
0
+      case "type":
0
+      case "codebase":
0
+      case "id":
0
+        ret.objAttrs[args[i]] = args[i+1];
0
+        break;
0
+      case "width":
0
+      case "height":
0
+      case "align":
0
+      case "vspace": 
0
+      case "hspace":
0
+      case "class":
0
+      case "title":
0
+      case "accesskey":
0
+      case "name":
0
+      case "tabindex":
0
+        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
0
+        break;
0
+      default:
0
+        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
0
+    }
0
+  }
0
+  ret.objAttrs["classid"] = classid;
0
+  if (mimeType) ret.embedAttrs["type"] = mimeType;
0
+  return ret;
0
+}
0
lib/air/AIRAliases.js
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
0
@@ -0,0 +1,208 @@
0
+/* AIRAliases.js - Revision: 1.5 */
0
+
0
+/*
0
+ADOBE SYSTEMS INCORPORATED
0
+Copyright 2007-2008 Adobe Systems Incorporated. All Rights Reserved.
0
+ 
0
+NOTICE:   Adobe permits you to modify and distribute this file only in accordance with
0
+the terms of Adobe AIR SDK license agreement.  You may have received this file from a
0
+source other than Adobe.  Nonetheless, you may modify or
0
+distribute this file only in accordance with such agreement. 
0
+*/
0
+
0
+
0
+var air;
0
+if (window.runtime) 
0
+{
0
+    if (!air) air = {};
0
+    // functions
0
+    air.trace = window.runtime.trace;
0
+    air.navigateToURL = window.runtime.flash.net.navigateToURL;
0
+    air.sendToURL = window.runtime.flash.net.sendToURL;
0
+
0
+
0
+    // file
0
+    air.File = window.runtime.flash.filesystem.File;
0
+    air.FileStream = window.runtime.flash.filesystem.FileStream;
0
+    air.FileMode = window.runtime.flash.filesystem.FileMode;
0
+
0
+    // events
0
+    air.ActivityEvent = window.runtime.flash.events.ActivityEvent;
0
+    air.AsyncErrorEvent = window.runtime.flash.events.AsyncErrorEvent;
0
+    air.BrowserInvokeEvent = window.runtime.flash.events.BrowserInvokeEvent;
0
+    air.DataEvent = window.runtime.flash.events.DataEvent;
0
+    air.DRMAuthenticateEvent = window.runtime.flash.events.DRMAuthenticateEvent;
0
+    air.DRMStatusEvent = window.runtime.flash.events.DRMStatusEvent;
0
+    air.ErrorEvent = window.runtime.flash.events.ErrorEvent;
0
+    air.Event = window.runtime.flash.events.Event;
0
+    air.EventDispatcher = window.runtime.flash.events.EventDispatcher;
0
+    air.FileListEvent = window.runtime.flash.events.FileListEvent;
0
+    air.HTTPStatusEvent = window.runtime.flash.events.HTTPStatusEvent;
0
+    air.IOErrorEvent = window.runtime.flash.events.IOErrorEvent;
0
+    air.InvokeEvent = window.runtime.flash.events.InvokeEvent;
0
+    air.NetStatusEvent = window.runtime.flash.events.NetStatusEvent;
0
+    air.OutputProgressEvent = window.runtime.flash.events.OutputProgressEvent;
0
+    air.ProgressEvent = window.runtime.flash.events.ProgressEvent;
0
+    air.SecurityErrorEvent = window.runtime.flash.events.SecurityErrorEvent;
0
+    air.StatusEvent = window.runtime.flash.events.StatusEvent;
0
+    air.TimerEvent = window.runtime.flash.events.TimerEvent;
0
+    air.SampleDataEvent = window.runtime.flash.events.SampleDataEvent;
0
+    
0
+    // native window
0
+    air.NativeWindow = window.runtime.flash.display.NativeWindow;
0
+    air.NativeWindowDisplayState = window.runtime.flash.display.NativeWindowDisplayState;
0
+    air.NativeWindowInitOptions = window.runtime.flash.display.NativeWindowInitOptions;
0
+    air.NativeWindowSystemChrome = window.runtime.flash.display.NativeWindowSystemChrome;
0
+    air.NativeWindowResize = window.runtime.flash.display.NativeWindowResize;
0
+    air.NativeWindowType = window.runtime.flash.display.NativeWindowType;
0
+
0
+    air.NativeWindowBoundsEvent = window.runtime.flash.events.NativeWindowBoundsEvent;
0
+    air.NativeWindowDisplayStateEvent = window.runtime.flash.events.NativeWindowDisplayStateEvent;
0
+
0
+    // geom
0
+    air.Point = window.runtime.flash.geom.Point;
0
+    air.Rectangle = window.runtime.flash.geom.Rectangle;
0
+    air.Matrix = window.runtime.flash.geom.Matrix;
0
+
0
+    // 3D
0
+    air.Matrix3D  = window.runtime.flash.geom.Matrix3D;
0
+    air.Vector3D  = window.runtime.flash.geom.Vector3D;
0
+    air.Orientation3D  = window.runtime.flash.geom.Orientation3D;
0
+    air.Utils3D  = window.runtime.flash.geom.Utils3D;
0
+    
0
+    // Shader    
0
+    air.Shader = window.runtime.flash.display.Shader;
0
+    air.ShaderFilter = window.runtime.flash.filters.ShaderFilter;
0
+    air.ShaderPrecision = window.runtime.flash.display.ShaderPrecision;
0
+    
0
+    // net
0
+    air.FileFilter = window.runtime.flash.net.FileFilter;
0
+    
0
+    air.LocalConnection = window.runtime.flash.net.LocalConnection;
0
+    air.NetConnection = window.runtime.flash.net.NetConnection;
0
+
0
+    air.URLLoader = window.runtime.flash.net.URLLoader;
0
+    air.URLLoaderDataFormat = window.runtime.flash.net.URLLoaderDataFormat;
0
+    air.URLRequest = window.runtime.flash.net.URLRequest;
0
+    air.URLRequestDefaults = window.runtime.flash.net.URLRequestDefaults;
0
+    air.URLRequestHeader = window.runtime.flash.net.URLRequestHeader;
0
+    air.URLRequestMethod = window.runtime.flash.net.URLRequestMethod;
0
+    air.URLStream = window.runtime.flash.net.URLStream;
0
+    air.URLVariables = window.runtime.flash.net.URLVariables;
0
+    air.Socket = window.runtime.flash.net.Socket;
0
+    air.XMLSocket = window.runtime.flash.net.XMLSocket;
0
+
0
+    air.Responder = window.runtime.flash.net.Responder;
0
+    air.ObjectEncoding = window.runtime.flash.net.ObjectEncoding;
0
+
0
+    air.NetStream = window.runtime.flash.net.NetStream;
0
+    air.NetStreamInfo = window.runtime.flash.net.NetStreamInfo;
0
+    air.NetStreamPlayOptions = window.runtime.flash.net.NetStreamPlayOptions;
0
+    air.NetStreamPlayTransitions = window.runtime.flash.net.NetStreamPlayTransitions;
0
+    air.SharedObject = window.runtime.flash.net.SharedObject;
0
+    air.SharedObjectFlushStatus = window.runtime.flash.net.SharedObjectFlushStatus;
0
+
0
+    // system
0
+    air.Capabilities = window.runtime.flash.system.Capabilities;
0
+    air.System = window.runtime.flash.system.System;
0
+    air.Security = window.runtime.flash.system.Security;
0
+    air.Updater = window.runtime.flash.desktop.Updater;
0
+
0
+    // desktop
0
+    air.Clipboard = window.runtime.flash.desktop.Clipboard;
0
+    air.ClipboardFormats = window.runtime.flash.desktop.ClipboardFormats;
0
+    air.ClipboardTransferMode = window.runtime.flash.desktop.ClipboardTransferMode;
0
+
0
+    air.NativeDragManager = window.runtime.flash.desktop.NativeDragManager;
0
+    air.NativeDragOptions = window.runtime.flash.desktop.NativeDragOptions;
0
+    air.NativeDragActions = window.runtime.flash.desktop.NativeDragActions;
0
+
0
+    air.Icon = window.runtime.flash.desktop.Icon;
0
+    air.DockIcon = window.runtime.flash.desktop.DockIcon;
0
+    air.InteractiveIcon = window.runtime.flash.desktop.InteractiveIcon;
0
+    air.NotificationType = window.runtime.flash.desktop.NotificationType;
0
+    air.SystemTrayIcon = window.runtime.flash.desktop.SystemTrayIcon;
0
+
0
+    air.NativeApplication = window.runtime.flash.desktop.NativeApplication;
0
+
0
+    // display
0
+    air.NativeMenu = window.runtime.flash.display.NativeMenu;
0
+    air.NativeMenuItem = window.runtime.flash.display.NativeMenuItem;
0
+    air.Screen = window.runtime.flash.display.Screen;
0
+    
0
+    air.Loader  = window.runtime.flash.display.Loader;
0
+    air.Bitmap = window.runtime.flash.display.Bitmap;
0
+    air.BitmapData = window.runtime.flash.display.BitmapData;
0
+
0
+    // ui
0
+    air.Keyboard = window.runtime.flash.ui.Keyboard;
0
+    air.KeyLocation = window.runtime.flash.ui.KeyLocation;
0
+    air.Mouse = window.runtime.flash.ui.Mouse;
0
+
0
+
0
+    //security
0
+    air.ReferencesValidationSetting = window.runtime.flash.security.ReferencesValidationSetting;
0
+    air.RevocationCheckSettings = window.runtime.flash.security.RevocationCheckSettings;
0
+    air.SignatureStatus = window.runtime.flash.security.SignatureStatus;
0
+    air.SignerTrustSettings = window.runtime.flash.security.SignerTrustSettings;
0
+    air.XMLSignatureValidator = window.runtime.flash.security.XMLSignatureValidator;
0
+        
0
+
0
+    // utils
0
+    air.ByteArray = window.runtime.flash.utils.ByteArray;
0
+    air.CompressionAlgorithm = window.runtime.flash.utils.CompressionAlgorithm;
0
+    air.Endian = window.runtime.flash.utils.Endian;
0
+    air.Timer = window.runtime.flash.utils.Timer;
0
+
0
+    air.HTMLLoader = window.runtime.flash.html.HTMLLoader;
0
+    air.HTMLPDFCapability = window.runtime.flash.html.HTMLPDFCapability;    
0
+
0
+    // media
0
+    air.ID3Info = window.runtime.flash.media.ID3Info;
0
+    air.Sound = window.runtime.flash.media.Sound;
0
+    air.SoundChannel = window.runtime.flash.media.SoundChannel;
0
+    air.SoundLoaderContext = window.runtime.flash.media.SoundLoaderContext;
0
+    air.SoundMixer = window.runtime.flash.media.SoundMixer;
0
+    air.SoundTransform = window.runtime.flash.media.SoundTransform;
0
+    air.Microphone = window.runtime.flash.media.Microphone;
0
+    air.Video = window.runtime.flash.media.Video;
0
+    air.Camera = window.runtime.flash.media.Camera;
0
+    air.SoundCodec = window.runtime.flash.media.SoundCodec;
0
+
0
+    // data
0
+    air.EncryptedLocalStore = window.runtime.flash.data.EncryptedLocalStore;
0
+    air.SQLCollationType = window.runtime.flash.data.SQLCollationType;
0
+    air.SQLColumnNameStyle = window.runtime.flash.data.SQLColumnNameStyle;
0
+    air.SQLColumnSchema = window.runtime.flash.data.SQLColumnSchema;
0
+    air.SQLConnection = window.runtime.flash.data.SQLConnection;
0
+    air.SQLError = window.runtime.flash.errors.SQLError;
0
+    air.SQLErrorEvent = window.runtime.flash.events.SQLErrorEvent;
0
+    air.SQLErrorOperation = window.runtime.flash.errors.SQLErrorOperation;
0
+    air.SQLEvent = window.runtime.flash.events.SQLEvent;
0
+    air.SQLIndexSchema = window.runtime.flash.data.SQLIndexSchema;
0
+    air.SQLMode = window.runtime.flash.data.SQLMode;
0
+    air.SQLResult = window.runtime.flash.data.SQLResult;
0
+    air.SQLSchema = window.runtime.flash.data.SQLSchema;
0
+    air.SQLSchemaResult = window.runtime.flash.data.SQLSchemaResult;
0
+    air.SQLStatement = window.runtime.flash.data.SQLStatement;
0
+    air.SQLTableSchema = window.runtime.flash.data.SQLTableSchema;
0
+    air.SQLTransactionLockType = window.runtime.flash.data.SQLTransactionLockType;
0
+    air.SQLTriggerSchema = window.runtime.flash.data.SQLTriggerSchema;
0
+    air.SQLUpdateEvent = window.runtime.flash.events.SQLUpdateEvent;
0
+    air.SQLViewSchema = window.runtime.flash.data.SQLViewSchema;
0
+
0
+    // service monitoring framework
0
+    air.__defineGetter__("ServiceMonitor", function() { return window.runtime.air.net.ServiceMonitor; })
0
+    air.__defineGetter__("SocketMonitor", function() { return window.runtime.air.net.SocketMonitor; })
0
+    air.__defineGetter__("URLMonitor", function() { return window.runtime.air.net.URLMonitor; })
0
+    
0
+    // update framework
0
+    air.__defineGetter__("ApplicationUpdater", function() { return window.runtime.air.update.ApplicationUpdater; });
0
+    air.__defineGetter__("ApplicationUpdaterUI", function() { return window.runtime.air.update.ApplicationUpdaterUI; });
0
+    air.__defineGetter__("UpdateEvent", function() { return window.runtime.air.update.events.UpdateEvent; });
0
+    air.__defineGetter__("StatusUpdateEvent", function() { return window.runtime.air.update.events.StatusUpdateEvent; });
0
+    air.__defineGetter__("StatusUpdateErrorEvent", function() { return window.runtime.air.update.events.StatusUpdateErrorEvent; });
0
+    air.__defineGetter__("DownloadErrorEvent", function() { return window.runtime.air.update.events.DownloadErrorEvent; });
0
+    air.__defineGetter__("StatusFileUpdateEvent", function() { return window.runtime.air.update.events.StatusFileUpdateEvent; });
0
+    air.__defineGetter__("StatusFileUpdateErrorEvent", function() { return window.runtime.air.update.events.StatusFileUpdateErrorEvent; });
0
+}
0
\ No newline at end of file
0
lib/air/AIRIntrospector.js
1949 additions, 0 deletions not shown
0
lib/air/AIRLocalizer.js
1325 additions, 0 deletions not shown
0
lib/air/AIRMenuBuilder.js
1322 additions, 0 deletions not shown
0
lib/air/AIRSourceViewer.js
2933 additions, 0 deletions not shown
0
lib/air/applicationupdater.swf
Binary file not shown
0
lib/air/servicemonitor.swf
Binary file not shown
0
lib/docs/.svn/all-wcprops
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
0
@@ -0,0 +1,23 @@
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 58
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/docs
0
+END
0
+plugins.xml
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 70
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/docs/plugins.xml
0
+END
0
+api-docs.js
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 70
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/docs/api-docs.js
0
+END
0
+api-docs.xml
0
+K 25
0
+svn:wc:ra_dav:version-url
0
+V 71
0
+/svn/!svn/ver/6118/trunk/tools/jquery-api-browser/lib/docs/api-docs.xml
0
+END
0
lib/docs/.svn/entries
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
0
@@ -0,0 +1,64 @@
0
+8
0
+
0
+dir
0
+6496
0
+https://jqueryjs.googlecode.com/svn/trunk/tools/jquery-api-browser/lib/docs
0
+https://jqueryjs.googlecode.com/svn
0
+
0
+
0
+
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+
0
+svn:special svn:externals svn:needs-lock
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+c715fcbe-d12f-0410-84c4-316a508785bb
0
+
0
+plugins.xml
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+4ba84ce0d7c48fe69f011023f35e21b3
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+api-docs.js
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+40bc7198e397a1ad335561099b5fa302
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
+api-docs.xml
0
+file
0
+
0
+
0
+
0
+
0
+2009-01-20T22:47:05.000000Z
0
+bc6065ebe6e6a588e00c90a5d61dce6b
0
+2009-01-17T17:51:24.078978Z
0
+6118
0
+remysharp
0
+
0
lib/docs/.svn/format
...
 
...
1
0
@@ -0,0 +1 @@
0
+8
0
lib/docs/.svn/text-base/api-docs.js.svn-base
...
 
0
...
1
2
0
@@ -0,0 +1 @@
0
+loadDocs({"version": "1.2.6", "timestamp": "2008-06-03T15:40:58Z", "startdoc": "API", "letters": ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w"], "data": {"jquery1": {"id": 1, "searchname": "jquery", "name": "jQuery", "type": "function", "category": "Core", "subcategory": "$(...) The jQuery Function", "return": "jQuery", "added": "1.0", "sample": "", "desc": "This function accepts a string containing a CSS selector which is then used to match a set of elements.", "longdesc": "<p>The core functionality of jQuery centers around this function. Everything in jQuery is based upon this, or uses this in some way. The most basic use of this function is to pass in an expression (usually consisting of CSS), which then finds all matching elements.</p><p>By default, if no context is specified, $() looks for DOM elements within the context of the current HTML document. If you do specify a context, such as a DOM element or jQuery object, the expression will be matched against the contents of that context.</p><p>See <a href='Selectors'>Selectors</a> for the allowed CSS syntax for expressions. </p>", "params": [{"optional": false, "name": "expression", "type": "String", "desc": "An expression to search with."}, {"optional": true, "name": "context", "type": "Element, jQuery", "desc": "A DOM Element, Document or jQuery to use as context"}], "examples": [{"code": "$(\"div > p\").css(\"border\", \"1px solid gray\");", "htmlCode": "$(\"div &gt; p\").css(\"border\", \"1px solid gray\");", "desc": "Finds all p elements that are children of a div element.", "css": "", "inhead": "", "html": "<p>one</p> <div><p>two</p></div> <p>three</p>", "exampleId": "1iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div > p\").css(\"border\", \"1px solid gray\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>one</p> <div><p>two</p></div> <p>three</p>\n</body>\n</html>"}, {"code": "$(\"input:radio\", document.forms[0]);", "htmlCode": "$(\"input:radio\", document.forms[0]);", "desc": "Finds all inputs of type radio within the first form in the document.", "css": "", "inhead": "", "html": "", "exampleId": "1iframeExample1", "runCode": ""}, {"code": "$(\"div\", xml.responseXML);", "htmlCode": "$(\"div\", xml.responseXML);", "desc": "Finds all div elements within an XML document from an AJAX response.", "css": "", "inhead": "", "html": "", "exampleId": "1iframeExample2", "runCode": ""}]}, "jquery2": {"id": 2, "searchname": "jquery", "name": "jQuery", "type": "function", "category": "Core", "subcategory": "$(...) The jQuery Function", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Create DOM elements on-the-fly from the provided String of raw HTML.", "longdesc": "<p>You can pass in plain HTML Strings written by hand, create them using some template engine or plugin, or load them via AJAX. There are limitations when creating input elements, see the second example. Also when passing strings that may include slashes (such as an image path), escape the slashes.  When creating single elements use the closing tag or XHTML format.  For example, to create a span use $(\"<span/>\") or $(\"<span></span>\") instead of without the closing slash/tag.</p>", "params": [{"optional": false, "name": "html", "type": "String", "desc": "A string of HTML to create on the fly."}], "examples": [{"code": "$(\"<div><p>Hello</p></div>\").appendTo(\"body\")", "htmlCode": "$(\"&lt;div&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/div&gt;\").appendTo(\"body\")", "desc": "Creates a div element (and all of its contents) dynamically, and appends it to the body element. Internally, an element is created and its innerHTML property set to the given markup. It is therefore both quite flexible and limited.", "css": "", "inhead": "", "html": "", "exampleId": "2iframeExample0", "runCode": ""}, {"code": "// Does NOT work in IE:\n$(\"<input/>\").attr(\"type\", \"checkbox\");\n// Does work in IE:\n$(\"<input type='checkbox'/>\");", "htmlCode": "// Does NOT work in IE:\n$(\"&lt;input/&gt;\").attr(\"type\", \"checkbox\");\n// Does work in IE:\n$(\"&lt;input type='checkbox'/&gt;\");", "desc": "Do not create &lt;input&gt;-Elements without a type-attribute, due to Microsofts read/write-once-rule for the type-attribute of &lt;input&gt;-elements, see this <a href=\"http://msdn2.microsoft.com/en-us/library/ms534700.aspx\">http://msdn2.microsoft.com/en-us/library/ms534700.aspx</a> for details.", "css": "", "inhead": "", "html": "", "exampleId": "2iframeExample1", "runCode": ""}]}, "jquery3": {"id": 3, "searchname": "jquery", "name": "jQuery", "type": "function", "category": "Core", "subcategory": "$(...) The jQuery Function", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Wrap jQuery functionality around a single or multiple DOM Element(s).", "longdesc": "<p>This function also accepts XML Documents and Window objects as valid arguments (even though they are not DOM Elements).</p>", "params": [{"optional": false, "name": "elements", "type": "Element, Array&lt;Element&gt;", "desc": "DOM element(s) to be encapsulated by a jQuery object."}], "examples": [{"code": "$(document.body).css( \"background\", \"black\" );", "htmlCode": "$(document.body).css( \"background\", \"black\" );", "desc": "Sets the background color of the page to black.", "css": "", "inhead": "", "html": "", "exampleId": "3iframeExample0", "runCode": ""}, {"code": "$(myForm.elements).hide()", "htmlCode": "$(myForm.elements).hide()", "desc": "Hides all the input elements within a form.", "css": "", "inhead": "", "html": "", "exampleId": "3iframeExample1", "runCode": ""}]}, "jquery4": {"id": 4, "searchname": "jquery", "name": "jQuery", "type": "function", "category": "Core", "subcategory": "$(...) The jQuery Function", "return": "jQuery", "added": "1.0", "sample": "", "desc": "A shorthand for $(document).ready().", "longdesc": "<p>Allows you to bind a function to be executed when the DOM document has finished loading. This function behaves just like $(document).ready(), in that it should be used to wrap other $() operations on your page that depend on the DOM being ready to be operated on. While this function is, technically, chainable - there really isn't much use for chaining against it.</p><p>You can have as many $(document).ready events on your page as you like.</p><p>See ready(Function) for details about the ready event. </p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute when the DOM is ready."}], "examples": [{"code": "$(function(){\n  // Document is ready\n});", "htmlCode": "$(function(){\n  // Document is ready\n});", "desc": "Executes the function when the DOM is ready to be used.", "css": "", "inhead": "", "html": "", "exampleId": "4iframeExample0", "runCode": ""}, {"code": "jQuery(function($) {\n  // Your code using failsafe $ alias here...\n});", "htmlCode": "jQuery(function($) {\n  // Your code using failsafe $ alias here...\n});", "desc": "Uses both the shortcut for $(document).ready() and the argument to write failsafe jQuery code using the $ alias, without relying on the global alias.", "css": "", "inhead": "", "html": "", "exampleId": "4iframeExample1", "runCode": ""}]}, "each5": {"id": 5, "searchname": "each", "name": "each", "type": "function", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Execute a function within the context of every matched element.", "longdesc": "<p>This means that every time the passed-in function is executed (which is once for every element matched) the 'this' keyword points to the specific DOM element.</p><p>Additionally, the function, when executed, is passed a single argument representing the position of the element in the matched set (integer, zero-index).</p><p>Returning 'false' from within the each function completely stops the loop through all of the elements (this is like using a 'break' with a normal loop). Returning 'true' from within the loop skips to the next iteration (this is like using a 'continue' with a normal loop). </p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The callback to execute for each matched element.\n<pre>function callback(index, domElement) {\n  this; // this == domElement\n}\n</pre>"}], "examples": [{"code": "\n    $(document.body).click(function () {\n      $(\"div\").each(function (i) {\n        if (this.style.color != \"blue\") {\n          this.style.color = \"blue\";\n        } else {\n          this.style.color = \"\";\n        }\n      });\n    });\n", "htmlCode": "\n    $(document.body).click(function () {\n      $(\"div\").each(function (i) {\n        if (this.style.color != \"blue\") {\n          this.style.color = \"blue\";\n        } else {\n          this.style.color = \"\";\n        }\n      });\n    });\n", "desc": "Iterates over three divs and sets their color property.", "css": "\n  div { color:red; text-align:center; cursor:pointer; \n        font-weight:bolder; width:300px; }\n  ", "inhead": "", "html": "<div>Click here</div>\n  <div>to iterate through</div>\n  <div>these divs.</div>", "exampleId": "5iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function () {\n      $(\"div\").each(function (i) {\n        if (this.style.color != \"blue\") {\n          this.style.color = \"blue\";\n        } else {\n          this.style.color = \"\";\n        }\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { color:red; text-align:center; cursor:pointer; \n        font-weight:bolder; width:300px; }\n  \n</style>\n</head>\n<body>\n<div>Click here</div>\n  <div>to iterate through</div>\n  <div>these divs.</div>\n</body>\n</html>"}, {"code": "\n    $(\"span\").click(function () {\n      $(\"li\").each(function(){\n        $(this).toggleClass(\"example\");\n      });\n    });\n", "htmlCode": "\n    $(\"span\").click(function () {\n      $(\"li\").each(function(){\n        $(this).toggleClass(\"example\");\n      });\n    });\n", "desc": "If you want to have the jQuery object instead of the regular DOM element, use the $(this) function, for example:", "css": "\n  ul { font-size:18px; margin:0; }\n  span { color:blue; text-decoration:underline; cursor:pointer; }\n  .example { font-style:italic; }\n  ", "inhead": "", "html": "To do list: <span>(click here to change)</span>\n  <ul>\n    <li>Eat</li>\n    <li>Sleep</li>\n    <li>Be merry</li>\n  </ul>", "exampleId": "5iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"span\").click(function () {\n      $(\"li\").each(function(){\n        $(this).toggleClass(\"example\");\n      });\n    });\n\n  });\n</script>\n<style>\n\n  ul { font-size:18px; margin:0; }\n  span { color:blue; text-decoration:underline; cursor:pointer; }\n  .example { font-style:italic; }\n  \n</style>\n</head>\n<body>\nTo do list: <span>(click here to change)</span>\n  <ul>\n    <li>Eat</li>\n    <li>Sleep</li>\n    <li>Be merry</li>\n  </ul>\n</body>\n</html>"}, {"code": "\n    $(\"button\").click(function () {\n      $(\"div\").each(function (index, domEle) {\n        // domEle == this\n        $(domEle).css(\"backgroundColor\", \"yellow\"); \n        if ($(this).is(\"#stop\")) {\n          $(\"span\").text(\"Stopped at div index #\" + index);\n          return false;\n        }\n      });\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"div\").each(function (index, domEle) {\n        // domEle == this\n        $(domEle).css(\"backgroundColor\", \"yellow\"); \n        if ($(this).is(\"#stop\")) {\n          $(\"span\").text(\"Stopped at div index #\" + index);\n          return false;\n        }\n      });\n    });\n", "desc": "You can use 'return' to break out of each() loops early.", "css": "\n  div { width:40px; height:40px; margin:5px; float:left;\n        border:2px blue solid; text-align:center; }\n  span { color:red; }\n  ", "inhead": "", "html": "<button>Change colors</button> \n  <span></span>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div id=\"stop\">Stop here</div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "5iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"div\").each(function (index, domEle) {\n        // domEle == this\n        $(domEle).css(\"backgroundColor\", \"yellow\"); \n        if ($(this).is(\"#stop\")) {\n          $(\"span\").text(\"Stopped at div index #\" + index);\n          return false;\n        }\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { width:40px; height:40px; margin:5px; float:left;\n        border:2px blue solid; text-align:center; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<button>Change colors</button> \n  <span></span>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div id=\"stop\">Stop here</div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "eq6": {"id": 6, "searchname": "eq", "name": "eq", "type": "function", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Reduce the set of matched elements to a single element.", "longdesc": "<p>The position of the element in the set of matched elements starts at 0 and goes to length - 1.</p>", "params": [{"optional": false, "name": "position", "type": "Number", "desc": "The index of the element to select."}], "examples": [{"code": "$(\"p\").eq(1).css(\"color\", \"red\")", "htmlCode": "$(\"p\").eq(1).css(\"color\", \"red\")", "desc": "Reduces the selection to the second selected element.", "css": "", "inhead": "", "html": "<p>This is just a test.</p><p>So is this</p>", "exampleId": "6iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").eq(1).css(\"color\", \"red\")\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>This is just a test.</p><p>So is this</p>\n</body>\n</html>"}]}, "get7": {"id": 7, "searchname": "get", "name": "get", "type": "function", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "Array&lt;Element&gt;", "added": "1.0", "sample": "", "desc": "Access all matched DOM elements.", "longdesc": "<p>This serves as a backwards-compatible way of accessing all matched elements (other than the jQuery object itself, which is, in fact, an array of elements).</p><p>It is useful if you need to operate on the DOM elements themselves instead of using built-in jQuery functions. </p>", "params": [], "examples": [{"code": "\n    function disp(divs) {\n      var a = [];\n      for (var i = 0; i < divs.length; i++) {\n        a.push(divs[i].innerHTML);\n      }\n      $(\"span\").text(a.join(\" \"));\n    }\n    \n    disp( $(\"div\").get().reverse() );\n", "htmlCode": "\n    function disp(divs) {\n      var a = [];\n      for (var i = 0; i &lt; divs.length; i++) {\n        a.push(divs[i].innerHTML);\n      }\n      $(\"span\").text(a.join(\" \"));\n    }\n    \n    disp( $(\"div\").get().reverse() );\n", "desc": "Selects all divs in the document and returns the DOM Elements as an Array, then uses the built-in reverse-method to reverse that array.", "css": "\n  span { color:red; }\n  ", "inhead": "", "html": "Reversed - <span></span>\n  <div>One</div>\n  <div>Two</div>\n  <div>Three</div>", "exampleId": "7iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function disp(divs) {\n      var a = [];\n      for (var i = 0; i < divs.length; i++) {\n        a.push(divs[i].innerHTML);\n      }\n      $(\"span\").text(a.join(\" \"));\n    }\n    \n    disp( $(\"div\").get().reverse() );\n\n  });\n</script>\n<style>\n\n  span { color:red; }\n  \n</style>\n</head>\n<body>\nReversed - <span></span>\n  <div>One</div>\n  <div>Two</div>\n  <div>Three</div>\n</body>\n</html>"}]}, "get8": {"id": 8, "searchname": "get", "name": "get", "type": "function", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "Element", "added": "1.0", "sample": "", "desc": "Access a single matched DOM element at a specified index in the matched set.", "longdesc": "<p>This allows you to extract the actual DOM element and operate on it directly without necessarily using jQuery functionality on it. This function called as $(this).get(0) is the equivalent of using square bracket notation on the jQuery object itself like $(this)[0].</p>", "params": [{"optional": false, "name": "index", "type": "Number", "desc": "Access the element in the Nth position."}], "examples": [{"code": "\n    $(\"*\", document.body).click(function (e) {\n      e.stopPropagation();\n      var domEl = $(this).get(0);\n      $(\"span:first\").text(\"Clicked on - \" + domEl.tagName);\n    });\n", "htmlCode": "\n    $(\"*\", document.body).click(function (e) {\n      e.stopPropagation();\n      var domEl = $(this).get(0);\n      $(\"span:first\").text(\"Clicked on - \" + domEl.tagName);\n    });\n", "desc": "Gives the tag name of the element clicked on.", "css": "\n  span { color:red; }\n  div { background:yellow; }\n  ", "inhead": "", "html": "<span>&nbsp;</span>\n  <p>In this paragraph is an <span>important</span> section</p>\n  <div><input type=\"text\" /></div>", "exampleId": "8iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"*\", document.body).click(function (e) {\n      e.stopPropagation();\n      var domEl = $(this).get(0);\n      $(\"span:first\").text(\"Clicked on - \" + domEl.tagName);\n    });\n\n  });\n</script>\n<style>\n\n  span { color:red; }\n  div { background:yellow; }\n  \n</style>\n</head>\n<body>\n<span>&nbsp;</span>\n  <p>In this paragraph is an <span>important</span> section</p>\n  <div><input type=\"text\" /></div>\n</body>\n</html>"}]}, "index9": {"id": 9, "searchname": "index", "name": "index", "type": "function", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "Number", "added": "1.0", "sample": "", "desc": "Searches every matched element for the object and returns the index of the element, if found, starting with zero.", "longdesc": "<p>Returns -1 if the object wasn't found.</p>", "params": [{"optional": false, "name": "subject", "type": "Element ", "desc": "Object to search for."}], "examples": [{"code": "\n    $(\"div\").click(function () {\n      // this is the dom element clicked\n      var index = $(\"div\").index(this);\n      $(\"span\").text(\"That was div index #\" + index);\n    });\n", "htmlCode": "\n    $(\"div\").click(function () {\n      // this is the dom element clicked\n      var index = $(\"div\").index(this);\n      $(\"span\").text(\"That was div index #\" + index);\n    });\n", "desc": "On click, returns the index (based zero) of that div in the page.", "css": "\n  div { background:yellow; margin:5px; }\n  span { color:red; }\n  ", "inhead": "", "html": "<span>Click a div!</span>\n  <div>First div</div>\n  <div>Second div</div>\n  <div>Third div</div>", "exampleId": "9iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").click(function () {\n      // this is the dom element clicked\n      var index = $(\"div\").index(this);\n      $(\"span\").text(\"That was div index #\" + index);\n    });\n\n  });\n</script>\n<style>\n\n  div { background:yellow; margin:5px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<span>Click a div!</span>\n  <div>First div</div>\n  <div>Second div</div>\n  <div>Third div</div>\n</body>\n</html>"}, {"code": "$(\"*\").index( $('#foobar')[0] )", "htmlCode": "$(\"*\").index( $('#foobar')[0] )", "desc": "Returns the index for the element with ID foobar.", "css": "", "inhead": "", "html": "<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>", "exampleId": "9iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"*\").index( $('#foobar')[0] )\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>\n</body>\n</html>"}, {"code": "$(\"*\").index( $('#foo')[0] )", "htmlCode": "$(\"*\").index( $('#foo')[0] )", "desc": "Returns the index for the element with ID foo within another element.", "css": "", "inhead": "", "html": "<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>", "exampleId": "9iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"*\").index( $('#foo')[0] )\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>\n</body>\n</html>"}, {"code": "var mainNavLinks = $('ul#mainNav li a');\nmainNavLinks.click(function(){alert(mainNavLinks.index(this)0;});", "htmlCode": "var mainNavLinks = $('ul#mainNav li a');\nmainNavLinks.click(function(){alert(mainNavLinks.index(this)0;});", "desc": "Returns the index for the element clicked within a collection.", "css": "", "inhead": "", "html": "", "exampleId": "9iframeExample3", "runCode": ""}, {"code": "$(\"*\").index( $('#bar')[0] )", "htmlCode": "$(\"*\").index( $('#bar')[0] )", "desc": "Returns -1, as there is no element with ID bar.", "css": "", "inhead": "", "html": "<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>", "exampleId": "9iframeExample4", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"*\").index( $('#bar')[0] )\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>\n</body>\n</html>"}]}, "length10": {"id": 10, "searchname": "length", "name": "length", "type": "property", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "Number", "added": "", "sample": "", "desc": "The number of elements in the jQuery object.", "longdesc": "<p>The number of elements currently matched. The <a href='Core/size'>size</a> function will return the same value.</p>", "params": [], "examples": [{"code": " \n    $(document.body).click(function () {\n      $(document.body).append($(\"<div>\"));\n      var n = $(\"div\").length;\n      $(\"span\").text(\"There are \" + n + \" divs.\" +\n                     \"Click to add more.\");\n    }).trigger('click'); // trigger the click to start\n", "htmlCode": " \n    $(document.body).click(function () {\n      $(document.body).append($(\"&lt;div&gt;\"));\n      var n = $(\"div\").length;\n      $(\"span\").text(\"There are \" + n + \" divs.\" +\n                     \"Click to add more.\");\n    }).trigger('click'); // trigger the click to start\n", "desc": "Count the divs.  Click to add more.", "css": "\n  body { cursor:pointer; }\n  div { width:50px; height:30px; margin:5px; float:left;\n        background:green; }\n  span { color:red; }\n  ", "inhead": "", "html": "<span></span>\n  <div></div>", "exampleId": "10iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n \n    $(document.body).click(function () {\n      $(document.body).append($(\"<div>\"));\n      var n = $(\"div\").length;\n      $(\"span\").text(\"There are \" + n + \" divs.\" +\n                     \"Click to add more.\");\n    }).trigger('click'); // trigger the click to start\n\n  });\n</script>\n<style>\n\n  body { cursor:pointer; }\n  div { width:50px; height:30px; margin:5px; float:left;\n        background:green; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<span></span>\n  <div></div>\n</body>\n</html>"}]}, "data11": {"id": 11, "searchname": "data", "name": "data", "type": "function", "category": "Core", "subcategory": "Data Cache", "return": "Any", "added": "1.2.3", "sample": "", "desc": "Returns value at named data store for the element, as set by data(name, value).", "longdesc": "<p>If the JQuery collection references multiple elements, the value returned refers to the first element.</p><p>This function is used to get stored data on an element without the risk of a circular reference.  It uses jQuery.data and is new to version 1.2.3.  It can be used for many reasons and jQuery UI uses it heavily. </p>", "params": [{"optional": false, "name": "name", "type": "String", "desc": "Name of the data stored."}], "examples": [{"code": "\n    $(\"button\").click(function(e) {\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = $(\"div\").data(\"blah\");\n          break;\n        case 1 :\n          $(\"div\").data(\"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          $(\"div\").data(\"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          $(\"div\").removeData(\"blah\");\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n", "htmlCode": "\n    $(\"button\").click(function(e) {\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = $(\"div\").data(\"blah\");\n          break;\n        case 1 :\n          $(\"div\").data(\"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          $(\"div\").data(\"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          $(\"div\").removeData(\"blah\");\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n", "desc": "Get the data named \"blah\" stored at for an element.", "css": "\n  div { margin:5px; background:yellow; }\n  button { margin:5px; font-size:14px; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>A div</div>\n  <button>Get \"blah\" from the div</button>\n  <button>Set \"blah\" to \"hello\"</button>\n  <button>Set \"blah\" to 86</button>\n  <button>Remove \"blah\" from the div</button>\n  <p>The \"blah\" value of this div is <span>?</span></p>", "exampleId": "11iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function(e) {\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = $(\"div\").data(\"blah\");\n          break;\n        case 1 :\n          $(\"div\").data(\"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          $(\"div\").data(\"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          $(\"div\").removeData(\"blah\");\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:5px; background:yellow; }\n  button { margin:5px; font-size:14px; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>A div</div>\n  <button>Get \"blah\" from the div</button>\n  <button>Set \"blah\" to \"hello\"</button>\n  <button>Set \"blah\" to 86</button>\n  <button>Remove \"blah\" from the div</button>\n  <p>The \"blah\" value of this div is <span>?</span></p>\n</body>\n</html>"}]}, "data12": {"id": 12, "searchname": "data", "name": "data", "type": "function", "category": "Core", "subcategory": "Data Cache", "return": "Any", "added": "1.2.3", "sample": "", "desc": "Stores the value in the named spot and also returns the value.", "longdesc": "<p>If the JQuery collection references multiple elements, the data element is set on all of them.</p><p>This function can be useful for attaching data to elements without having to create a new expando.  It also isn't limited to a string.  The value can be any format.</p>", "params": [{"optional": false, "name": "name", "type": "String", "desc": "Name of the data to store."}, {"optional": false, "name": "value", "type": "Any", "desc": "Value to be stored."}], "examples": [{"code": "\n    $(\"div\").data(\"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text($(\"div\").data(\"test\").first);\n    $(\"span:last\").text($(\"div\").data(\"test\").last);\n", "htmlCode": "\n    $(\"div\").data(\"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text($(\"div\").data(\"test\").first);\n    $(\"span:last\").text($(\"div\").data(\"test\").last);\n", "desc": "Store then retrieve a value from the div element.", "css": "\n  div { color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>\n    The values stored were \n    <span></span>\n    and\n    <span></span>\n  </div>", "exampleId": "12iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").data(\"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text($(\"div\").data(\"test\").first);\n    $(\"span:last\").text($(\"div\").data(\"test\").last);\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>\n    The values stored were \n    <span></span>\n    and\n    <span></span>\n  </div>\n</body>\n</html>"}]}, "removedata13": {"id": 13, "searchname": "removedata", "name": "removeData", "type": "function", "category": "Core", "subcategory": "Data Cache", "return": "jQuery", "added": "1.2.3", "sample": "", "desc": "Removes named data store from an element.", "longdesc": "<p>This is the complement function to $(...).data(name, value).</p>", "params": [{"optional": false, "name": "name", "type": "String", "desc": "The name of the data store property to remove."}], "examples": [{"code": "\n    $(\"span:eq(0)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").data(\"test1\", \"VALUE-1\");\n    $(\"div\").data(\"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").removeData(\"test1\");\n    $(\"span:eq(2)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"span:eq(3)\").text(\"\" + $(\"div\").data(\"test2\"));\n", "htmlCode": "\n    $(\"span:eq(0)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").data(\"test1\", \"VALUE-1\");\n    $(\"div\").data(\"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").removeData(\"test1\");\n    $(\"span:eq(2)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"span:eq(3)\").text(\"\" + $(\"div\").data(\"test2\"));\n", "desc": "Set a data store for 2 names then remove one of them.", "css": "\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>", "exampleId": "13iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"span:eq(0)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").data(\"test1\", \"VALUE-1\");\n    $(\"div\").data(\"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").removeData(\"test1\");\n    $(\"span:eq(2)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"span:eq(3)\").text(\"\" + $(\"div\").data(\"test2\"));\n\n  });\n</script>\n<style>\n\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>\n</body>\n</html>"}]}, "fn.extend14": {"id": 14, "searchname": "fn.extend", "name": "$.fn.extend", "type": "function", "category": "Core", "subcategory": "Plugins", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Extends the jQuery element set to provide new methods (used to make a typical jQuery plugin).", "longdesc": "<p>Can be used to add functions into the to add <a href='Plugins/Authoring'>plugin methods (plugins)</a>. </p>", "params": [{"optional": false, "name": "object", "type": "Object", "desc": "The object that will be merged into the jQuery object."}], "examples": [{"code": "jQuery.fn.extend({\n  check: function() {\n    return this.each(function() { this.checked = true; });\n  },\n  uncheck: function() {\n    return this.each(function() { this.checked = false; });\n  }\n});", "htmlCode": "jQuery.fn.extend({\n  check: function() {\n    return this.each(function() { this.checked = true; });\n  },\n  uncheck: function() {\n    return this.each(function() { this.checked = false; });\n  }\n});", "desc": "Adds two plugin methods.", "css": "", "inhead": "", "html": "", "exampleId": "14iframeExample0", "runCode": ""}]}, "extend15": {"id": 15, "searchname": "extend", "name": "$.extend", "type": "function", "category": "Core", "subcategory": "Plugins", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Extends the jQuery object itself.", "longdesc": "<p>Can be used to add functions into the jQuery namespace. See <a href='Core/jQuery.fn.extend'>jQuery.fn.extend</a> for more information on using this method to add <a href='Plugins/Authoring'>Plugins</a>.</p>", "params": [{"optional": false, "name": "object", "type": "Object", "desc": "The object that will be merged into the jQuery object."}], "examples": [{"code": "jQuery.extend({\n  min: function(a, b) { return a < b ? a : b; },\n  max: function(a, b) { return a > b ? a : b; }\n});", "htmlCode": "jQuery.extend({\n  min: function(a, b) { return a &lt; b ? a : b; },\n  max: function(a, b) { return a &gt; b ? a : b; }\n});", "desc": "Adds two functions into the jQuery namespace.", "css": "", "inhead": "", "html": "", "exampleId": "15iframeExample0", "runCode": ""}]}, "noconflict16": {"id": 16, "searchname": "noconflict", "name": "$.noConflict", "type": "function", "category": "Core", "subcategory": "Interoperability", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Run this function to give control of the $ variable back to whichever library first implemented it.", "longdesc": "<p>This helps to make sure that jQuery doesn't conflict with the $ object of other libraries.</p><p>By using this function, you will only be able to access jQuery using the 'jQuery' variable. For example, where you used to do $(\"div p\"), you now must do jQuery(\"div p\").</p><p><strong>NOTE:</strong> This function must be called after including the jQuery javascript file, but <strong>before</strong> including any other conflicting library, and also before actually that other conflicting library gets used, in case jQuery is included last.</p>", "params": [], "examples": [{"code": "jQuery.noConflict();\n// Do something with jQuery\njQuery(\"div p\").hide();\n// Do something with another library's $()\n$(\"content\").style.display = 'none';", "htmlCode": "jQuery.noConflict();\n// Do something with jQuery\njQuery(\"div p\").hide();\n// Do something with another library's $()\n$(\"content\").style.display = 'none';", "desc": "Maps the original object that was referenced by $ back to $.", "css": "", "inhead": "", "html": "", "exampleId": "16iframeExample0", "runCode": ""}, {"code": "jQuery.noConflict();\n(function($) { \n  $(function() {\n    // more code using $ as alias to jQuery\n  });\n})(jQuery);\n// other code using $ as an alias to the other library", "htmlCode": "jQuery.noConflict();\n(function($) { \n  $(function() {\n    // more code using $ as alias to jQuery\n  });\n})(jQuery);\n// other code using $ as an alias to the other library", "desc": "Reverts the $ alias and then creates and executes a function to provide the $ as a jQuery alias inside the functions scope. Inside the function the original $ object is not available. This works well for most plugins that don't rely on any other library.", "css": "", "inhead": "", "html": "", "exampleId": "16iframeExample1", "runCode": ""}, {"code": "var j = jQuery.noConflict();\n// Do something with jQuery\nj(\"div p\").hide();\n// Do something with another library's $()\n$(\"content\").style.display = 'none';", "htmlCode": "var j = jQuery.noConflict();\n// Do something with jQuery\nj(\"div p\").hide();\n// Do something with another library's $()\n$(\"content\").style.display = 'none';", "desc": "Creates a different alias instead of jQuery to use in the rest of the script.", "css": "", "inhead": "", "html": "", "exampleId": "16iframeExample2", "runCode": ""}]}, "noconflict17": {"id": 17, "searchname": "noconflict", "name": "$.noConflict", "type": "function", "category": "Core", "subcategory": "Interoperability", "return": "jQuery", "added": "1.1.4", "sample": "", "desc": "Revert control of both the $ and jQuery variables to their original owners. '''Use with discretion.'''", "longdesc": "<p>This is a more-extreme version of the simple <a href='Core/jQuery.noConflict'>noConflict</a> method, as this one will completely undo what jQuery has introduced. This is to be used in an extreme case where you'd like to embed jQuery into a high-conflict environment. <strong>NOTE:</strong> It's very likely that plugins won't work after this particular method has been called.</p>", "params": [{"optional": false, "name": "extreme", "type": "Boolean", "desc": "Set to true to enable the extreme rollback of jQuery and it's variables."}], "examples": [{"code": "var dom = {};\ndom.query = jQuery.noConflict(true);", "htmlCode": "var dom = {};\ndom.query = jQuery.noConflict(true);", "desc": "Completely move jQuery to a new namespace in another object.", "css": "", "inhead": "", "html": "", "exampleId": "17iframeExample0", "runCode": ""}]}, "id18": {"id": 18, "searchname": "id", "name": "id", "type": "selector", "category": "Selectors", "subcategory": "Basics", "return": "Array&lt;Element&gt;", "added": "1.0", "sample": "#id", "desc": "Matches a single element with the given id attribute. ", "longdesc": "<p>If the id contains characters like periods or colons you have to escape those characters with backslashes <a href=\"http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F\">http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F</a>.</p>", "params": [{"optional": false, "name": "id", "type": "String", "desc": "An ID to search for, specified via the id attribute of an element."}], "examples": [{"code": "$(\"#myDiv\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\"#myDiv\").css(\"border\",\"3px solid red\");", "desc": "Finds the element with the id \"myDiv\".", "css": "\n  div {\n    width: 90px;\n    height: 90px;\n    float:left;\n    padding: 5px;\n    margin: 5px;\n    background-color: #EEEEEE;\n  }\n  ", "inhead": "", "html": "<div id=\"notMe\"><p>id=\"notMe\"</p></div>\n  <div id=\"myDiv\">id=\"myDiv\"</div>", "exampleId": "18iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"#myDiv\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div {\n    width: 90px;\n    height: 90px;\n    float:left;\n    padding: 5px;\n    margin: 5px;\n    background-color: #EEEEEE;\n  }\n  \n</style>\n</head>\n<body>\n<div id=\"notMe\"><p>id=\"notMe\"</p></div>\n  <div id=\"myDiv\">id=\"myDiv\"</div>\n</body>\n</html>"}, {"code": "$(\"#myID\\\\.entry\\\\[1\\\\]\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\"#myID\\\\.entry\\\\[1\\\\]\").css(\"border\",\"3px solid red\");", "desc": "Finds the element with the id \"myID.entry[1]\".  See how certain characters must be escaped with backslashes.", "css": "\n  div {\n    width: 300px;\n    float:left;\n    padding: 2px;\n    margin: 3px;\n    background-color: #EEEEEE;\n  }\n  ", "inhead": "", "html": "<div id=\"myID.entry[0]\">id=\"myID.entry[0]\"</div>\n  <div id=\"myID.entry[1]\">id=\"myID.entry[1]\"</div>\n  <div id=\"myID.entry[2]\">id=\"myID.entry[2]\"</div>", "exampleId": "18iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"#myID\\\\.entry\\\\[1\\\\]\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div {\n    width: 300px;\n    float:left;\n    padding: 2px;\n    margin: 3px;\n    background-color: #EEEEEE;\n  }\n  \n</style>\n</head>\n<body>\n<div id=\"myID.entry[0]\">id=\"myID.entry[0]\"</div>\n  <div id=\"myID.entry[1]\">id=\"myID.entry[1]\"</div>\n  <div id=\"myID.entry[2]\">id=\"myID.entry[2]\"</div>\n</body>\n</html>"}]}, "element19": {"id": 19, "searchname": "element", "name": "element", "type": "selector", "category": "Selectors", "subcategory": "Basics", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "element", "desc": "Matches all elements with the given name. ", "longdesc": "", "params": [{"optional": false, "name": "element", "type": "String", "desc": "An element to search for. Refers to the tagName of DOM nodes."}], "examples": [{"code": "$(\"div\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\"div\").css(\"border\",\"3px solid red\");", "desc": "Finds every DIV element.", "css": "\n  div,span {\n    width: 60px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  ", "inhead": "", "html": "<div>DIV1</div>\n  <div>DIV2</div>\n  <span>SPAN</span>", "exampleId": "19iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div,span {\n    width: 60px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  \n</style>\n</head>\n<body>\n<div>DIV1</div>\n  <div>DIV2</div>\n  <span>SPAN</span>\n</body>\n</html>"}]}, "class20": {"id": 20, "searchname": "class", "name": "class", "type": "selector", "category": "Selectors", "subcategory": "Basics", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ".class", "desc": "Matches all elements with the given class. ", "longdesc": "", "params": [{"optional": false, "name": "class", "type": "String", "desc": "A class to search for. An element can have multiple classes, one of them must match."}], "examples": [{"code": "$(\".myClass\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\".myClass\").css(\"border\",\"3px solid red\");", "desc": "Finds the element with the class \"myClass\".", "css": "\n  div,span {\n    width: 150px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  ", "inhead": "", "html": "<div class=\"notMe\">div class=\"notMe\"</div>\n  <div class=\"myClass\">div class=\"myClass\"</div>\n  <span class=\"myClass\">span class=\"myClass\"</span>", "exampleId": "20iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\".myClass\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div,span {\n    width: 150px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  \n</style>\n</head>\n<body>\n<div class=\"notMe\">div class=\"notMe\"</div>\n  <div class=\"myClass\">div class=\"myClass\"</div>\n  <span class=\"myClass\">span class=\"myClass\"</span>\n</body>\n</html>"}]}, "all21": {"id": 21, "searchname": "all", "name": "all", "type": "selector", "category": "Selectors", "subcategory": "Basics", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "*", "desc": "Matches all elements.", "longdesc": "<p>Most useful when combined with a context to search in.</p>", "params": [], "examples": [{"code": "$(\"*\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\"*\").css(\"border\",\"3px solid red\");", "desc": "Finds every element (including head, body, etc).", "css": "\n  div,span,p {\n    width: 150px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  ", "inhead": "", "html": "<div>DIV</div>\n  <span>SPAN</span>\n  <p>P <button>Button</button></p>", "exampleId": "21iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"*\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div,span,p {\n    width: 150px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  \n</style>\n</head>\n<body>\n<div>DIV</div>\n  <span>SPAN</span>\n  <p>P <button>Button</button></p>\n</body>\n</html>"}, {"code": "$(\"*\", document.body).css(\"border\",\"3px solid red\");", "htmlCode": "$(\"*\", document.body).css(\"border\",\"3px solid red\");", "desc": "A common way to find all elements is to set the 'context' to document.body so elements like head, script, etc are left out.", "css": "", "inhead": "", "html": "", "exampleId": "21iframeExample1", "runCode": ""}]}, "multiple22": {"id": 22, "searchname": "multiple", "name": "multiple", "type": "selector", "category": "Selectors", "subcategory": "Basics", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "selector1, selector2, selectorN", "desc": "Matches the combined results of all the specified selectors.", "longdesc": "<p>You can specify any number of selectors to combine into a single result.  Note order of the dom elements in the jQuery object aren't necessarily identical.</p>", "params": [{"optional": false, "name": "selector1", "type": "Selector", "desc": "Any valid selector"}, {"optional": false, "name": "selector2", "type": "Selector", "desc": "Another valid selector"}, {"optional": true, "name": "selectorN", "type": "Selector", "desc": "As many more valid selectors as you like"}], "examples": [{"code": "$(\"div,span,p.myClass\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\"div,span,p.myClass\").css(\"border\",\"3px solid red\");", "desc": "Finds the elements that match any of these three selectors.", "css": "\n  div,span,p {\n    width: 130px;\n    height: 60px;\n    float:left;\n    padding: 3px;\n    margin: 2px;\n    background-color: #EEEEEE;\n    font-size:14px;\n  }\n  ", "inhead": "", "html": "<div>div</div>\n  <p class=\"myClass\">p class=\"myClass\"</p>\n  <p class=\"notMyClass\">p class=\"notMyClass\"</p>\n  <span>span</span>", "exampleId": "22iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div,span,p.myClass\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div,span,p {\n    width: 130px;\n    height: 60px;\n    float:left;\n    padding: 3px;\n    margin: 2px;\n    background-color: #EEEEEE;\n    font-size:14px;\n  }\n  \n</style>\n</head>\n<body>\n<div>div</div>\n  <p class=\"myClass\">p class=\"myClass\"</p>\n  <p class=\"notMyClass\">p class=\"notMyClass\"</p>\n  <span>span</span>\n</body>\n</html>"}, {"code": "\n    var list = $(\"div,p,span\").map(function () {\n      return this.tagName;\n    }).get().join(\", \");\n    $(\"b\").append(document.createTextNode(list));\n", "htmlCode": "\n    var list = $(\"div,p,span\").map(function () {\n      return this.tagName;\n    }).get().join(\", \");\n    $(\"b\").append(document.createTextNode(list));\n", "desc": "Show the order in the jQuery object.", "css": "\n  b { color:red; font-size:16px; display:block; clear:left; }\n  div,span,p { width: 40px; height: 40px; float:left;\n               margin: 10px; background-color: blue; \n               padding:3px; color:white; }\n  ", "inhead": "", "html": "<span>span</span>\n  <p>p</p>\n  <p>p</p>\n  <div>div</div>\n  <span>span</span>\n  <p>p</p>\n  <div>div</div>\n  <b></b>", "exampleId": "22iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var list = $(\"div,p,span\").map(function () {\n      return this.tagName;\n    }).get().join(\", \");\n    $(\"b\").append(document.createTextNode(list));\n\n  });\n</script>\n<style>\n\n  b { color:red; font-size:16px; display:block; clear:left; }\n  div,span,p { width: 40px; height: 40px; float:left;\n               margin: 10px; background-color: blue; \n               padding:3px; color:white; }\n  \n</style>\n</head>\n<body>\n<span>span</span>\n  <p>p</p>\n  <p>p</p>\n  <div>div</div>\n  <span>span</span>\n  <p>p</p>\n  <div>div</div>\n  <b></b>\n</body>\n</html>"}]}, "descendant23": {"id": 23, "searchname": "descendant", "name": "descendant", "type": "selector", "category": "Selectors", "subcategory": "Hierarchy", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "ancestor descendant", "desc": "Matches all descendant elements specified by \"descendant\" of elements specified by \"ancestor\".", "longdesc": "", "params": [{"optional": false, "name": "ancestor", "type": "Selector", "desc": "Any valid selector."}, {"optional": false, "name": "descendant", "type": "Selector", "desc": "A selector to match elements that are descendants of the first selector."}], "examples": [{"code": "$(\"form input\").css(\"border\", \"2px dotted blue\");", "htmlCode": "$(\"form input\").css(\"border\", \"2px dotted blue\");", "desc": "Finds all input descendants of forms.", "css": "\n  body { font-size:14px; }\n  form { border:2px green solid; padding:2px; margin:0; \n         background:#efe; }\n  div { color:red; }\n  fieldset { margin:1px; padding:3px; }\n  ", "inhead": "", "html": "<form>\n    <div>Form is surrounded by the green outline</div>\n    <label>Child:</label>\n    <input name=\"name\" />\n    <fieldset>\n      <label>Grandchild:</label>\n      <input name=\"newsletter\" />\n    </fieldset>\n  </form>\n  Sibling to form: <input name=\"none\" />", "exampleId": "23iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"form input\").css(\"border\", \"2px dotted blue\");\n  });\n</script>\n<style>\n\n  body { font-size:14px; }\n  form { border:2px green solid; padding:2px; margin:0; \n         background:#efe; }\n  div { color:red; }\n  fieldset { margin:1px; padding:3px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <div>Form is surrounded by the green outline</div>\n    <label>Child:</label>\n    <input name=\"name\" />\n    <fieldset>\n      <label>Grandchild:</label>\n      <input name=\"newsletter\" />\n    </fieldset>\n  </form>\n  Sibling to form: <input name=\"none\" />\n</body>\n</html>"}]}, "child24": {"id": 24, "searchname": "child", "name": "child", "type": "selector", "category": "Selectors", "subcategory": "Hierarchy", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "parent > child", "desc": "Matches all child elements specified by \"child\" of elements specified by \"parent\".", "longdesc": "", "params": [{"optional": false, "name": "parent", "type": "Selector", "desc": "Any valid selector."}, {"optional": false, "name": "child", "type": "Selector", "desc": "A selector to match elements that are children of the first selector."}], "examples": [{"code": "$(\"#main > *\").css(\"border\", \"3px double red\");", "htmlCode": "$(\"#main &gt; *\").css(\"border\", \"3px double red\");", "desc": "Finds all children of the element with id \"main\" which is yellow.", "css": "\n  body { font-size:14px; }\n  span#main { display:block; background:yellow; height:110px; }\n  button { display:block; float:left; margin:2px; \n           font-size:14px; }\n  div { width:90px; height:90px; margin:5px; float:left;\n        background:#bbf; font-weight:bold; }\n  div.mini { width:30px; height:30px; background:green; }\n  ", "inhead": "", "html": "<span id=\"main\">\n    <div></div>\n    <button>Child</button>\n    <div class=\"mini\"></div>\n    <div>\n      <div class=\"mini\"></div>\n      <div class=\"mini\"></div>\n    </div>\n    <div><button>Grand</button></div>\n    <div><span>A Span <em>in</em> child</span></div>\n    <span>A Span in main</span>\n  </span>", "exampleId": "24iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"#main > *\").css(\"border\", \"3px double red\");\n  });\n</script>\n<style>\n\n  body { font-size:14px; }\n  span#main { display:block; background:yellow; height:110px; }\n  button { display:block; float:left; margin:2px; \n           font-size:14px; }\n  div { width:90px; height:90px; margin:5px; float:left;\n        background:#bbf; font-weight:bold; }\n  div.mini { width:30px; height:30px; background:green; }\n  \n</style>\n</head>\n<body>\n<span id=\"main\">\n    <div></div>\n    <button>Child</button>\n    <div class=\"mini\"></div>\n    <div>\n      <div class=\"mini\"></div>\n      <div class=\"mini\"></div>\n    </div>\n    <div><button>Grand</button></div>\n    <div><span>A Span <em>in</em> child</span></div>\n    <span>A Span in main</span>\n  </span>\n</body>\n</html>"}]}, "next25": {"id": 25, "searchname": "next", "name": "next", "type": "selector", "category": "Selectors", "subcategory": "Hierarchy", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "prev + next", "desc": "Matches all next elements specified by \"next\" that are next to elements specified by \"prev\".", "longdesc": "", "params": [{"optional": false, "name": "prev", "type": "Selector", "desc": "Any valid selector."}, {"optional": false, "name": "next", "type": "Selector", "desc": "A selector to match elements that are next to the first selector."}], "examples": [{"code": "$(\"label + input\").css(\"color\", \"blue\").val(\"Labeled!\")", "htmlCode": "$(\"label + input\").css(\"color\", \"blue\").val(\"Labeled!\")", "desc": "Finds all inputs that are next to a label.", "css": "", "inhead": "", "html": "<form>\n    <label>Name:</label>\n    <input name=\"name\" />\n    <fieldset>\n      <label>Newsletter:</label>\n      <input name=\"newsletter\" />\n    </fieldset>\n  </form>\n  <input name=\"none\" />", "exampleId": "25iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"label + input\").css(\"color\", \"blue\").val(\"Labeled!\")\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<form>\n    <label>Name:</label>\n    <input name=\"name\" />\n    <fieldset>\n      <label>Newsletter:</label>\n      <input name=\"newsletter\" />\n    </fieldset>\n  </form>\n  <input name=\"none\" />\n</body>\n</html>"}]}, "siblings26": {"id": 26, "searchname": "siblings", "name": "siblings", "type": "selector", "category": "Selectors", "subcategory": "Hierarchy", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "prev ~ siblings", "desc": "Matches all sibling elements after the \"prev\" element that match the filtering \"siblings\" selector.", "longdesc": "", "params": [{"optional": false, "name": "prev", "type": "Selector", "desc": "Any valid selector."}, {"optional": false, "name": "siblings", "type": "Selector", "desc": "A filter selector to match elements that are following siblings to the first selector."}], "examples": [{"code": "$(\"#prev ~ div\").css(\"border\", \"3px groove blue\");", "htmlCode": "$(\"#prev ~ div\").css(\"border\", \"3px groove blue\");", "desc": "Finds all divs that are siblings after the element with #prev as its id.  Notice the span isn't selected since it is not a div and the \"niece\" isn't selected since it is a child of a sibling, not an actual sibling.", "css": "\n  div,span {\n    display:block;\n    width:80px;\n    height:80px;\n    margin:5px;\n    background:#bbffaa;\n    float:left;\n    font-size:14px;\n  }\n  div#small {\n    width:60px;\n    height:25px;\n    font-size:12px;\n    background:#fab;\n  }\n  ", "inhead": "", "html": "<div>div (doesn't match since before #prev)</div>\n  <div id=\"prev\">div#prev</div>\n  <div>div sibling</div>\n  <div>div sibling <div id=\"small\">div neice</div></div>\n  <span>span sibling (not div)</span>\n  <div>div sibling</div>", "exampleId": "26iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"#prev ~ div\").css(\"border\", \"3px groove blue\");\n  });\n</script>\n<style>\n\n  div,span {\n    display:block;\n    width:80px;\n    height:80px;\n    margin:5px;\n    background:#bbffaa;\n    float:left;\n    font-size:14px;\n  }\n  div#small {\n    width:60px;\n    height:25px;\n    font-size:12px;\n    background:#fab;\n  }\n  \n</style>\n</head>\n<body>\n<div>div (doesn't match since before #prev)</div>\n  <div id=\"prev\">div#prev</div>\n  <div>div sibling</div>\n  <div>div sibling <div id=\"small\">div neice</div></div>\n  <span>span sibling (not div)</span>\n  <div>div sibling</div>\n</body>\n</html>"}]}, "first27": {"id": 27, "searchname": "first", "name": "first", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element&gt;", "added": "1.0", "sample": ":first", "desc": "Matches the first selected element.", "longdesc": "<p>While this matches only a single element, <a href='Selectors/firstChild'>:first-child</a> matches more than one: One for each parent.</p>", "params": [], "examples": [{"code": "$(\"tr:first\").css(\"font-style\", \"italic\");", "htmlCode": "$(\"tr:first\").css(\"font-style\", \"italic\");", "desc": "Finds the first table row.", "css": "\n  td { color:blue; font-weight:bold; }\n  ", "inhead": "", "html": "<table>\n    <tr><td>Row 1</td></tr>\n    <tr><td>Row 2</td></tr>\n    <tr><td>Row 3</td></tr>\n  </table>", "exampleId": "27iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"tr:first\").css(\"font-style\", \"italic\");\n  });\n</script>\n<style>\n\n  td { color:blue; font-weight:bold; }\n  \n</style>\n</head>\n<body>\n<table>\n    <tr><td>Row 1</td></tr>\n    <tr><td>Row 2</td></tr>\n    <tr><td>Row 3</td></tr>\n  </table>\n</body>\n</html>"}]}, "last28": {"id": 28, "searchname": "last", "name": "last", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element&gt;", "added": "1.0", "sample": ":last", "desc": "Matches the last selected element.", "longdesc": "", "params": [], "examples": [{"code": "$(\"tr:last\").css({backgroundColor: 'yellow', fontWeight: 'bolder'});", "htmlCode": "$(\"tr:last\").css({backgroundColor: 'yellow', fontWeight: 'bolder'});", "desc": "Finds the last table row.", "css": "", "inhead": "", "html": "<table>\n    <tr><td>First Row</td></tr>\n    <tr><td>Middle Row</td></tr>\n    <tr><td>Last Row</td></tr>\n  </table>", "exampleId": "28iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"tr:last\").css({backgroundColor: 'yellow', fontWeight: 'bolder'});\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<table>\n    <tr><td>First Row</td></tr>\n    <tr><td>Middle Row</td></tr>\n    <tr><td>Last Row</td></tr>\n  </table>\n</body>\n</html>"}]}, "not29": {"id": 29, "searchname": "not", "name": "not", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":not(selector)", "desc": "Filters out all elements matching the given selector.", "longdesc": "", "params": [{"optional": false, "name": "selector", "type": "Selector", "desc": "A selector with which to filter by."}], "examples": [{"code": "\n    $(\"input:not(:checked) + span\").css(\"background-color\", \"yellow\");\n    $(\"input\").attr(\"disabled\", \"disabled\");\n", "htmlCode": "\n    $(\"input:not(:checked) + span\").css(\"background-color\", \"yellow\");\n    $(\"input\").attr(\"disabled\", \"disabled\");\n", "desc": "Finds all inputs that are not checked and highlights the next sibling span.  Notice there is no change when clicking the checkboxes since no click events have been linked.", "css": "", "inhead": "", "html": "<div>\n    <input type=\"checkbox\" name=\"a\" />\n    <span>Mary</span>\n  </div>\n  <div>\n    <input type=\"checkbox\" name=\"b\" />\n    <span>lcm</span>\n  </div>\n  <div>\n    <input type=\"checkbox\" name=\"c\" checked=\"checked\" />\n    <span>Peter</span>\n  </div>", "exampleId": "29iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"input:not(:checked) + span\").css(\"background-color\", \"yellow\");\n    $(\"input\").attr(\"disabled\", \"disabled\");\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div>\n    <input type=\"checkbox\" name=\"a\" />\n    <span>Mary</span>\n  </div>\n  <div>\n    <input type=\"checkbox\" name=\"b\" />\n    <span>lcm</span>\n  </div>\n  <div>\n    <input type=\"checkbox\" name=\"c\" checked=\"checked\" />\n    <span>Peter</span>\n  </div>\n</body>\n</html>"}]}, "even30": {"id": 30, "searchname": "even", "name": "even", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":even", "desc": "Matches even elements, zero-indexed.", "longdesc": "", "params": [], "examples": [{"code": "$(\"tr:even\").css(\"background-color\", \"#bbbbff\");", "htmlCode": "$(\"tr:even\").css(\"background-color\", \"#bbbbff\");", "desc": "Finds even table rows, matching the first, third and so on (index 0, 2, 4 etc.).", "css": "\n  table {\n    background:#eeeeee;\n  }\n  ", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>Row with Index #0</td></tr>\n    <tr><td>Row with Index #1</td></tr>\n    <tr><td>Row with Index #2</td></tr>\n    <tr><td>Row with Index #3</td></tr>\n  </table>", "exampleId": "30iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"tr:even\").css(\"background-color\", \"#bbbbff\");\n  });\n</script>\n<style>\n\n  table {\n    background:#eeeeee;\n  }\n  \n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>Row with Index #0</td></tr>\n    <tr><td>Row with Index #1</td></tr>\n    <tr><td>Row with Index #2</td></tr>\n    <tr><td>Row with Index #3</td></tr>\n  </table>\n</body>\n</html>"}]}, "odd31": {"id": 31, "searchname": "odd", "name": "odd", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":odd", "desc": "Matches odd elements, zero-indexed.", "longdesc": "", "params": [], "examples": [{"code": "$(\"tr:odd\").css(\"background-color\", \"#bbbbff\");", "htmlCode": "$(\"tr:odd\").css(\"background-color\", \"#bbbbff\");", "desc": "Finds odd table rows, matching the second, fourth and so on (index 1, 3, 5 etc.).", "css": "\n  table {\n    background:#f3f7f5;\n  }\n  ", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>Row with Index #0</td></tr>\n    <tr><td>Row with Index #1</td></tr>\n    <tr><td>Row with Index #2</td></tr>\n    <tr><td>Row with Index #3</td></tr>\n  </table>", "exampleId": "31iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"tr:odd\").css(\"background-color\", \"#bbbbff\");\n  });\n</script>\n<style>\n\n  table {\n    background:#f3f7f5;\n  }\n  \n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>Row with Index #0</td></tr>\n    <tr><td>Row with Index #1</td></tr>\n    <tr><td>Row with Index #2</td></tr>\n    <tr><td>Row with Index #3</td></tr>\n  </table>\n</body>\n</html>"}]}, "eq32": {"id": 32, "searchname": "eq", "name": "eq", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element&gt;", "added": "1.0", "sample": ":eq(index)", "desc": "Matches a single element by its index.", "longdesc": "", "params": [{"optional": false, "name": "index", "type": "Number", "desc": "Zero-based index of the element to match."}], "examples": [{"code": "$(\"td:eq(2)\").css(\"color\", \"red\");", "htmlCode": "$(\"td:eq(2)\").css(\"color\", \"red\");", "desc": "Finds the third td.", "css": "", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>", "exampleId": "32iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"td:eq(2)\").css(\"color\", \"red\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>\n</body>\n</html>"}]}, "gt33": {"id": 33, "searchname": "gt", "name": "gt", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":gt(index)", "desc": "Matches all elements with an index above the given one.", "longdesc": "", "params": [{"optional": false, "name": "index", "type": "Number", "desc": "Zero-based index."}], "examples": [{"code": "$(\"td:gt(4)\").css(\"text-decoration\", \"line-through\");", "htmlCode": "$(\"td:gt(4)\").css(\"text-decoration\", \"line-through\");", "desc": "Finds TD #5 and higher. Reminder: the indexing starts at 0.", "css": "", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>", "exampleId": "33iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"td:gt(4)\").css(\"text-decoration\", \"line-through\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>\n</body>\n</html>"}]}, "lt34": {"id": 34, "searchname": "lt", "name": "lt", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":lt(index)", "desc": "Matches all elements with an index below the given one.", "longdesc": "", "params": [{"optional": false, "name": "index", "type": "Number", "desc": "Zero-based index."}], "examples": [{"code": "$(\"td:lt(4)\").css(\"color\", \"red\");", "htmlCode": "$(\"td:lt(4)\").css(\"color\", \"red\");", "desc": "Finds TDs less than the one with the 4th index (TD#4).", "css": "", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>", "exampleId": "34iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"td:lt(4)\").css(\"color\", \"red\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>\n</body>\n</html>"}]}, "header35": {"id": 35, "searchname": "header", "name": "header", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.2", "sample": ":header", "desc": "Matches all elements that are headers, like h1, h2, h3 and so on.", "longdesc": "", "params": [], "examples": [{"code": "$(\":header\").css({ background:'#CCC', color:'blue' });", "htmlCode": "$(\":header\").css({ background:'#CCC', color:'blue' });", "desc": "Adds a background and text color to all the headers on the page.", "css": "\n  body { font-size: 10px; font-family: Arial; } \n  h1, h2 { margin: 3px 0; }\n  ", "inhead": "", "html": "<h1>Header 1</h1>\n  <p>Contents 1</p>\n  <h2>Header 2</h2>\n  <p>Contents 2</p>", "exampleId": "35iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\":header\").css({ background:'#CCC', color:'blue' });\n  });\n</script>\n<style>\n\n  body { font-size: 10px; font-family: Arial; } \n  h1, h2 { margin: 3px 0; }\n  \n</style>\n</head>\n<body>\n<h1>Header 1</h1>\n  <p>Contents 1</p>\n  <h2>Header 2</h2>\n  <p>Contents 2</p>\n</body>\n</html>"}]}, "animated36": {"id": 36, "searchname": "animated", "name": "animated", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.2", "sample": ":animated", "desc": "Matches all elements that are currently being animated.", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"#run\").click(function(){\n      $(\"div:animated\").toggleClass(\"colored\");\n    });\n    function animateIt() {\n      $(\"#mover\").slideToggle(\"slow\", animateIt);\n    }\n    animateIt();\n", "htmlCode": "\n    $(\"#run\").click(function(){\n      $(\"div:animated\").toggleClass(\"colored\");\n    });\n    function animateIt() {\n      $(\"#mover\").slideToggle(\"slow\", animateIt);\n    }\n    animateIt();\n", "desc": "Change the color of any div that is animated.", "css": "\n  div { background:yellow; border:1px solid #AAA; width:80px; height:80px; margin:5px; float:left; }\n  div.colored { background:green; }\n  ", "inhead": "", "html": "<button id=\"run\">Run</button>\n  <div></div>\n  <div id=\"mover\"></div>\n  <div></div>", "exampleId": "36iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#run\").click(function(){\n      $(\"div:animated\").toggleClass(\"colored\");\n    });\n    function animateIt() {\n      $(\"#mover\").slideToggle(\"slow\", animateIt);\n    }\n    animateIt();\n\n  });\n</script>\n<style>\n\n  div { background:yellow; border:1px solid #AAA; width:80px; height:80px; margin:5px; float:left; }\n  div.colored { background:green; }\n  \n</style>\n</head>\n<body>\n<button id=\"run\">Run</button>\n  <div></div>\n  <div id=\"mover\"></div>\n  <div></div>\n</body>\n</html>"}]}, "contains37": {"id": 37, "searchname": "contains", "name": "contains", "type": "selector", "category": "Selectors", "subcategory": "Content Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":contains(text)", "desc": "Matches elements which contain the given text.", "longdesc": "", "params": [{"optional": false, "name": "text", "type": "String", "desc": "A string of text to look for. It's case sensitive."}], "examples": [{"code": "$(\"div:contains('John')\").css(\"text-decoration\", \"underline\");", "htmlCode": "$(\"div:contains('John')\").css(\"text-decoration\", \"underline\");", "desc": "Finds all divs containing \"John\" and underlines them.", "css": "", "inhead": "", "html": "<div>John Resig</div>\n  <div>George Martin</div>\n  <div>Malcom John Sinclair</div>\n  <div>J. Ohn", "exampleId": "37iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div:contains('John')\").css(\"text-decoration\", \"underline\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div>John Resig</div>\n  <div>George Martin</div>\n  <div>Malcom John Sinclair</div>\n  <div>J. Ohn\n</body>\n</html>"}]}, "empty38": {"id": 38, "searchname": "empty", "name": "empty", "type": "selector", "category": "Selectors", "subcategory": "Content Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":empty", "desc": "Matches all elements that have no children (including text nodes).", "longdesc": "", "params": [], "examples": [{"code": "$(\"td:empty\").text(\"Was empty!\").css('background', 'rgb(255,220,200)');", "htmlCode": "$(\"td:empty\").text(\"Was empty!\").css('background', 'rgb(255,220,200)');", "desc": "Finds all elements that are empty - they don't have child elements or text.", "css": "\n  td { text-align:center; }\n  ", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>TD #0</td><td></td></tr>\n    <tr><td>TD #2</td><td></td></tr>\n    <tr><td></td><td>TD#5</td></tr>\n  </table>", "exampleId": "38iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"td:empty\").text(\"Was empty!\").css('background', 'rgb(255,220,200)');\n  });\n</script>\n<style>\n\n  td { text-align:center; }\n  \n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>TD #0</td><td></td></tr>\n    <tr><td>TD #2</td><td></td></tr>\n    <tr><td></td><td>TD#5</td></tr>\n  </table>\n</body>\n</html>"}]}, "has39": {"id": 39, "searchname": "has", "name": "has", "type": "selector", "category": "Selectors", "subcategory": "Content Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":has(selector)", "desc": "Matches elements which contain at least one element that matches the specified selector.", "longdesc": "", "params": [{"optional": false, "name": "selector", "type": "Selector", "desc": "A selector with which to filter by."}], "examples": [{"code": "$(\"div:has(p)\").addClass(\"test\");", "htmlCode": "$(\"div:has(p)\").addClass(\"test\");", "desc": "Adds the class \"test\" to all divs that have a paragraph inside of them.", "css": "\n  .test{ border: 3px inset red; }\n  ", "inhead": "", "html": "<div><p>Hello in a paragraph</p></div>\n  <div>Hello again! (with no paragraph)</div>", "exampleId": "39iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div:has(p)\").addClass(\"test\");\n  });\n</script>\n<style>\n\n  .test{ border: 3px inset red; }\n  \n</style>\n</head>\n<body>\n<div><p>Hello in a paragraph</p></div>\n  <div>Hello again! (with no paragraph)</div>\n</body>\n</html>"}]}, "parent40": {"id": 40, "searchname": "parent", "name": "parent", "type": "selector", "category": "Selectors", "subcategory": "Content Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":parent", "desc": "Matches all elements that are parents - they have child elements, including text.", "longdesc": "", "params": [], "examples": [{"code": "$(\"td:parent\").fadeTo(1500, 0.3);", "htmlCode": "$(\"td:parent\").fadeTo(1500, 0.3);", "desc": "Finds all tds with children, including text.", "css": "\ntd { width:40px; background:green; }\n  ", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>Value 1</td><td></td></tr>\n    <tr><td>Value 2</td><td></td></tr>\n  </table>", "exampleId": "40iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"td:parent\").fadeTo(1500, 0.3);\n  });\n</script>\n<style>\n\ntd { width:40px; background:green; }\n  \n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>Value 1</td><td></td></tr>\n    <tr><td>Value 2</td><td></td></tr>\n  </table>\n</body>\n</html>"}]}, "hidden41": {"id": 41, "searchname": "hidden", "name": "hidden", "type": "selector", "category": "Selectors", "subcategory": "Visibility Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":hidden", "desc": "Matches all elements that are hidden, or input elements of type \"hidden\".", "longdesc": "", "params": [], "examples": [{"code": "\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n", "htmlCode": "\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n", "desc": "Shows all hidden divs and counts hidden inputs.", "css": "\n  div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }\n  span { display:block; clear:left; color:red; }\n  .starthidden { display:none; }\n  ", "inhead": "", "html": "<span></span>\n  <div></div>\n  <div style=\"display:none;\">Hider!</div>\n  <div></div>\n  <div class=\"starthidden\">Hider!</div>\n  <div></div>\n  <form>\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n  </form>\n  <span>\n  </span>", "exampleId": "41iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n\n  });\n</script>\n<style>\n\n  div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }\n  span { display:block; clear:left; color:red; }\n  .starthidden { display:none; }\n  \n</style>\n</head>\n<body>\n<span></span>\n  <div></div>\n  <div style=\"display:none;\">Hider!</div>\n  <div></div>\n  <div class=\"starthidden\">Hider!</div>\n  <div></div>\n  <form>\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n  </form>\n  <span>\n  </span>\n</body>\n</html>"}]}, "visible42": {"id": 42, "searchname": "visible", "name": "visible", "type": "selector", "category": "Selectors", "subcategory": "Visibility Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":visible", "desc": "Matches all elements that are visible.", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"div:visible\").click(function () {\n      $(this).css(\"background\", \"yellow\");\n    });\n    $(\"button\").click(function () {\n      $(\"div:hidden\").show(\"fast\");\n    });\n", "htmlCode": "\n    $(\"div:visible\").click(function () {\n      $(this).css(\"background\", \"yellow\");\n    });\n    $(\"button\").click(function () {\n      $(\"div:hidden\").show(\"fast\");\n    });\n", "desc": "Make all visible divs turn yellow on click.", "css": "\n  div { width:50px; height:40px; margin:5px; border:3px outset green; float:left; }\n  .starthidden { display:none; }\n  ", "inhead": "", "html": "<button>Show hidden to see they don't change</button>\n  <div></div>\n  <div class=\"starthidden\"></div>\n  <div></div>\n  <div></div>\n  <div style=\"display:none;\"></div>", "exampleId": "42iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div:visible\").click(function () {\n      $(this).css(\"background\", \"yellow\");\n    });\n    $(\"button\").click(function () {\n      $(\"div:hidden\").show(\"fast\");\n    });\n\n  });\n</script>\n<style>\n\n  div { width:50px; height:40px; margin:5px; border:3px outset green; float:left; }\n  .starthidden { display:none; }\n  \n</style>\n</head>\n<body>\n<button>Show hidden to see they don't change</button>\n  <div></div>\n  <div class=\"starthidden\"></div>\n  <div></div>\n  <div></div>\n  <div style=\"display:none;\"></div>\n</body>\n</html>"}]}, "attributehas43": {"id": 43, "searchname": "attributehas", "name": "attributeHas", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute]", "desc": "Matches elements that have the specified attribute.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}], "examples": [{"code": "\n    $(\"div[id]\").one(\"click\", function(){\n      var idString = $(this).text() + \" = \" + $(this).attr(\"id\");\n      $(this).text(idString);\n    });\n", "htmlCode": "\n    $(\"div[id]\").one(\"click\", function(){\n      var idString = $(this).text() + \" = \" + $(this).attr(\"id\");\n      $(this).text(idString);\n    });\n", "desc": "Bind a single click that adds the div id to its text.", "css": "", "inhead": "", "html": "<div>no id</div>\n  <div id=\"hey\">with id</div>\n  <div id=\"there\">has an id</div>\n  <div>nope</div>", "exampleId": "43iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div[id]\").one(\"click\", function(){\n      var idString = $(this).text() + \" = \" + $(this).attr(\"id\");\n      $(this).text(idString);\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div>no id</div>\n  <div id=\"hey\">with id</div>\n  <div id=\"there\">has an id</div>\n  <div>nope</div>\n</body>\n</html>"}]}, "attributeequals44": {"id": 44, "searchname": "attributeequals", "name": "attributeEquals", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute=value]", "desc": "Matches elements that have the specified attribute with a certain value.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}, {"optional": false, "name": "value", "type": "String", "desc": "An attribute value. Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like \"]\"."}], "examples": [{"code": "$(\"input[name='newsletter']\").next().text(\" is newsletter\");", "htmlCode": "$(\"input[name='newsletter']\").next().text(\" is newsletter\");", "desc": "Finds all inputs with name 'newsletter' and changes the text of the span next to it.", "css": "", "inhead": "", "html": "<div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Hot Fuzz\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"newsletters\" value=\"Cold Fusion\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"accept\" value=\"Evil Plans\" />\n    <span>name?</span>\n  </div>", "exampleId": "44iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[name='newsletter']\").next().text(\" is newsletter\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Hot Fuzz\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"newsletters\" value=\"Cold Fusion\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"accept\" value=\"Evil Plans\" />\n    <span>name?</span>\n  </div>\n</body>\n</html>"}]}, "attributenotequal45": {"id": 45, "searchname": "attributenotequal", "name": "attributeNotEqual", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute!=value]", "desc": "Matches elements that don't have the specified attribute with a certain value.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}, {"optional": false, "name": "value", "type": "String", "desc": "An attribute value. Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like \"]\"."}], "examples": [{"code": "$(\"input[name!='newsletter']\").next().text(\" is not newsletter\");", "htmlCode": "$(\"input[name!='newsletter']\").next().text(\" is not newsletter\");", "desc": "Finds all inputs that don't have the name 'newsletter' and changes the text of the span next to it.", "css": "", "inhead": "", "html": "<div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Hot Fuzz\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Cold Fusion\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"accept\" value=\"Evil Plans\" />\n    <span>name?</span>\n  </div>", "exampleId": "45iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[name!='newsletter']\").next().text(\" is not newsletter\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Hot Fuzz\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Cold Fusion\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"accept\" value=\"Evil Plans\" />\n    <span>name?</span>\n  </div>\n</body>\n</html>"}]}, "attributestartswith46": {"id": 46, "searchname": "attributestartswith", "name": "attributeStartsWith", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute^=value]", "desc": "Matches elements that have the specified attribute and it starts with a certain value.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}, {"optional": false, "name": "value", "type": "String", "desc": "An attribute value. Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like \"]\"."}], "examples": [{"code": "$(\"input[@name^='news']\").val(\"news here!\");", "htmlCode": "$(\"input[@name^='news']\").val(\"news here!\");", "desc": "Finds all inputs with an attribute name that starts with 'news' and puts text in them.", "css": "", "inhead": "", "html": "<input name=\"newsletter\" />\n  <input name=\"milkman\" />\n  <input name=\"newsboy\" />", "exampleId": "46iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[@name^='news']\").val(\"news here!\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<input name=\"newsletter\" />\n  <input name=\"milkman\" />\n  <input name=\"newsboy\" />\n</body>\n</html>"}]}, "attributeendswith47": {"id": 47, "searchname": "attributeendswith", "name": "attributeEndsWith", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute$=value]", "desc": "Matches elements that have the specified attribute and it ends with a certain value.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}, {"optional": false, "name": "value", "type": "String", "desc": "An attribute value. Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like \"]\"."}], "examples": [{"code": "$(\"input[name$='letter']\").val(\"a letter\");", "htmlCode": "$(\"input[name$='letter']\").val(\"a letter\");", "desc": "Finds all inputs with an attribute name that ends with 'letter' and puts text in them.", "css": "", "inhead": "", "html": "<input name=\"newsletter\" />\n  <input name=\"milkman\" />\n  <input name=\"jobletter\" />", "exampleId": "47iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[name$='letter']\").val(\"a letter\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<input name=\"newsletter\" />\n  <input name=\"milkman\" />\n  <input name=\"jobletter\" />\n</body>\n</html>"}]}, "attributecontains48": {"id": 48, "searchname": "attributecontains", "name": "attributeContains", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute*=value]", "desc": "Matches elements that have the specified attribute and it contains a certain value.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}, {"optional": false, "name": "value", "type": "String", "desc": "An attribute value. Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like \"]\"."}], "examples": [{"code": "$(\"input[name*='man']\").val(\"has man in it!\");", "htmlCode": "$(\"input[name*='man']\").val(\"has man in it!\");", "desc": "Finds all inputs that with a name attribute that contains 'man' and sets the value with some text.", "css": "", "inhead": "", "html": "<input name=\"man-news\" />\n  <input name=\"milkman\" />\n  <input name=\"letterman2\" />\n  <input name=\"newmilk\" />", "exampleId": "48iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[name*='man']\").val(\"has man in it!\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<input name=\"man-news\" />\n  <input name=\"milkman\" />\n  <input name=\"letterman2\" />\n  <input name=\"newmilk\" />\n</body>\n</html>"}]}, "attributemultiple49": {"id": 49, "searchname": "attributemultiple", "name": "attributeMultiple", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[selector1][selector2][selectorN]", "desc": "Matches elements that have the specified attribute and it contains a certain value.", "longdesc": "", "params": [{"optional": false, "name": "selector1", "type": "Selector", "desc": "An attribute selector."}, {"optional": false, "name": "selector2", "type": "Selector", "desc": "Another attribute selector, reducing the selection even more"}, {"optional": true, "name": "selectorN", "type": "Selector", "desc": "As many more attribute selectors as necessary"}], "examples": [{"code": "$(\"input[id][name$='man']\").val(\"only this one\");", "htmlCode": "$(\"input[id][name$='man']\").val(\"only this one\");", "desc": "Finds all inputs that have an id attribute and whose name attribute ends with man and sets the value.", "css": "", "inhead": "", "html": "<input id=\"man-news\" name=\"man-news\" />\n  <input name=\"milkman\" />\n  <input id=\"letterman\" name=\"new-letterman\" />\n  <input name=\"newmilk\" />", "exampleId": "49iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[id][name$='man']\").val(\"only this one\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<input id=\"man-news\" name=\"man-news\" />\n  <input name=\"milkman\" />\n  <input id=\"letterman\" name=\"new-letterman\" />\n  <input name=\"newmilk\" />\n</body>\n</html>"}]}, "nthchild50": {"id": 50, "searchname": "nthchild", "name": "nthChild", "type": "selector", "category": "Selectors", "subcategory": "Child Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":nth-child(index/even/odd/equation)", "desc": "Matches all elements that are the nth-child of their parent or that are the parent's even or odd children.", "longdesc": "<p>While <a href='Selectors/eq'>:eq(index)</a> matches only a single element, this matches more then one: One for each parent with index.  Multiple for each parent with even, odd, or equation.</p><p>The specified index is one-indexed, in contrast to :eq() which starts at zero.</p>", "params": [{"optional": false, "name": "index", "type": "Number/String", "desc": "The index of each child to match, starting with 1 or the string even, odd, or equation ( eg. :nth-child(even), :nth-child(4n) )"}], "examples": [{"code": "$(\"ul li:nth-child(2)\").append(\"<span> - 2nd!</span>\");", "htmlCode": "$(\"ul li:nth-child(2)\").append(\"&lt;span&gt; - 2nd!&lt;/span&gt;\");", "desc": "Finds the second li in each matched ul and notes it.", "css": "\n  div { float:left; }\n  span { color:blue; }\n  ", "inhead": "", "html": "<div><ul>\n    <li>John</li>\n    <li>Karl</li>\n    <li>Brandon</li>\n  </ul></div>\n  <div><ul>\n    <li>Sam</li>\n  </ul></div>\n  <div><ul>\n    <li>Glen</li>\n    <li>Tane</li>\n    <li>Ralph</li>\n    <li>David</li>\n  </ul></div>", "exampleId": "50iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"ul li:nth-child(2)\").append(\"<span> - 2nd!</span>\");\n  });\n</script>\n<style>\n\n  div { float:left; }\n  span { color:blue; }\n  \n</style>\n</head>\n<body>\n<div><ul>\n    <li>John</li>\n    <li>Karl</li>\n    <li>Brandon</li>\n  </ul></div>\n  <div><ul>\n    <li>Sam</li>\n  </ul></div>\n  <div><ul>\n    <li>Glen</li>\n    <li>Tane</li>\n    <li>Ralph</li>\n    <li>David</li>\n  </ul></div>\n</body>\n</html>"}, {"code": "\n    $(\"button\").click(function () {\n      var str = $(this).text();\n      $(\"tr\").css(\"background\", \"white\");\n      $(\"tr\" + str).css(\"background\", \"#ff0000\");\n      $(\"#inner\").text(str);\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      var str = $(this).text();\n      $(\"tr\").css(\"background\", \"white\");\n      $(\"tr\" + str).css(\"background\", \"#ff0000\");\n      $(\"#inner\").text(str);\n    });\n", "desc": "This is a playground to see how the selector works with different strings.  Notice that this is different from the :even and :odd which have no regard for parent and just filter the list of elements to every other one.  The :nth-child, however, counts the index of the child to its particular parent.  In any case, it's easier to see than explain so...", "css": "\n  button { display:block; font-size:12px; width:100px; }\n  div { float:left; margin:10px; font-size:10px; \n        border:1px solid black; }\n  span { color:blue; font-size:18px; }\n  #inner { color:red; }\n  td { width:50px; text-align:center; }\n  ", "inhead": "", "html": "<div>\n    <button>:nth-child(even)</button>\n    <button>:nth-child(odd)</button>\n    <button>:nth-child(3n)</button>\n    <button>:nth-child(2)</button>\n  </div>\n  <div>\n    <button>:nth-child(3n+1)</button>\n    <button>:nth-child(3n+2)</button>\n    <button>:even</button>\n    <button>:odd</button>\n  </div>\n  <div><table>\n    <tr><td>John</td></tr>\n    <tr><td>Karl</td></tr>\n    <tr><td>Brandon</td></tr>\n    <tr><td>Benjamin</td></tr>\n  </table></div>\n  <div><table>\n    <tr><td>Sam</td></tr>\n  </table></div>\n  <div><table>\n    <tr><td>Glen</td></tr>\n    <tr><td>Tane</td></tr>\n    <tr><td>Ralph</td></tr>\n    <tr><td>David</td></tr>\n    <tr><td>Mike</td></tr>\n    <tr><td>Dan</td></tr>\n  </table></div>\n  <span>\n    tr<span id=\"inner\"></span>\n  </span>", "exampleId": "50iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      var str = $(this).text();\n      $(\"tr\").css(\"background\", \"white\");\n      $(\"tr\" + str).css(\"background\", \"#ff0000\");\n      $(\"#inner\").text(str);\n    });\n\n  });\n</script>\n<style>\n\n  button { display:block; font-size:12px; width:100px; }\n  div { float:left; margin:10px; font-size:10px; \n        border:1px solid black; }\n  span { color:blue; font-size:18px; }\n  #inner { color:red; }\n  td { width:50px; text-align:center; }\n  \n</style>\n</head>\n<body>\n<div>\n    <button>:nth-child(even)</button>\n    <button>:nth-child(odd)</button>\n    <button>:nth-child(3n)</button>\n    <button>:nth-child(2)</button>\n  </div>\n  <div>\n    <button>:nth-child(3n+1)</button>\n    <button>:nth-child(3n+2)</button>\n    <button>:even</button>\n    <button>:odd</button>\n  </div>\n  <div><table>\n    <tr><td>John</td></tr>\n    <tr><td>Karl</td></tr>\n    <tr><td>Brandon</td></tr>\n    <tr><td>Benjamin</td></tr>\n  </table></div>\n  <div><table>\n    <tr><td>Sam</td></tr>\n  </table></div>\n  <div><table>\n    <tr><td>Glen</td></tr>\n    <tr><td>Tane</td></tr>\n    <tr><td>Ralph</td></tr>\n    <tr><td>David</td></tr>\n    <tr><td>Mike</td></tr>\n    <tr><td>Dan</td></tr>\n  </table></div>\n  <span>\n    tr<span id=\"inner\"></span>\n  </span>\n</body>\n</html>"}]}, "firstchild51": {"id": 51, "searchname": "firstchild", "name": "firstChild", "type": "selector", "category": "Selectors", "subcategory": "Child Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":first-child", "desc": "Matches all elements that are the first child of their parent.", "longdesc": "<p>While <a href='Selectors/first'>:first</a> matches only a single element, this matches more then one: One for each parent.</p>", "params": [], "examples": [{"code": "\n    $(\"div span:first-child\")\n        .css(\"text-decoration\", \"underline\")\n        .hover(function () {\n              $(this).addClass(\"sogreen\");\n            }, function () {\n              $(this).removeClass(\"sogreen\");\n            });\n", "htmlCode": "\n    $(\"div span:first-child\")\n        .css(\"text-decoration\", \"underline\")\n        .hover(function () {\n              $(this).addClass(\"sogreen\");\n            }, function () {\n              $(this).removeClass(\"sogreen\");\n            });\n", "desc": "Finds the first span in each matched div to underline and add a hover state.", "css": "\n  span { color:#008; }\n  span.sogreen { color:green; font-weight: bolder; }\n  ", "inhead": "", "html": "<div>\n    <span>John,</span>\n    <span>Karl,</span>\n    <span>Brandon</span>\n  </div>\n  <div>\n    <span>Glen,</span>\n    <span>Tane,</span>\n    <span>Ralph</span>\n  </div>", "exampleId": "51iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div span:first-child\")\n        .css(\"text-decoration\", \"underline\")\n        .hover(function () {\n              $(this).addClass(\"sogreen\");\n            }, function () {\n              $(this).removeClass(\"sogreen\");\n            });\n\n  });\n</script>\n<style>\n\n  span { color:#008; }\n  span.sogreen { color:green; font-weight: bolder; }\n  \n</style>\n</head>\n<body>\n<div>\n    <span>John,</span>\n    <span>Karl,</span>\n    <span>Brandon</span>\n  </div>\n  <div>\n    <span>Glen,</span>\n    <span>Tane,</span>\n    <span>Ralph</span>\n  </div>\n</body>\n</html>"}]}, "lastchild52": {"id": 52, "searchname": "lastchild", "name": "lastChild", "type": "selector", "category": "Selectors", "subcategory": "Child Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":last-child", "desc": "Matches all elements that are the last child of their parent.", "longdesc": "<p>While <a href='Selectors/last'>:last</a> matches only a single element, this matches more then one: One for each parent.</p>", "params": [], "examples": [{"code": "\n    $(\"div span:last-child\")\n        .css({color:\"red\", fontSize:\"80%\"})\n        .hover(function () {\n              $(this).addClass(\"solast\");\n            }, function () {\n              $(this).removeClass(\"solast\");\n            });\n", "htmlCode": "\n    $(\"div span:last-child\")\n        .css({color:\"red\", fontSize:\"80%\"})\n        .hover(function () {\n              $(this).addClass(\"solast\");\n            }, function () {\n              $(this).removeClass(\"solast\");\n            });\n", "desc": "Finds the last span in each matched div and adds some css plus a hover state.", "css": "\n  span.solast { text-decoration:line-through; }\n  ", "inhead": "", "html": "<div>\n    <span>John,</span>\n    <span>Karl,</span>\n    <span>Brandon,</span>\n    <span>Sam</span>\n  </div>\n  <div>\n    <span>Glen,</span>\n    <span>Tane,</span>\n    <span>Ralph,</span>\n    <span>David</span>\n  </div>", "exampleId": "52iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div span:last-child\")\n        .css({color:\"red\", fontSize:\"80%\"})\n        .hover(function () {\n              $(this).addClass(\"solast\");\n            }, function () {\n              $(this).removeClass(\"solast\");\n            });\n\n  });\n</script>\n<style>\n\n  span.solast { text-decoration:line-through; }\n  \n</style>\n</head>\n<body>\n<div>\n    <span>John,</span>\n    <span>Karl,</span>\n    <span>Brandon,</span>\n    <span>Sam</span>\n  </div>\n  <div>\n    <span>Glen,</span>\n    <span>Tane,</span>\n    <span>Ralph,</span>\n    <span>David</span>\n  </div>\n</body>\n</html>"}]}, "onlychild53": {"id": 53, "searchname": "onlychild", "name": "onlyChild", "type": "selector", "category": "Selectors", "subcategory": "Child Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":only-child", "desc": "Matches all elements that are the only child of their parent.", "longdesc": "<p>If the parent has other child elements, nothing is matched.</p>", "params": [], "examples": [{"code": "$(\"div button:only-child\").text(\"Alone\").css(\"border\", \"2px blue solid\");", "htmlCode": "$(\"div button:only-child\").text(\"Alone\").css(\"border\", \"2px blue solid\");", "desc": "Finds the button with no siblings in each matched div and modifies look.", "css": "\n  div { width:100px; height:80px; margin:5px; float:left; background:#b9e }\n  ", "inhead": "", "html": "<div>\n    <button>Sibling!</button>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    None\n  </div>\n  <div>  \n    <button>Sibling!</button>\n    <button>Sibling!</button>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    <button>Sibling!</button>\n  </div>", "exampleId": "53iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div button:only-child\").text(\"Alone\").css(\"border\", \"2px blue solid\");\n  });\n</script>\n<style>\n\n  div { width:100px; height:80px; margin:5px; float:left; background:#b9e }\n  \n</style>\n</head>\n<body>\n<div>\n    <button>Sibling!</button>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    None\n  </div>\n  <div>  \n    <button>Sibling!</button>\n    <button>Sibling!</button>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    <button>Sibling!</button>\n  </div>\n</body>\n</html>"}]}, "input54": {"id": 54, "searchname": "input", "name": "input", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":input", "desc": "Matches all input, textarea, select and button elements.", "longdesc": "", "params": [], "examples": [{"code": "\n    var allInputs = $(\":input\");\n    var formChildren = $(\"form > *\");\n    $(\"div\").text(\"Found \" + allInputs.length + \" inputs and the form has \" +\n                             formChildren.length + \" children.\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var allInputs = $(\":input\");\n    var formChildren = $(\"form &gt; *\");\n    $(\"div\").text(\"Found \" + allInputs.length + \" inputs and the form has \" +\n                             formChildren.length + \" children.\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all input elements.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option</option></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "54iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var allInputs = $(\":input\");\n    var formChildren = $(\"form > *\");\n    $(\"div\").text(\"Found \" + allInputs.length + \" inputs and the form has \" +\n                             formChildren.length + \" children.\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option</option></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "text55": {"id": 55, "searchname": "text", "name": "text", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":text", "desc": "Matches all input elements of type text.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":text\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":text\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all text inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "55iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":text\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "password56": {"id": 56, "searchname": "password", "name": "password", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":password", "desc": "Matches all input elements of type password.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":password\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":password\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all password inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "56iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":password\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "radio57": {"id": 57, "searchname": "radio", "name": "radio", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":radio", "desc": "Matches all input elements of type radio.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":radio\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":radio\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all radio inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" name=\"asdf\" />\n    <input type=\"radio\" name=\"asdf\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "57iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":radio\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" name=\"asdf\" />\n    <input type=\"radio\" name=\"asdf\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "checkbox58": {"id": 58, "searchname": "checkbox", "name": "checkbox", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":checkbox", "desc": "Matches all input elements of type checkbox.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":checkbox\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":checkbox\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all checkbox inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "58iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":checkbox\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "submit59": {"id": 59, "searchname": "submit", "name": "submit", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":submit", "desc": "Matches all input elements of type submit.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":submit\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":submit\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all submit inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "59iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":submit\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "image60": {"id": 60, "searchname": "image", "name": "image", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":image", "desc": "Matches all input elements of type image.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":image\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":image\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all image inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "60iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":image\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "reset61": {"id": 61, "searchname": "reset", "name": "reset", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":reset", "desc": "Matches all input elements of type reset.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":reset\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":reset\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all reset inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "61iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":reset\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "button62": {"id": 62, "searchname": "button", "name": "button", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":button", "desc": "Matches all button elements and input elements of type button.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":button\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":button\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all button inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "62iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":button\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "file63": {"id": 63, "searchname": "file", "name": "file", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":file", "desc": "Matches all input elements of type file.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":file\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":file\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all file inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "63iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":file\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "hidden64": {"id": 64, "searchname": "hidden", "name": "hidden", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":hidden", "desc": "Matches all elements that are hidden, or input elements of type \"hidden\".", "longdesc": "", "params": [], "examples": [{"code": "\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n", "htmlCode": "\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n", "desc": "Shows all hidden divs and counts hidden inputs.", "css": "\n  div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }\n  span { display:block; clear:left; color:red; }\n  .starthidden { display:none; }\n  ", "inhead": "", "html": "<span></span>\n  <div></div>\n  <div style=\"display:none;\">Hider!</div>\n  <div></div>\n  <div class=\"starthidden\">Hider!</div>\n  <div></div>\n  <form>\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n  </form>\n  <span>\n  </span>", "exampleId": "64iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n\n  });\n</script>\n<style>\n\n  div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }\n  span { display:block; clear:left; color:red; }\n  .starthidden { display:none; }\n  \n</style>\n</head>\n<body>\n<span></span>\n  <div></div>\n  <div style=\"display:none;\">Hider!</div>\n  <div></div>\n  <div class=\"starthidden\">Hider!</div>\n  <div></div>\n  <form>\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n  </form>\n  <span>\n  </span>\n</body>\n</html>"}]}, "enabled65": {"id": 65, "searchname": "enabled", "name": "enabled", "type": "selector", "category": "Selectors", "subcategory": "Form Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":enabled", "desc": "Matches all elements that are enabled.", "longdesc": "", "params": [], "examples": [{"code": "$(\"input:enabled\").val(\"this is it\");", "htmlCode": "$(\"input:enabled\").val(\"this is it\");", "desc": "Finds all input elements that are enabled.", "css": "", "inhead": "", "html": "<form>\n    <input name=\"email\" disabled=\"disabled\" />\n    <input name=\"id\" />\n  </form>", "exampleId": "65iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input:enabled\").val(\"this is it\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<form>\n    <input name=\"email\" disabled=\"disabled\" />\n    <input name=\"id\" />\n  </form>\n</body>\n</html>"}]}, "disabled66": {"id": 66, "searchname": "disabled", "name": "disabled", "type": "selector", "category": "Selectors", "subcategory": "Form Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":disabled", "desc": "Matches all elements that are disabled.", "longdesc": "", "params": [], "examples": [{"code": "$(\"input:disabled\").val(\"this is it\");", "htmlCode": "$(\"input:disabled\").val(\"this is it\");", "desc": "Finds all input elements that are disabled.", "css": "", "inhead": "", "html": "<form>\n    <input name=\"email\" disabled=\"disabled\" />\n    <input name=\"id\" />\n  </form>", "exampleId": "66iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input:disabled\").val(\"this is it\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<form>\n    <input name=\"email\" disabled=\"disabled\" />\n    <input name=\"id\" />\n  </form>\n</body>\n</html>"}]}, "checked67": {"id": 67, "searchname": "checked", "name": "checked", "type": "selector", "category": "Selectors", "subcategory": "Form Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":checked", "desc": "Matches all elements that are checked.", "longdesc": "", "params": [], "examples": [{"code": "\n    function countChecked() {\n      var n = $(\"input:checked\").length;\n      $(\"div\").text(n + (n == 1 ? \" is\" : \" are\") + \" checked!\");\n    }\n    countChecked();\n    $(\":checkbox\").click(countChecked);\n", "htmlCode": "\n    function countChecked() {\n      var n = $(\"input:checked\").length;\n      $(\"div\").text(n + (n == 1 ? \" is\" : \" are\") + \" checked!\");\n    }\n    countChecked();\n    $(\":checkbox\").click(countChecked);\n", "desc": "Finds all input elements that are checked.", "css": "\n  div { color:red; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"checkbox\" name=\"newsletter\" checked=\"checked\" value=\"Hourly\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Daily\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Weekly\" />\n    <input type=\"checkbox\" name=\"newsletter\" checked=\"checked\" value=\"Monthly\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Yearly\" />\n  </form>\n  <div></div>", "exampleId": "67iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function countChecked() {\n      var n = $(\"input:checked\").length;\n      $(\"div\").text(n + (n == 1 ? \" is\" : \" are\") + \" checked!\");\n    }\n    countChecked();\n    $(\":checkbox\").click(countChecked);\n\n  });\n</script>\n<style>\n\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"checkbox\" name=\"newsletter\" checked=\"checked\" value=\"Hourly\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Daily\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Weekly\" />\n    <input type=\"checkbox\" name=\"newsletter\" checked=\"checked\" value=\"Monthly\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Yearly\" />\n  </form>\n  <div></div>\n</body>\n</html>"}]}, "selected68": {"id": 68, "searchname": "selected", "name": "selected", "type": "selector", "category": "Selectors", "subcategory": "Form Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":selected", "desc": "Matches all elements that are selected.", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .trigger('change');\n", "htmlCode": "\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .trigger('change');\n", "desc": "Attaches a change event to the select that gets the text for each selected option and writes them in the div.  It then triggers the event for the initial text draw.", "css": "\n  div { color:red; }\n  ", "inhead": "", "html": "<select name=\"garden\" multiple=\"multiple\">\n    <option>Flowers</option>\n    <option selected=\"selected\">Shrubs</option>\n    <option>Trees</option>\n    <option selected=\"selected\">Bushes</option>\n    <option>Grass</option>\n    <option>Dirt</option>\n  </select>\n  <div></div>", "exampleId": "68iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .trigger('change');\n\n  });\n</script>\n<style>\n\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<select name=\"garden\" multiple=\"multiple\">\n    <option>Flowers</option>\n    <option selected=\"selected\">Shrubs</option>\n    <option>Trees</option>\n    <option selected=\"selected\">Bushes</option>\n    <option>Grass</option>\n    <option>Dirt</option>\n  </select>\n  <div></div>\n</body>\n</html>"}]}, "attr69": {"id": 69, "searchname": "attr", "name": "attr", "type": "function", "category": "Attributes", "subcategory": "Attr", "return": "Object", "added": "", "sample": "", "desc": "Access a property on the first matched element. This method makes it easy to retrieve a property value from the first matched element. If the element does not have an attribute with such a name, undefined is returned.", "longdesc": "", "params": [{"optional": false, "name": "name", "type": "String", "desc": "The name of the property to access."}], "examples": [{"code": "\n    var title = $(\"em\").attr(\"title\");\n    $(\"div\").text(title);\n", "htmlCode": "\n    var title = $(\"em\").attr(\"title\");\n    $(\"div\").text(title);\n", "desc": "Finds the title attribute of the first &lt;em&gt; in the page.", "css": "\n  em { color:blue; font-weight;bold; }\n  div { color:red; }\n  ", "inhead": "", "html": "<p>\n    Once there was a <em title=\"huge, gigantic\">large</em> dinosaur...\n  </p>\n  The title of the emphasis is:<div></div>", "exampleId": "69iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var title = $(\"em\").attr(\"title\");\n    $(\"div\").text(title);\n\n  });\n</script>\n<style>\n\n  em { color:blue; font-weight;bold; }\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<p>\n    Once there was a <em title=\"huge, gigantic\">large</em> dinosaur...\n  </p>\n  The title of the emphasis is:<div></div>\n</body>\n</html>"}]}, "attr70": {"id": 70, "searchname": "attr", "name": "attr", "type": "function", "category": "Attributes", "subcategory": "Attr", "return": "jQuery", "added": "", "sample": "", "desc": "Set a key/value object as properties to all matched elements.", "longdesc": "<p>This serves as the best way to set a large number of properties on all matched elements. Note that you must use 'className' as key if you want to set the class-Attribute. Or use .addClass( class ) or .removeClass( class ). Keep in mind this recursively calls attr( key, value ) or attr ( key, fn ), so if one of the properties you are passing is a function, the function will be evaluated and not stored as the attribute itself.</p>", "params": [{"optional": false, "name": "properties", "type": "Map", "desc": "Key/value pairs to set as object properties."}], "examples": [{"code": "\n    $(\"img\").attr({ \n          src: \"/images/hat.gif\",\n          title: \"jQuery\",\n          alt: \"jQuery Logo\"\n        });\n    $(\"div\").text($(\"img\").attr(\"alt\"));\n", "htmlCode": "\n    $(\"img\").attr({ \n          src: \"/images/hat.gif\",\n          title: \"jQuery\",\n          alt: \"jQuery Logo\"\n        });\n    $(\"div\").text($(\"img\").attr(\"alt\"));\n", "desc": "Set some attributes for all &lt;img&gt;s in the page.", "css": "\n  img { padding:10px; }\n  div { color:red; font-size:24px; }\n  ", "inhead": "", "html": "<img />\n  <img />\n  <img />\n  <div></div>", "exampleId": "70iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"img\").attr({ \n          src: \"/images/hat.gif\",\n          title: \"jQuery\",\n          alt: \"jQuery Logo\"\n        });\n    $(\"div\").text($(\"img\").attr(\"alt\"));\n\n  });\n</script>\n<style>\n\n  img { padding:10px; }\n  div { color:red; font-size:24px; }\n  \n</style>\n</head>\n<body>\n<img />\n  <img />\n  <img />\n  <div></div>\n</body>\n</html>"}]}, "attr71": {"id": 71, "searchname": "attr", "name": "attr", "type": "function", "category": "Attributes", "subcategory": "Attr", "return": "jQuery", "added": "", "sample": "", "desc": "Set a single property to a value, on all matched elements.", "longdesc": "", "params": [{"optional": false, "name": "key", "type": "String", "desc": "The name of the property to set."}, {"optional": false, "name": "value", "type": "Object", "desc": "The value to set the property to."}], "examples": [{"code": "$(\"button:gt(1)\").attr(\"disabled\",\"disabled\");", "htmlCode": "$(\"button:gt(1)\").attr(\"disabled\",\"disabled\");", "desc": "Disables buttons greater than the 1st button.", "css": "\n  button { margin:10px; }\n  ", "inhead": "", "html": "<button>0th Button</button>\n  <button>1st Button</button>\n  <button>2nd Button</button>", "exampleId": "71iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"button:gt(1)\").attr(\"disabled\",\"disabled\");\n  });\n</script>\n<style>\n\n  button { margin:10px; }\n  \n</style>\n</head>\n<body>\n<button>0th Button</button>\n  <button>1st Button</button>\n  <button>2nd Button</button>\n</body>\n</html>"}]}, "attr72": {"id": 72, "searchname": "attr", "name": "attr", "type": "function", "category": "Attributes", "subcategory": "Attr", "return": "jQuery", "added": "", "sample": "", "desc": "Set a single property to a computed value, on all matched elements.", "longdesc": "<p>Instead of supplying a string value as described  <a href='#keyvalue'>above</a>, a function is provided that computes the value.</p>", "params": [{"optional": false, "name": "key", "type": "String", "desc": "The name of the property to set."}, {"optional": false, "name": "fn", "type": "Function", "desc": "A function returning the value to set. Scope: Current element, argument: Index of current element\n<pre>function callback(indexArray) {\n  // indexArray == position in the jQuery object\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"div\").attr(\"id\", function (arr) {\n          return \"div-id\" + arr;\n        })\n        .each(function () {\n          $(\"span\", this).html(\"(ID = '<b>\" + this.id + \"</b>')\");\n        });\n", "htmlCode": "\n    $(\"div\").attr(\"id\", function (arr) {\n          return \"div-id\" + arr;\n        })\n        .each(function () {\n          $(\"span\", this).html(\"(ID = '&lt;b&gt;\" + this.id + \"&lt;/b&gt;')\");\n        });\n", "desc": "Sets id for divs based on the position in the page.", "css": "\n  div { color:blue; }\n  span { color:red; }\n  b { font-weight:bolder; }\n  ", "inhead": "", "html": "<div>Zero-th <span></span></div>\n  <div>First <span></span></div>\n  <div>Second <span></span></div>", "exampleId": "72iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").attr(\"id\", function (arr) {\n          return \"div-id\" + arr;\n        })\n        .each(function () {\n          $(\"span\", this).html(\"(ID = '<b>\" + this.id + \"</b>')\");\n        });\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  span { color:red; }\n  b { font-weight:bolder; }\n  \n</style>\n</head>\n<body>\n<div>Zero-th <span></span></div>\n  <div>First <span></span></div>\n  <div>Second <span></span></div>\n</body>\n</html>"}, {"code": "\n    $(\"img\").attr(\"src\", function() { \n          return \"/images/\" + this.title; \n        });\n", "htmlCode": "\n    $(\"img\").attr(\"src\", function() { \n          return \"/images/\" + this.title; \n        });\n", "desc": "Sets src attribute from title attribute on the image.", "css": "", "inhead": "", "html": "<img title=\"hat.gif\"/>\n  <img title=\"hat-old.gif\"/>\n  <img title=\"hat2-old.gif\"/>", "exampleId": "72iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"img\").attr(\"src\", function() { \n          return \"/images/\" + this.title; \n        });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<img title=\"hat.gif\"/>\n  <img title=\"hat-old.gif\"/>\n  <img title=\"hat2-old.gif\"/>\n</body>\n</html>"}]}, "removeattr73": {"id": 73, "searchname": "removeattr", "name": "removeAttr", "type": "function", "category": "Attributes", "subcategory": "Attr", "return": "jQuery", "added": "", "sample": "", "desc": "Remove an attribute from each of the matched elements.", "longdesc": "", "params": [{"optional": false, "name": "name", "type": "String", "desc": "The name of the property to remove."}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(this).next().removeAttr(\"disabled\")\n             .focus()\n             .val(\"editable now\");\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(this).next().removeAttr(\"disabled\")\n             .focus()\n             .val(\"editable now\");\n    });\n", "desc": "Clicking the button enables the input next to it.", "css": "", "inhead": "", "html": "<button>Enable</button>\n  <input type=\"text\" disabled=\"disabled\" value=\"can't edit this\" />", "exampleId": "73iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(this).next().removeAttr(\"disabled\")\n             .focus()\n             .val(\"editable now\");\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<button>Enable</button>\n  <input type=\"text\" disabled=\"disabled\" value=\"can't edit this\" />\n</body>\n</html>"}]}, "addclass74": {"id": 74, "searchname": "addclass", "name": "addClass", "type": "function", "category": "Attributes", "subcategory": "Class", "return": "jQuery", "added": "", "sample": "", "desc": "Adds the specified class(es) to each of the set of matched elements.", "longdesc": "", "params": [{"optional": false, "name": "class", "type": "String", "desc": "One or more CSS classes to add to the elements, these are separated by spaces."}], "examples": [{"code": "$(\"p:last\").addClass(\"selected\");", "htmlCode": "$(\"p:last\").addClass(\"selected\");", "desc": "Adds the class 'selected' to the matched elements.", "css": "\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>and</p>\n  <p>Goodbye</p>", "exampleId": "74iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p:last\").addClass(\"selected\");\n  });\n</script>\n<style>\n\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>and</p>\n  <p>Goodbye</p>\n</body>\n</html>"}, {"code": "$(\"p:last\").addClass(\"selected highlight\");", "htmlCode": "$(\"p:last\").addClass(\"selected highlight\");", "desc": "Adds the classes 'selected' and 'highlight' to the matched elements.", "css": "\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>and</p>\n  <p>Goodbye</p>", "exampleId": "74iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p:last\").addClass(\"selected highlight\");\n  });\n</script>\n<style>\n\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>and</p>\n  <p>Goodbye</p>\n</body>\n</html>"}]}, "hasclass75": {"id": 75, "searchname": "hasclass", "name": "hasClass", "type": "function", "category": "Attributes", "subcategory": "Class", "return": "Boolean", "added": "", "sample": "", "desc": "Returns true if the specified class is present on at least one of the set of matched elements.", "longdesc": "", "params": [{"optional": false, "name": "class", "type": "String", "desc": "One CSS class name to be checked for."}], "examples": [{"code": "$(\"div#result1\").append($(\"p:first\").hasClass(\"selected\").toString());\n$(\"div#result2\").append($(\"p:last\").hasClass(\"selected\").toString());\n$(\"div#result3\").append($(\"p\").hasClass(\"selected\").toString());", "htmlCode": "$(\"div#result1\").append($(\"p:first\").hasClass(\"selected\").toString());\n$(\"div#result2\").append($(\"p:last\").hasClass(\"selected\").toString());\n$(\"div#result3\").append($(\"p\").hasClass(\"selected\").toString());", "desc": "Looks for the class 'selected' on the matched elements.", "css": "\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p class=\"selected\">Goodbye</p>\n  <div id=\"result1\">First paragraph has selected class: </div>\n  <div id=\"result2\">Last paragraph has selected class: </div>\n  <div id=\"result3\">Some paragraph has selected class: </div>", "exampleId": "75iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div#result1\").append($(\"p:first\").hasClass(\"selected\").toString());\n$(\"div#result2\").append($(\"p:last\").hasClass(\"selected\").toString());\n$(\"div#result3\").append($(\"p\").hasClass(\"selected\").toString());\n  });\n</script>\n<style>\n\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p class=\"selected\">Goodbye</p>\n  <div id=\"result1\">First paragraph has selected class: </div>\n  <div id=\"result2\">Last paragraph has selected class: </div>\n  <div id=\"result3\">Some paragraph has selected class: </div>\n</body>\n</html>"}]}, "removeclass76": {"id": 76, "searchname": "removeclass", "name": "removeClass", "type": "function", "category": "Attributes", "subcategory": "Class", "return": "jQuery", "added": "", "sample": "", "desc": "Removes all or the specified class(es) from the set of matched elements.", "longdesc": "", "params": [{"optional": true, "name": "class", "type": "String", "desc": "One or more CSS classes to remove from the elements, these are separated by spaces."}], "examples": [{"code": "$(\"p:even\").removeClass(\"blue\");", "htmlCode": "$(\"p:even\").removeClass(\"blue\");", "desc": "Remove the class 'blue' from the matched elements.", "css": "\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>", "exampleId": "76iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p:even\").removeClass(\"blue\");\n  });\n</script>\n<style>\n\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>\n</body>\n</html>"}, {"code": "$(\"p:odd\").removeClass(\"blue under\");", "htmlCode": "$(\"p:odd\").removeClass(\"blue under\");", "desc": "Remove the class 'blue' and 'under' from the matched elements.", "css": "\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>", "exampleId": "76iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p:odd\").removeClass(\"blue under\");\n  });\n</script>\n<style>\n\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>\n</body>\n</html>"}, {"code": "$(\"p:eq(1)\").removeClass();", "htmlCode": "$(\"p:eq(1)\").removeClass();", "desc": "Remove all the classes from the matched elements.", "css": "\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>", "exampleId": "76iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p:eq(1)\").removeClass();\n  });\n</script>\n<style>\n\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>\n</body>\n</html>"}]}, "toggleclass77": {"id": 77, "searchname": "toggleclass", "name": "toggleClass", "type": "function", "category": "Attributes", "subcategory": "Class", "return": "jQuery", "added": "", "sample": "", "desc": "Adds the specified class if it is not present, removes the specified class if it is present.", "longdesc": "", "params": [{"optional": false, "name": "class", "type": "String", "desc": "A CSS class to toggle on the elements."}], "examples": [{"code": "\n    $(\"p\").click(function () {\n      $(this).toggleClass(\"highlight\");\n    });\n", "htmlCode": "\n    $(\"p\").click(function () {\n      $(this).toggleClass(\"highlight\");\n    });\n", "desc": "Toggle the class 'highlight' when a paragraph is clicked.", "css": "\n  p { margin: 4px; font-size:16px; font-weight:bolder; \n      cursor:pointer; }\n  .blue { color:blue; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p class=\"blue\">Click to toggle</p>\n  <p class=\"blue highlight\">highlight</p>\n  <p class=\"blue\">on these</p>\n  <p class=\"blue\">paragraphs</p>", "exampleId": "77iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () {\n      $(this).toggleClass(\"highlight\");\n    });\n\n  });\n</script>\n<style>\n\n  p { margin: 4px; font-size:16px; font-weight:bolder; \n      cursor:pointer; }\n  .blue { color:blue; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p class=\"blue\">Click to toggle</p>\n  <p class=\"blue highlight\">highlight</p>\n  <p class=\"blue\">on these</p>\n  <p class=\"blue\">paragraphs</p>\n</body>\n</html>"}]}, "html78": {"id": 78, "searchname": "html", "name": "html", "type": "function", "category": "Attributes", "subcategory": "HTML", "return": "String", "added": "", "sample": "", "desc": "Get the html contents (innerHTML) of the first matched element. This property is not available on XML documents (although it will work for XHTML documents).", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n", "htmlCode": "\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n", "desc": "Click a paragraph to convert it from html to text.", "css": "\n  p { margin:8px; font-size:20px; color:blue; \n      cursor:pointer; }\n  b { text-decoration:underline; }\n  button { cursor:pointer; }\n  ", "inhead": "", "html": "<p>\n    <b>Click</b> to change the <span id=\"tag\">html</span>\n  </p>\n  <p>\n    to a <span id=\"text\">text</span> node.\n  </p>\n  <p>\n    This <button name=\"nada\">button</button> does nothing.\n  </p>", "exampleId": "78iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n\n  });\n</script>\n<style>\n\n  p { margin:8px; font-size:20px; color:blue; \n      cursor:pointer; }\n  b { text-decoration:underline; }\n  button { cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<p>\n    <b>Click</b> to change the <span id=\"tag\">html</span>\n  </p>\n  <p>\n    to a <span id=\"text\">text</span> node.\n  </p>\n  <p>\n    This <button name=\"nada\">button</button> does nothing.\n  </p>\n</body>\n</html>"}]}, "html79": {"id": 79, "searchname": "html", "name": "html", "type": "function", "category": "Attributes", "subcategory": "HTML", "return": "jQuery", "added": "", "sample": "", "desc": "Set the html contents of every matched element. This property is not available on XML documents (although it will work for XHTML documents).", "longdesc": "", "params": [{"optional": false, "name": "val", "type": "String", "desc": "Set the html contents to the specified value."}], "examples": [{"code": "$(\"div\").html(\"<span class='red'>Hello <b>Again</b></span>\");", "htmlCode": "$(\"div\").html(\"&lt;span class='red'&gt;Hello &lt;b&gt;Again&lt;/b&gt;&lt;/span&gt;\");", "desc": "Add some html to each div.", "css": "\n  .red { color:red; }\n  ", "inhead": "", "html": "<span>Hello</span>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "79iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div\").html(\"<span class='red'>Hello <b>Again</b></span>\");\n  });\n</script>\n<style>\n\n  .red { color:red; }\n  \n</style>\n</head>\n<body>\n<span>Hello</span>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    $(\"div\").html(\"<b>Wow!</b> Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n", "htmlCode": "\n    $(\"div\").html(\"&lt;b&gt;Wow!&lt;/b&gt; Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n", "desc": "Add some html to each div then immediately do further manipulations to the inserted html.", "css": "\n  div { color:blue; font-size:18px; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>", "exampleId": "79iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").html(\"<b>Wow!</b> Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n\n  });\n</script>\n<style>\n\n  div { color:blue; font-size:18px; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "text80": {"id": 80, "searchname": "text", "name": "text", "type": "function", "category": "Attributes", "subcategory": "Text", "return": "String", "added": "", "sample": "", "desc": "Get the combined text contents of all matched elements.", "longdesc": "<p>The result is a string that contains the combined text contents of all matched elements. This method works on both HTML and XML documents.</p>", "params": [], "examples": [{"code": "\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n", "htmlCode": "\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n", "desc": "Find the text in the first paragraph (stripping out the html), then set the html of the last paragraph to show it is just text (the red bold is gone).", "css": "\n  p { color:blue; margin:8px; }\n  b { color:red; }\n  ", "inhead": "", "html": "<p><b>Test</b> Paragraph.</p>\n  <p></p>", "exampleId": "80iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n\n  });\n</script>\n<style>\n\n  p { color:blue; margin:8px; }\n  b { color:red; }\n  \n</style>\n</head>\n<body>\n<p><b>Test</b> Paragraph.</p>\n  <p></p>\n</body>\n</html>"}]}, "text81": {"id": 81, "searchname": "text", "name": "text", "type": "function", "category": "Attributes", "subcategory": "Text", "return": "jQuery", "added": "", "sample": "", "desc": "Set the text contents of all matched elements.", "longdesc": "<p>Similar to html(), but escapes HTML (replace \"<\" and \">\" with their HTML entities).</p>", "params": [{"optional": false, "name": "val", "type": "String", "desc": "The text value to set the contents of the element to."}], "examples": [{"code": "$(\"p\").text(\"<b>Some</b> new text.\");", "htmlCode": "$(\"p\").text(\"&lt;b&gt;Some&lt;/b&gt; new text.\");", "desc": "Add text to the paragraph (notice the bold tag is escaped).", "css": "\n  p { color:blue; margin:8px; }\n  ", "inhead": "", "html": "<p>Test Paragraph.</p>", "exampleId": "81iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").text(\"<b>Some</b> new text.\");\n  });\n</script>\n<style>\n\n  p { color:blue; margin:8px; }\n  \n</style>\n</head>\n<body>\n<p>Test Paragraph.</p>\n</body>\n</html>"}]}, "val82": {"id": 82, "searchname": "val", "name": "val", "type": "function", "category": "Attributes", "subcategory": "Value", "return": "String, Array", "added": "1.0", "sample": "", "desc": "Get the content of the value attribute of the first matched element.", "longdesc": "<p>In jQuery 1.2, a value is now returned for all elements, including selects. For multiple selects an array of values is returned.</p><p>For older versions of jQuery use the <a href=\"http://www.malsup.com/jquery/form/#fields\">http://www.malsup.com/jquery/form/#fields</a>.</p><p>For selects and checkboxes, see the <a href='Selectors/selected'>:selected</a> and <a href='Selectors/checked'>:checked</a> selectors.</p>", "params": [], "examples": [{"code": "\n    function displayVals() {\n      var singleValues = $(\"#single\").val();\n      var multipleValues = $(\"#multiple\").val() || [];\n      $(\"p\").html(\"<b>Single:</b> \" + \n                  singleValues +\n                  \" <b>Multiple:</b> \" + \n                  multipleValues.join(\", \"));\n    }\n\n    $(\"select\").change(displayVals);\n    displayVals();\n", "htmlCode": "\n    function displayVals() {\n      var singleValues = $(\"#single\").val();\n      var multipleValues = $(\"#multiple\").val() || [];\n      $(\"p\").html(\"&lt;b&gt;Single:&lt;/b&gt; \" + \n                  singleValues +\n                  \" &lt;b&gt;Multiple:&lt;/b&gt; \" + \n                  multipleValues.join(\", \"));\n    }\n\n    $(\"select\").change(displayVals);\n    displayVals();\n", "desc": "Get the single value from a single select and an array of values from a multiple select and display their values.", "css": "\n  p { color:red; margin:4px; }\n  b { color:blue; }\n  ", "inhead": "", "html": "<p></p>\n  <select id=\"single\">\n    <option>Single</option>\n    <option>Single2</option>\n  </select>\n  <select id=\"multiple\" multiple=\"multiple\">\n    <option selected=\"selected\">Multiple</option>\n    <option>Multiple2</option>\n    <option selected=\"selected\">Multiple3</option>\n  </select>", "exampleId": "82iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function displayVals() {\n      var singleValues = $(\"#single\").val();\n      var multipleValues = $(\"#multiple\").val() || [];\n      $(\"p\").html(\"<b>Single:</b> \" + \n                  singleValues +\n                  \" <b>Multiple:</b> \" + \n                  multipleValues.join(\", \"));\n    }\n\n    $(\"select\").change(displayVals);\n    displayVals();\n\n  });\n</script>\n<style>\n\n  p { color:red; margin:4px; }\n  b { color:blue; }\n  \n</style>\n</head>\n<body>\n<p></p>\n  <select id=\"single\">\n    <option>Single</option>\n    <option>Single2</option>\n  </select>\n  <select id=\"multiple\" multiple=\"multiple\">\n    <option selected=\"selected\">Multiple</option>\n    <option>Multiple2</option>\n    <option selected=\"selected\">Multiple3</option>\n  </select>\n</body>\n</html>"}, {"code": "\n    $(\"input\").keyup(function () {\n      var value = $(this).val();\n      $(\"p\").text(value);\n    }).keyup();\n", "htmlCode": "\n    $(\"input\").keyup(function () {\n      var value = $(this).val();\n      $(\"p\").text(value);\n    }).keyup();\n", "desc": "Find the value of an input box.", "css": "\n  p { color:blue; margin:8px; }\n  ", "inhead": "", "html": "<input type=\"text\" value=\"some text\"/>\n  <p></p>", "exampleId": "82iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"input\").keyup(function () {\n      var value = $(this).val();\n      $(\"p\").text(value);\n    }).keyup();\n\n  });\n</script>\n<style>\n\n  p { color:blue; margin:8px; }\n  \n</style>\n</head>\n<body>\n<input type=\"text\" value=\"some text\"/>\n  <p></p>\n</body>\n</html>"}]}, "val83": {"id": 83, "searchname": "val", "name": "val", "type": "function", "category": "Attributes", "subcategory": "Value", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Set the value attribute of every matched element.", "longdesc": "<p>In jQuery 1.2, this is also able to set the value of select elements, but selecting the appropriate options.</p>", "params": [{"optional": false, "name": "val", "type": "String", "desc": "The value to set on the matched element."}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      var text = $(this).text();\n      $(\"input\").val(text);\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      var text = $(this).text();\n      $(\"input\").val(text);\n    });\n", "desc": "Set the value of an input box.", "css": "\n  button { margin:4px; cursor:pointer; }\n  input { margin:4px; color:blue; }\n  ", "inhead": "", "html": "<div>\n    <button>Feed</button>\n    <button>the</button>\n    <button>Input</button>\n  </div>\n  <input type=\"text\" value=\"click a button\" />", "exampleId": "83iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      var text = $(this).text();\n      $(\"input\").val(text);\n    });\n\n  });\n</script>\n<style>\n\n  button { margin:4px; cursor:pointer; }\n  input { margin:4px; color:blue; }\n  \n</style>\n</head>\n<body>\n<div>\n    <button>Feed</button>\n    <button>the</button>\n    <button>Input</button>\n  </div>\n  <input type=\"text\" value=\"click a button\" />\n</body>\n</html>"}]}, "val84": {"id": 84, "searchname": "val", "name": "val", "type": "function", "category": "Attributes", "subcategory": "Value", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Checks, or selects, all the radio buttons, checkboxes, and select options that match the set of values.", "longdesc": "", "params": [{"optional": false, "name": "val", "type": "Array&lt;String&gt;", "desc": "The set of values to check/select."}], "examples": [{"code": "\n    $(\"#single\").val(\"Single2\");\n    $(\"#multiple\").val([\"Multiple2\", \"Multiple3\"]);\n    $(\"input\").val([\"check1\",\"check2\", \"radio1\" ]);\n", "htmlCode": "\n    $(\"#single\").val(\"Single2\");\n    $(\"#multiple\").val([\"Multiple2\", \"Multiple3\"]);\n    $(\"input\").val([\"check1\",\"check2\", \"radio1\" ]);\n", "desc": "Set a single select and a multiple select .", "css": "\n  body { color:blue; }\n  ", "inhead": "", "html": "<select id=\"single\">\n    <option>Single</option>\n    <option>Single2</option>\n  </select>\n  <select id=\"multiple\" multiple=\"multiple\">\n    <option selected=\"selected\">Multiple</option>\n    <option>Multiple2</option>\n    <option selected=\"selected\">Multiple3</option>\n  </select><br/>\n  <input type=\"checkbox\" name=\"checkboxname\" value=\"check1\"/> check1\n  <input type=\"checkbox\" name=\"checkboxname\" value=\"check2\"/> check2\n  <input type=\"radio\"  name=\"r\" value=\"radio1\"/> radio1\n  <input type=\"radio\"  name=\"r\" value=\"radio2\"/> radio2", "exampleId": "84iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#single\").val(\"Single2\");\n    $(\"#multiple\").val([\"Multiple2\", \"Multiple3\"]);\n    $(\"input\").val([\"check1\",\"check2\", \"radio1\" ]);\n\n  });\n</script>\n<style>\n\n  body { color:blue; }\n  \n</style>\n</head>\n<body>\n<select id=\"single\">\n    <option>Single</option>\n    <option>Single2</option>\n  </select>\n  <select id=\"multiple\" multiple=\"multiple\">\n    <option selected=\"selected\">Multiple</option>\n    <option>Multiple2</option>\n    <option selected=\"selected\">Multiple3</option>\n  </select><br/>\n  <input type=\"checkbox\" name=\"checkboxname\" value=\"check1\"/> check1\n  <input type=\"checkbox\" name=\"checkboxname\" value=\"check2\"/> check2\n  <input type=\"radio\"  name=\"r\" value=\"radio1\"/> radio1\n  <input type=\"radio\"  name=\"r\" value=\"radio2\"/> radio2\n</body>\n</html>"}]}, "eq85": {"id": 85, "searchname": "eq", "name": "eq", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.1.2", "sample": "", "desc": "Reduce the set of matched elements to a single element. ", "longdesc": "<p>The position of the element in the set of matched elements starts at 0 and goes to length - 1.</p>", "params": [{"optional": false, "name": "index", "type": "Integer", "desc": "The index of the element in the jQuery object."}], "examples": [{"code": "\n    $(\"div\").eq(2).addClass(\"blue\");\n", "htmlCode": "\n    $(\"div\").eq(2).addClass(\"blue\");\n", "desc": "Turn the div with index 2 blue by adding an appropriate class.", "css": "\n  div { width:60px; height:60px; margin:10px; float:left;\n        border:2px solid blue; }\n  .blue { background:blue; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "85iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").eq(2).addClass(\"blue\");\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:10px; float:left;\n        border:2px solid blue; }\n  .blue { background:blue; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "hasclass86": {"id": 86, "searchname": "hasclass", "name": "hasClass", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "Boolean", "added": "1.2", "sample": "", "desc": "Checks the current selection against a class and returns true, if at least one element of the selection has the given class.", "longdesc": "<p>This is an alternative to is(\".\" + class).</p>", "params": [{"optional": false, "name": "class", "type": "String", "desc": "The class to match."}], "examples": [{"code": "\n    $(\"div\").click(function(){\n      if ( $(this).hasClass(\"protected\") )\n        $(this).animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: 0 }, 75);\n    });\n", "htmlCode": "\n    $(\"div\").click(function(){\n      if ( $(this).hasClass(\"protected\") )\n        $(this).animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: 0 }, 75);\n    });\n", "desc": "Check to see if an element has a specific class, and if so, perform an action.", "css": "\n  div { width: 80px; height: 80px; background: #abc; \n        position: relative; border: 2px solid black; \n        margin: 20px 0px; float: left; left:0 }\n  div.protected { border-color: red; }\n  span { display:block; float:left; width:20px; \n         height:20px; }\n  ", "inhead": "", "html": "<span></span><div class=\"protected\"></div>\n  <span></span><div></div>\n  <span></span><div></div>\n  <span></span><div class=\"protected\"></div>", "exampleId": "86iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").click(function(){\n      if ( $(this).hasClass(\"protected\") )\n        $(this).animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: 0 }, 75);\n    });\n\n  });\n</script>\n<style>\n\n  div { width: 80px; height: 80px; background: #abc; \n        position: relative; border: 2px solid black; \n        margin: 20px 0px; float: left; left:0 }\n  div.protected { border-color: red; }\n  span { display:block; float:left; width:20px; \n         height:20px; }\n  \n</style>\n</head>\n<body>\n<span></span><div class=\"protected\"></div>\n  <span></span><div></div>\n  <span></span><div></div>\n  <span></span><div class=\"protected\"></div>\n</body>\n</html>"}]}, "filter87": {"id": 87, "searchname": "filter", "name": "filter", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Removes all elements from the set of matched elements that do not match the specified expression(s). ", "longdesc": "<p>This method is used to narrow down the results of a search.</p><p>Provide a comma-separated list of expressions to apply multiple filters at once.</p>", "params": [{"optional": false, "name": "expr", "type": "Expression", "desc": "An expression to pass into the filter"}], "examples": [{"code": "\n    $(\"div\").css(\"background\", \"#c8ebcc\")\n            .filter(\".middle\")\n            .css(\"border-color\", \"red\");\n", "htmlCode": "\n    $(\"div\").css(\"background\", \"#c8ebcc\")\n            .filter(\".middle\")\n            .css(\"border-color\", \"red\");\n", "desc": "Change the color of all divs then put a border around only some of them.", "css": "\n  div { width:60px; height:60px; margin:5px; float:left; \n        border:2px white solid;}\n  ", "inhead": "", "html": "<div></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div></div>", "exampleId": "87iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").css(\"background\", \"#c8ebcc\")\n            .filter(\".middle\")\n            .css(\"border-color\", \"red\");\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:5px; float:left; \n        border:2px white solid;}\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div></div>\n</body>\n</html>"}, {"code": "$(\"p\").filter(\".selected\")", "htmlCode": "$(\"p\").filter(\".selected\")", "desc": "Selects all paragraphs and removes those without a class \"selected\".", "css": "", "inhead": "", "html": "", "exampleId": "87iframeExample1", "runCode": ""}, {"code": "$(\"p\").filter(\".selected, :first\")", "htmlCode": "$(\"p\").filter(\".selected, :first\")", "desc": "Selects all paragraphs and removes those that aren't of class \"selected\" or the first one.", "css": "", "inhead": "", "html": "", "exampleId": "87iframeExample2", "runCode": ""}]}, "filter88": {"id": 88, "searchname": "filter", "name": "filter", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Removes all elements from the set of matched elements that does not match the specified function. ", "longdesc": "<p>The function is called with a context equal to the current element (just like <a href='Core/each'>$.each</a>). If the function returns false, then the element is removed - anything else and the element is kept.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to pass into the filter\n<pre>function callback(indexInJQueryObject) {\n  var keepItBoolean = true;\n\n  this; // dom element\n\n  return keepItBoolean;\n}\n</pre>"}], "examples": [{"code": "\n    $(\"div\").css(\"background\", \"#b4b0da\")\n            .filter(function (index) {\n                  return index == 1 || $(this).attr(\"id\") == \"fourth\";\n                })\n            .css(\"border\", \"3px double red\");\n", "htmlCode": "\n    $(\"div\").css(\"background\", \"#b4b0da\")\n            .filter(function (index) {\n                  return index == 1 || $(this).attr(\"id\") == \"fourth\";\n                })\n            .css(\"border\", \"3px double red\");\n", "desc": "Change the color of all divs then put a border two specific ones.", "css": "\n  div { width:60px; height:60px; margin:5px; float:left; \n        border:3px white solid; }\n  ", "inhead": "", "html": "<div id=\"first\"></div>\n  <div id=\"second\"></div>\n  <div id=\"third\"></div>\n  <div id=\"fourth\"></div>\n  <div id=\"fifth\"></div>\n  <div id=\"sixth\"></div>", "exampleId": "88iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").css(\"background\", \"#b4b0da\")\n            .filter(function (index) {\n                  return index == 1 || $(this).attr(\"id\") == \"fourth\";\n                })\n            .css(\"border\", \"3px double red\");\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:5px; float:left; \n        border:3px white solid; }\n  \n</style>\n</head>\n<body>\n<div id=\"first\"></div>\n  <div id=\"second\"></div>\n  <div id=\"third\"></div>\n  <div id=\"fourth\"></div>\n  <div id=\"fifth\"></div>\n  <div id=\"sixth\"></div>\n</body>\n</html>"}, {"code": " $(\"p\").filter(function(index) {\n   return $(\"ol\", this).length == 0;\n });", "htmlCode": " $(\"p\").filter(function(index) {\n   return $(\"ol\", this).length == 0;\n });", "desc": "Remove all elements that have a descendant ol element", "css": "", "inhead": "", "html": "", "exampleId": "88iframeExample1", "runCode": ""}]}, "is89": {"id": 89, "searchname": "is", "name": "is", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "Boolean", "added": "1.0", "sample": "", "desc": "Checks the current selection against an expression and returns true, if at least one element of the selection fits the given expression.", "longdesc": "<p>If no element fits, or the expression is not valid, then the response will be 'false'. Note that only simple expressions are supported. Complex expressions, such as those containing hierarchy selectors (such as +, ~, and >) will always return 'true'.</p><p><a href='Traversing/filter'>filter</a> is used internally, therefore all rules that apply there apply here, as well. </p>", "params": [{"optional": false, "name": "expr", "type": "String", "desc": "The expression with which to filter"}], "examples": [{"code": "\n    $(\"div\").one('click', function () {\n      if ($(this).is(\":first-child\")) {\n        $(\"p\").text(\"It's the first div.\");\n      } else if ($(this).is(\".blue,.red\")) {\n        $(\"p\").text(\"It's a blue or red div.\");\n      } else if ($(this).is(\":contains('Peter')\")) {\n        $(\"p\").text(\"It's Peter!\");\n      } else {\n        $(\"p\").html(\"It's nothing <em>special</em>.\");\n      }\n      $(\"p\").hide().slideDown(\"slow\");\n      $(this).css({\"border-style\": \"inset\", cursor:\"default\"});\n    });\n", "htmlCode": "\n    $(\"div\").one('click', function () {\n      if ($(this).is(\":first-child\")) {\n        $(\"p\").text(\"It's the first div.\");\n      } else if ($(this).is(\".blue,.red\")) {\n        $(\"p\").text(\"It's a blue or red div.\");\n      } else if ($(this).is(\":contains('Peter')\")) {\n        $(\"p\").text(\"It's Peter!\");\n      } else {\n        $(\"p\").html(\"It's nothing &lt;em&gt;special&lt;/em&gt;.\");\n      }\n      $(\"p\").hide().slideDown(\"slow\");\n      $(this).css({\"border-style\": \"inset\", cursor:\"default\"});\n    });\n", "desc": "Shows a few ways is() can be used inside an event handler.", "css": "\n  div { width:60px; height:60px; margin:5px; float:left;\n        border:4px outset; background:green; text-align:center; \n        font-weight:bolder; cursor:pointer; }\n  .blue { background:blue; }\n  .red { background:red; }\n  span { color:white; font-size:16px; }\n  p { color:red; font-weight:bolder; background:yellow; \n      margin:3px; clear:left; display:none; }\n  ", "inhead": "", "html": "<div></div>\n  <div class=\"blue\"></div>\n  <div></div>\n  <div class=\"red\"></div>\n  <div><br/><span>Peter</span></div>\n  <div class=\"blue\"></div>\n  <p>&nbsp;</p>", "exampleId": "89iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").one('click', function () {\n      if ($(this).is(\":first-child\")) {\n        $(\"p\").text(\"It's the first div.\");\n      } else if ($(this).is(\".blue,.red\")) {\n        $(\"p\").text(\"It's a blue or red div.\");\n      } else if ($(this).is(\":contains('Peter')\")) {\n        $(\"p\").text(\"It's Peter!\");\n      } else {\n        $(\"p\").html(\"It's nothing <em>special</em>.\");\n      }\n      $(\"p\").hide().slideDown(\"slow\");\n      $(this).css({\"border-style\": \"inset\", cursor:\"default\"});\n    });\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:5px; float:left;\n        border:4px outset; background:green; text-align:center; \n        font-weight:bolder; cursor:pointer; }\n  .blue { background:blue; }\n  .red { background:red; }\n  span { color:white; font-size:16px; }\n  p { color:red; font-weight:bolder; background:yellow; \n      margin:3px; clear:left; display:none; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div class=\"blue\"></div>\n  <div></div>\n  <div class=\"red\"></div>\n  <div><br/><span>Peter</span></div>\n  <div class=\"blue\"></div>\n  <p>&nbsp;</p>\n</body>\n</html>"}, {"code": "\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n", "htmlCode": "\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n", "desc": "Returns true, because the parent of the input is a form element", "css": "div { color:red; }", "inhead": "", "html": "<form><input type=\"checkbox\" /></form>\n  <div></div>", "exampleId": "89iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n\n  });\n</script>\n<style>\ndiv { color:red; }\n</style>\n</head>\n<body>\n<form><input type=\"checkbox\" /></form>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n", "htmlCode": "\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n", "desc": "Returns false, because the parent of the input is a p element", "css": "div { color:red; }", "inhead": "", "html": "<form><p><input type=\"checkbox\" /></p></form>\n  <div></div>", "exampleId": "89iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n\n  });\n</script>\n<style>\ndiv { color:red; }\n</style>\n</head>\n<body>\n<form><p><input type=\"checkbox\" /></p></form>\n  <div></div>\n</body>\n</html>"}]}, "map90": {"id": 90, "searchname": "map", "name": "map", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Translate a set of elements in the jQuery object into another set of values in an array (which may, or may not, be elements).", "longdesc": "<p>You could use this to build lists of values, attributes, css values - or even perform special, custom, selector transformations.</p><p>This is provided as a convenience method for using <a href='Utilities/jQuery.map'>$.map()</a>.</p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute on each element in the set.\n<pre>function callback(index, domElement) {\n  var replacement;\n\n  this; // also dom element\n\n  // replacement == null : delete spot\n  // replacement == array : insert the elements of the array\n  // else replace the spot with replacement\n  return replacement;\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").append( $(\"input\").map(function(){\n      return $(this).val();\n    }).get().join(\", \") );\n", "htmlCode": "\n    $(\"p\").append( $(\"input\").map(function(){\n      return $(this).val();\n    }).get().join(\", \") );\n", "desc": "Build a list of all the values within a form.", "css": "\n  p { color:red; }\n  ", "inhead": "", "html": "<p><b>Values: </b></p>\n  <form>\n    <input type=\"text\" name=\"name\" value=\"John\"/>\n    <input type=\"text\" name=\"password\" value=\"password\"/>\n    <input type=\"text\" name=\"url\" value=\"http://ejohn.org/\"/>\n  </form>", "exampleId": "90iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").append( $(\"input\").map(function(){\n      return $(this).val();\n    }).get().join(\", \") );\n\n  });\n</script>\n<style>\n\n  p { color:red; }\n  \n</style>\n</head>\n<body>\n<p><b>Values: </b></p>\n  <form>\n    <input type=\"text\" name=\"name\" value=\"John\"/>\n    <input type=\"text\" name=\"password\" value=\"password\"/>\n    <input type=\"text\" name=\"url\" value=\"http://ejohn.org/\"/>\n  </form>\n</body>\n</html>"}, {"code": "\n    var mappedItems = $(\"li\").map(function (index) {\n      var replacement = $(\"<li>\").text($(this).text()).get(0);\n      if (index == 0) {\n        // make the first item all caps\n        $(replacement).text($(replacement).text().toUpperCase());\n      } else if (index == 1 || index == 3) {\n        // delete the second and fourth items\n        replacement = null;\n      } else if (index == 2) {\n        // make two of the third item and add some text\n        replacement = [replacement,$(\"<li>\").get(0)];\n        $(replacement[0]).append(\"<b> - A</b>\");\n        $(replacement[1]).append(\"Extra <b> - B</b>\");\n      }\n\n      // replacment will be an dom element, null, \n      // or an array of dom elements\n      return replacement;\n    });\n    $(\"#results\").append(mappedItems);\n", "htmlCode": "\n    var mappedItems = $(\"li\").map(function (index) {\n      var replacement = $(\"&lt;li&gt;\").text($(this).text()).get(0);\n      if (index == 0) {\n        // make the first item all caps\n        $(replacement).text($(replacement).text().toUpperCase());\n      } else if (index == 1 || index == 3) {\n        // delete the second and fourth items\n        replacement = null;\n      } else if (index == 2) {\n        // make two of the third item and add some text\n        replacement = [replacement,$(\"&lt;li&gt;\").get(0)];\n        $(replacement[0]).append(\"&lt;b&gt; - A&lt;/b&gt;\");\n        $(replacement[1]).append(\"Extra &lt;b&gt; - B&lt;/b&gt;\");\n      }\n\n      // replacment will be an dom element, null, \n      // or an array of dom elements\n      return replacement;\n    });\n    $(\"#results\").append(mappedItems);\n", "desc": "A contrived example to show some functionality.", "css": "\n  body { font-size:16px; }\n  ul { float:left; margin:0 30px; color:blue; }\n  #results { color:red; }\n  ", "inhead": "", "html": "<ul>\n    <li>First</li>\n    <li>Second</li>\n    <li>Third</li>\n    <li>Fourth</li>\n    <li>Fifth</li>\n  </ul>\n  <ul id=\"results\">\n  </ul>", "exampleId": "90iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var mappedItems = $(\"li\").map(function (index) {\n      var replacement = $(\"<li>\").text($(this).text()).get(0);\n      if (index == 0) {\n        // make the first item all caps\n        $(replacement).text($(replacement).text().toUpperCase());\n      } else if (index == 1 || index == 3) {\n        // delete the second and fourth items\n        replacement = null;\n      } else if (index == 2) {\n        // make two of the third item and add some text\n        replacement = [replacement,$(\"<li>\").get(0)];\n        $(replacement[0]).append(\"<b> - A</b>\");\n        $(replacement[1]).append(\"Extra <b> - B</b>\");\n      }\n\n      // replacment will be an dom element, null, \n      // or an array of dom elements\n      return replacement;\n    });\n    $(\"#results\").append(mappedItems);\n\n  });\n</script>\n<style>\n\n  body { font-size:16px; }\n  ul { float:left; margin:0 30px; color:blue; }\n  #results { color:red; }\n  \n</style>\n</head>\n<body>\n<ul>\n    <li>First</li>\n    <li>Second</li>\n    <li>Third</li>\n    <li>Fourth</li>\n    <li>Fifth</li>\n  </ul>\n  <ul id=\"results\">\n  </ul>\n</body>\n</html>"}]}, "not91": {"id": 91, "searchname": "not", "name": "not", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Removes elements matching the specified expression from the set of matched elements.", "longdesc": "", "params": [{"optional": false, "name": "expr", "type": "String, DOMElement, Array&lt;DOMElement&gt;", "desc": "An expression with which to remove matching elements, an element to remove from the set or a set of elements to remove from the jQuery set of matched elements."}], "examples": [{"code": "\n    $(\"div\").not(\".green, #blueone\")\n            .css(\"border-color\", \"red\");\n", "htmlCode": "\n    $(\"div\").not(\".green, #blueone\")\n            .css(\"border-color\", \"red\");\n", "desc": "Adds a border to divs that are not green or blue.", "css": "\n  div { width:60px; height:60px; margin:10px; float:left;\n        background:yellow; border:2px solid white; }\n  .green { background:#8f8; }\n  .gray { background:#ccc; }\n  #blueone { background:#99f; }\n  ", "inhead": "", "html": "<div></div>\n  <div id=\"blueone\"></div>\n  <div></div>\n  <div class=\"green\"></div>\n  <div class=\"green\"></div>\n  <div class=\"gray\"></div>\n  <div></div>", "exampleId": "91iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").not(\".green, #blueone\")\n            .css(\"border-color\", \"red\");\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:10px; float:left;\n        background:yellow; border:2px solid white; }\n  .green { background:#8f8; }\n  .gray { background:#ccc; }\n  #blueone { background:#99f; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div id=\"blueone\"></div>\n  <div></div>\n  <div class=\"green\"></div>\n  <div class=\"green\"></div>\n  <div class=\"gray\"></div>\n  <div></div>\n</body>\n</html>"}, {"code": "$(\"p\").not( $(\"#selected\")[0] )", "htmlCode": "$(\"p\").not( $(\"#selected\")[0] )", "desc": "Removes the element with the ID \"selected\" from the set of all paragraphs.", "css": "", "inhead": "", "html": "", "exampleId": "91iframeExample1", "runCode": ""}, {"code": "$(\"p\").not(\"#selected\")", "htmlCode": "$(\"p\").not(\"#selected\")", "desc": "Removes the element with the ID \"selected\" from the set of all paragraphs.", "css": "", "inhead": "", "html": "", "exampleId": "91iframeExample2", "runCode": ""}, {"code": "$(\"p\").not($(\"div p.selected\"))", "htmlCode": "$(\"p\").not($(\"div p.selected\"))", "desc": "Removes all elements that match \"div p.selected\" from the total set of all paragraphs.", "css": "", "inhead": "", "html": "", "exampleId": "91iframeExample3", "runCode": ""}]}, "slice92": {"id": 92, "searchname": "slice", "name": "slice", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.1.4", "sample": "", "desc": "Selects a subset of the matched elements.", "longdesc": "<p>Behaves exactly like the built-in Array slice method. </p>", "params": [{"optional": false, "name": "start", "type": "Integer", "desc": "Where to start the subset. The first element is at zero. Can be negative to start from the end of the selection."}, {"optional": true, "name": "end", "type": "Integer", "desc": "Where to end the subset. If unspecified, ends at the end of the selection."}], "examples": [{"code": "\n    function colorEm() {\n      var $div = $(\"div\");\n      var start = Math.floor(Math.random() *\n                             $div.length);\n      var end = Math.floor(Math.random() *\n                           ($div.length - start)) +\n                           start + 1;\n      if (end == $div.length) end = undefined;\n      $div.css(\"background\", \"\");\n      if (end) \n        $div.slice(start, end).css(\"background\", \"yellow\");   \n       else\n        $div.slice(start).css(\"background\", \"yellow\");\n      \n      $(\"span\").text('$(\"div\").slice(' + start +\n                     (end ? ', ' + end : '') +\n                     ').css(\"background\", \"yellow\");');\n    }\n\n    $(\"button\").click(colorEm);\n", "htmlCode": "\n    function colorEm() {\n      var $div = $(\"div\");\n      var start = Math.floor(Math.random() *\n                             $div.length);\n      var end = Math.floor(Math.random() *\n                           ($div.length - start)) +\n                           start + 1;\n      if (end == $div.length) end = undefined;\n      $div.css(\"background\", \"\");\n      if (end) \n        $div.slice(start, end).css(\"background\", \"yellow\");   \n       else\n        $div.slice(start).css(\"background\", \"yellow\");\n      \n      $(\"span\").text('$(\"div\").slice(' + start +\n                     (end ? ', ' + end : '') +\n                     ').css(\"background\", \"yellow\");');\n    }\n\n    $(\"button\").click(colorEm);\n", "desc": "Turns divs yellow based on a random slice.", "css": "\n  div { width:40px; height:40px; margin:10px; float:left;\n        border:2px solid blue; }\n  span { color:red; font-weight:bold; }\n  button { margin:5px; }\n  ", "inhead": "", "html": "<button>Turn slice yellow</button>\n  <span>Click the button!</span>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "92iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function colorEm() {\n      var $div = $(\"div\");\n      var start = Math.floor(Math.random() *\n                             $div.length);\n      var end = Math.floor(Math.random() *\n                           ($div.length - start)) +\n                           start + 1;\n      if (end == $div.length) end = undefined;\n      $div.css(\"background\", \"\");\n      if (end) \n        $div.slice(start, end).css(\"background\", \"yellow\");   \n       else\n        $div.slice(start).css(\"background\", \"yellow\");\n      \n      $(\"span\").text('$(\"div\").slice(' + start +\n                     (end ? ', ' + end : '') +\n                     ').css(\"background\", \"yellow\");');\n    }\n\n    $(\"button\").click(colorEm);\n\n  });\n</script>\n<style>\n\n  div { width:40px; height:40px; margin:10px; float:left;\n        border:2px solid blue; }\n  span { color:red; font-weight:bold; }\n  button { margin:5px; }\n  \n</style>\n</head>\n<body>\n<button>Turn slice yellow</button>\n  <span>Click the button!</span>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "$(\"p\").slice(0, 1).wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").slice(0, 1).wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs, then slices the selection to include only the first element.", "css": "", "inhead": "", "html": "", "exampleId": "92iframeExample1", "runCode": ""}, {"code": "$(\"p\").slice(0, 2).wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").slice(0, 2).wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs, then slices the selection to include only the first and second element.", "css": "", "inhead": "", "html": "", "exampleId": "92iframeExample2", "runCode": ""}, {"code": "$(\"p\").slice(1, 2).wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").slice(1, 2).wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs, then slices the selection to include only the second element.", "css": "", "inhead": "", "html": "", "exampleId": "92iframeExample3", "runCode": ""}, {"code": "$(\"p\").slice(1).wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").slice(1).wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs, then slices the selection to include only the second and third element.", "css": "", "inhead": "", "html": "", "exampleId": "92iframeExample4", "runCode": ""}, {"code": "$(\"p\").slice(-1).wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").slice(-1).wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs, then slices the selection to include only the third element.", "css": "", "inhead": "", "html": "", "exampleId": "92iframeExample5", "runCode": ""}]}, "add93": {"id": 93, "searchname": "add", "name": "add", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Adds more elements, matched by the given expression, to the set of matched elements.", "longdesc": "", "params": [{"optional": false, "name": "expr", "type": "String, DOMElement, Array&lt;DOMElement&gt;", "desc": "An expression whose matched elements are added for String, a string of HTML to create on the fly for DOMElement or one or more Elements to add if an Array."}], "examples": [{"code": "\n    $(\"div\").css(\"border\", \"2px solid red\")\n            .add(\"p\")\n            .css(\"background\", \"yellow\");\n", "htmlCode": "\n    $(\"div\").css(\"border\", \"2px solid red\")\n            .add(\"p\")\n            .css(\"background\", \"yellow\");\n", "desc": "Finds all divs and makes a border.  Then adds all paragraphs to the jQuery object to set their backgrounds yellow.", "css": "\n  div { width:60px; height:60px; margin:10px; float:left; }\n  p { clear:left; font-weight:bold; font-size:16px; \n      color:blue; margin:0 10px; padding:2px; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <p>Added this... (notice no border)</p>", "exampleId": "93iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").css(\"border\", \"2px solid red\")\n            .add(\"p\")\n            .css(\"background\", \"yellow\");\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:10px; float:left; }\n  p { clear:left; font-weight:bold; font-size:16px; \n      color:blue; margin:0 10px; padding:2px; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <p>Added this... (notice no border)</p>\n</body>\n</html>"}, {"code": "$(\"p\").add(\"span\").css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").add(\"span\").css(\"background\", \"yellow\");", "desc": "Adds more elements, matched by the given expression, to the set of matched elements.", "css": "", "inhead": "", "html": "<p>Hello</p><span>Hello Again</span>", "exampleId": "93iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").add(\"span\").css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p><span>Hello Again</span>\n</body>\n</html>"}, {"code": "$(\"p\").clone().add(\"&lt;span>Again&lt;/span>\").appendTo(document.body);", "htmlCode": "$(\"p\").clone().add(\"&lt;span&gt;Again&lt;/span&gt;\").appendTo(document.body);", "desc": "Adds more elements, created on the fly, to the set of matched elements.", "css": "", "inhead": "", "html": "<p>Hello</p>", "exampleId": "93iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").clone().add(\"&lt;span>Again&lt;/span>\").appendTo(document.body);\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p>\n</body>\n</html>"}, {"code": "$(\"p\").add(document.getElementById(\"a\")).css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").add(document.getElementById(\"a\")).css(\"background\", \"yellow\");", "desc": "Adds one or more Elements to the set of matched elements.", "css": "", "inhead": "", "html": "<p>Hello</p><span id=\"a\">Hello Again</span>", "exampleId": "93iframeExample3", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").add(document.getElementById(\"a\")).css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p><span id=\"a\">Hello Again</span>\n</body>\n</html>"}]}, "children94": {"id": 94, "searchname": "children", "name": "children", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing all of the unique immediate children of each of the matched set of elements.", "longdesc": "<p>This set can be filtered with an optional expression that will cause only elements matching the selector to be collected. Also note: while parents() will look at all ancestors, children() will only consider immediate child elements.</p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the child Elements with."}], "examples": [{"code": "\n    $(\"#container\").click(function (e) {\n      $(\"*\").removeClass(\"hilite\");\n      var $kids = $(e.target).children();\n      var len = $kids.addClass(\"hilite\").length;\n\n      $(\"#results span:first\").text(len);\n      $(\"#results span:last\").text(e.target.tagName);\n\n      e.preventDefault();\n      return false;\n    });\n", "htmlCode": "\n    $(\"#container\").click(function (e) {\n      $(\"*\").removeClass(\"hilite\");\n      var $kids = $(e.target).children();\n      var len = $kids.addClass(\"hilite\").length;\n\n      $(\"#results span:first\").text(len);\n      $(\"#results span:last\").text(e.target.tagName);\n\n      e.preventDefault();\n      return false;\n    });\n", "desc": "Find all children of the clicked element.", "css": "\n  body { font-size:16px; font-weight:bolder; }\n  div { width:130px; height:82px; margin:10px; float:left;\n        border:1px solid blue; padding:4px; }\n  #container { width:auto; height:105px; margin:0; float:none;\n        border:none; }\n  .hilite { border-color:red; }\n  #results { display:block; color:red; }\n  p { margin:10px; border:1px solid transparent; }\n  span { color:blue; border:1px solid transparent; }\n  input { width:100px; }\n  em { border:1px solid transparent; }\n  a { border:1px solid transparent; }\n  b { border:1px solid transparent; }\n  button { border:1px solid transparent; }\n  ", "inhead": "", "html": "<div id=\"container\">\n    <div>\n      <p>This <span>is the <em>way</em> we</span> \n      write <em>the</em> demo,</p>\n    </div>\n    <div>\n      <a href=\"#\"><b>w</b>rit<b>e</b></a> the <span>demo,</span> <button>write \n      the</button> demo,\n    </div>\n    <div>\n      This <span>the way we <em>write</em> the <em>demo</em> so</span>\n      <input type=\"text\" value=\"early\" /> in\n    </div>\n    <p>\n      <span>t</span>he <span>m</span>orning.\n      <span id=\"results\">Found <span>0</span> children in <span>TAG</span>.</span>\n    </p>\n  </div>", "exampleId": "94iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#container\").click(function (e) {\n      $(\"*\").removeClass(\"hilite\");\n      var $kids = $(e.target).children();\n      var len = $kids.addClass(\"hilite\").length;\n\n      $(\"#results span:first\").text(len);\n      $(\"#results span:last\").text(e.target.tagName);\n\n      e.preventDefault();\n      return false;\n    });\n\n  });\n</script>\n<style>\n\n  body { font-size:16px; font-weight:bolder; }\n  div { width:130px; height:82px; margin:10px; float:left;\n        border:1px solid blue; padding:4px; }\n  #container { width:auto; height:105px; margin:0; float:none;\n        border:none; }\n  .hilite { border-color:red; }\n  #results { display:block; color:red; }\n  p { margin:10px; border:1px solid transparent; }\n  span { color:blue; border:1px solid transparent; }\n  input { width:100px; }\n  em { border:1px solid transparent; }\n  a { border:1px solid transparent; }\n  b { border:1px solid transparent; }\n  button { border:1px solid transparent; }\n  \n</style>\n</head>\n<body>\n<div id=\"container\">\n    <div>\n      <p>This <span>is the <em>way</em> we</span> \n      write <em>the</em> demo,</p>\n    </div>\n    <div>\n      <a href=\"#\"><b>w</b>rit<b>e</b></a> the <span>demo,</span> <button>write \n      the</button> demo,\n    </div>\n    <div>\n      This <span>the way we <em>write</em> the <em>demo</em> so</span>\n      <input type=\"text\" value=\"early\" /> in\n    </div>\n    <p>\n      <span>t</span>he <span>m</span>orning.\n      <span id=\"results\">Found <span>0</span> children in <span>TAG</span>.</span>\n    </p>\n  </div>\n</body>\n</html>"}, {"code": "$(\"div\").children().css(\"border-bottom\", \"3px double red\");", "htmlCode": "$(\"div\").children().css(\"border-bottom\", \"3px double red\");", "desc": "Find all children of each div.", "css": "\n  body { font-size:16px; font-weight:bolder; }\n  span { color:blue; }\n  p { margin:5px 0; }\n  ", "inhead": "", "html": "<p>Hello (this is a paragraph)</p>\n  <div><span>Hello Again (this span is a child of the a div)</span></div>\n  <p>And <span>Again</span> (in another paragraph)</p>\n  <div>And One Last <span>Time</span> (most text directly in a div)</div>", "exampleId": "94iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div\").children().css(\"border-bottom\", \"3px double red\");\n  });\n</script>\n<style>\n\n  body { font-size:16px; font-weight:bolder; }\n  span { color:blue; }\n  p { margin:5px 0; }\n  \n</style>\n</head>\n<body>\n<p>Hello (this is a paragraph)</p>\n  <div><span>Hello Again (this span is a child of the a div)</span></div>\n  <p>And <span>Again</span> (in another paragraph)</p>\n  <div>And One Last <span>Time</span> (most text directly in a div)</div>\n</body>\n</html>"}, {"code": "$(\"div\").children(\".selected\").css(\"color\", \"blue\");", "htmlCode": "$(\"div\").children(\".selected\").css(\"color\", \"blue\");", "desc": "Find all children with a class \"selected\" of each div.", "css": "\n  body { font-size:16px; font-weight:bolder; }\n  p { margin:5px 0; }\n  ", "inhead": "", "html": "<div>\n    <span>Hello</span>\n    <p class=\"selected\">Hello Again</p>\n    <div class=\"selected\">And Again</div>\n    <p>And One Last Time</p>\n  </div>", "exampleId": "94iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div\").children(\".selected\").css(\"color\", \"blue\");\n  });\n</script>\n<style>\n\n  body { font-size:16px; font-weight:bolder; }\n  p { margin:5px 0; }\n  \n</style>\n</head>\n<body>\n<div>\n    <span>Hello</span>\n    <p class=\"selected\">Hello Again</p>\n    <div class=\"selected\">And Again</div>\n    <p>And One Last Time</p>\n  </div>\n</body>\n</html>"}]}, "contents95": {"id": 95, "searchname": "contents", "name": "contents", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Find all the child nodes inside the matched elements (including text nodes), or the content document, if the element is an iframe.", "longdesc": "", "params": [], "examples": [{"code": "$(\"p\").contents().not(\"[nodeType=1]\").wrap(\"<b/>\");", "htmlCode": "$(\"p\").contents().not(\"[nodeType=1]\").wrap(\"&lt;b/&gt;\");", "desc": "Find all the text nodes inside a paragraph and wrap them with a bold tag.", "css": "", "inhead": "", "html": "<p>Hello <a href=\"http://ejohn.org/\">John</a>, how are you doing?</p>", "exampleId": "95iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").contents().not(\"[nodeType=1]\").wrap(\"<b/>\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello <a href=\"http://ejohn.org/\">John</a>, how are you doing?</p>\n</body>\n</html>"}, {"code": "$(\"iframe\").contents().find(\"body\").append(\"I'm in an iframe!\");", "htmlCode": "$(\"iframe\").contents().find(\"body\").append(\"I'm in an iframe!\");", "desc": "Append some new content into an empty iframe.", "css": "", "inhead": "", "html": "<iframe src=\"/index-blank.html\" width=\"300\" height=\"100\"></iframe>", "exampleId": "95iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"iframe\").contents().find(\"body\").append(\"I'm in an iframe!\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<iframe src=\"/index-blank.html\" width=\"300\" height=\"100\"></iframe>\n</body>\n</html>"}]}, "find96": {"id": 96, "searchname": "find", "name": "find", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Searches for all elements that match the specified <a href='Selectors'>expression</a>. This method is a good way to find additional descendant elements with which to process.", "longdesc": "<p>All searching is done using a <a href='Selectors'>jQuery expression</a>. The expression can be written using CSS 1-3 Selector syntax. </p>", "params": [{"optional": false, "name": "expr", "type": "String", "desc": "An expression to search with."}], "examples": [{"code": "$(\"p\").find(\"span\").css('color','red');", "htmlCode": "$(\"p\").find(\"span\").css('color','red');", "desc": "Starts with all paragraphs and searches for descendant span elements, same as $(\"p span\")", "css": "", "inhead": "", "html": "<p><span>Hello</span>, how are you?</p>\n  <p>Me? I'm <span>good</span>.</p>", "exampleId": "96iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").find(\"span\").css('color','red');\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p><span>Hello</span>, how are you?</p>\n  <p>Me? I'm <span>good</span>.</p>\n</body>\n</html>"}, {"code": "\n    var newText = $(\"p\").text().split(\" \").join(\"</span> <span>\");\n    newText = \"<span>\" + newText + \"</span>\";\n\n    $(\"p\").html(newText)\n          .find(\"span\")\n            .hover(function () { $(this).addClass(\"hilite\"); },\n                   function () { $(this).removeClass(\"hilite\"); })\n          .end()\n          .find(\":contains('t')\")\n            .css({\"font-style\":\"italic\", \"font-weight\":\"bolder\"});\n", "htmlCode": "\n    var newText = $(\"p\").text().split(\" \").join(\"&lt;/span&gt; &lt;span&gt;\");\n    newText = \"&lt;span&gt;\" + newText + \"&lt;/span&gt;\";\n\n    $(\"p\").html(newText)\n          .find(\"span\")\n            .hover(function () { $(this).addClass(\"hilite\"); },\n                   function () { $(this).removeClass(\"hilite\"); })\n          .end()\n          .find(\":contains('t')\")\n            .css({\"font-style\":\"italic\", \"font-weight\":\"bolder\"});\n", "desc": "Add spans around each word then add a hover and italicize words with the letter <strong>t</strong>.", "css": "\n  p { font-size:20px; width:200px; cursor:default; \n      color:blue; font-weight:bold; margin:0 10px; }\n  .hilite { background:yellow; }\n  ", "inhead": "", "html": "<p>\n    When the day is short\n    find that which matters to you\n    or stop believing\n  </p>", "exampleId": "96iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var newText = $(\"p\").text().split(\" \").join(\"</span> <span>\");\n    newText = \"<span>\" + newText + \"</span>\";\n\n    $(\"p\").html(newText)\n          .find(\"span\")\n            .hover(function () { $(this).addClass(\"hilite\"); },\n                   function () { $(this).removeClass(\"hilite\"); })\n          .end()\n          .find(\":contains('t')\")\n            .css({\"font-style\":\"italic\", \"font-weight\":\"bolder\"});\n\n  });\n</script>\n<style>\n\n  p { font-size:20px; width:200px; cursor:default; \n      color:blue; font-weight:bold; margin:0 10px; }\n  .hilite { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>\n    When the day is short\n    find that which matters to you\n    or stop believing\n  </p>\n</body>\n</html>"}]}, "next97": {"id": 97, "searchname": "next", "name": "next", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing the unique next siblings of each of the given set of elements.", "longdesc": "<p>next only returns the very next sibling for each element, not all next siblings (see nextAll).</p><p>You may provide an optional expression to filter the returned set. </p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression with which to filter the returned set."}], "examples": [{"code": "$(\"button[disabled]\").next().text(\"this button is disabled\");", "htmlCode": "$(\"button[disabled]\").next().text(\"this button is disabled\");", "desc": "Find the very next sibling of each disabled button and change its text \"this button is disabled\".", "css": "\n  span { color:blue; font-weight:bold; }\n  button { width:100px; }\n  ", "inhead": "", "html": "<div><button disabled=\"disabled\">First</button> - <span></span></div>\n  <div><button>Second</button> - <span></span></div>\n  <div><button disabled=\"disabled\">Third</button> - <span></span></div>", "exampleId": "97iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"button[disabled]\").next().text(\"this button is disabled\");\n  });\n</script>\n<style>\n\n  span { color:blue; font-weight:bold; }\n  button { width:100px; }\n  \n</style>\n</head>\n<body>\n<div><button disabled=\"disabled\">First</button> - <span></span></div>\n  <div><button>Second</button> - <span></span></div>\n  <div><button disabled=\"disabled\">Third</button> - <span></span></div>\n</body>\n</html>"}, {"code": "$(\"p\").next(\".selected\").css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").next(\".selected\").css(\"background\", \"yellow\");", "desc": "Find the very next sibling of each paragraph that has a class \"selected\".", "css": "", "inhead": "", "html": "<p>Hello</p>\n  <p class=\"selected\">Hello Again</p>\n  <div><span>And Again</span></div>", "exampleId": "97iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").next(\".selected\").css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p class=\"selected\">Hello Again</p>\n  <div><span>And Again</span></div>\n</body>\n</html>"}]}, "nextall98": {"id": 98, "searchname": "nextall", "name": "nextAll", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Find all sibling elements after the current element.", "longdesc": "<p>Use an optional expression to filter the matched set. </p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the next Elements with."}], "examples": [{"code": "$(\"div:first\").nextAll().addClass(\"after\");", "htmlCode": "$(\"div:first\").nextAll().addClass(\"after\");", "desc": "Locate all the divs after the first and give them a class.", "css": "\n  div { width: 80px; height: 80px; background: #abc; \n        border: 2px solid black; margin: 10px; float: left; }\n  div.after { border-color: red; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "98iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div:first\").nextAll().addClass(\"after\");\n  });\n</script>\n<style>\n\n  div { width: 80px; height: 80px; background: #abc; \n        border: 2px solid black; margin: 10px; float: left; }\n  div.after { border-color: red; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    $(\":nth-child(1)\").nextAll(\"p\").addClass(\"after\");\n", "htmlCode": "\n    $(\":nth-child(1)\").nextAll(\"p\").addClass(\"after\");\n", "desc": "Locate all the paragraphs after the second child in the body and give them a class.", "css": "\n  div, p { width: 60px; height: 60px; background: #abc;\n           border: 2px solid black; margin: 10px; float: left; }\n  .after { border-color: red; }\n  ", "inhead": "", "html": "<p>p</p>\n  <div>div</div>\n  <p>p</p>\n  <p>p</p>\n  <div>div</div>\n  <p>p</p>\n  <div>div</div>", "exampleId": "98iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\":nth-child(1)\").nextAll(\"p\").addClass(\"after\");\n\n  });\n</script>\n<style>\n\n  div, p { width: 60px; height: 60px; background: #abc;\n           border: 2px solid black; margin: 10px; float: left; }\n  .after { border-color: red; }\n  \n</style>\n</head>\n<body>\n<p>p</p>\n  <div>div</div>\n  <p>p</p>\n  <p>p</p>\n  <div>div</div>\n  <p>p</p>\n  <div>div</div>\n</body>\n</html>"}]}, "parent99": {"id": 99, "searchname": "parent", "name": "parent", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing the unique parents of the matched set of elements.", "longdesc": "<p>You may use an optional expression to filter the set of parent elements that will match. </p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the parents with."}], "examples": [{"code": "\n    $(\"*\", document.body).each(function () {\n      var parentTag = $(this).parent().get(0).tagName;\n      $(this).prepend(document.createTextNode(parentTag + \" > \"));\n    });\n", "htmlCode": "\n    $(\"*\", document.body).each(function () {\n      var parentTag = $(this).parent().get(0).tagName;\n      $(this).prepend(document.createTextNode(parentTag + \" &gt; \"));\n    });\n", "desc": "Shows the parent of each element as (parent &gt; child).  Check the View Source to see the raw html.", "css": "\n  div,p { margin:10px; }\n  ", "inhead": "", "html": "<div>div, \n    <span>span, </span>\n    <b>b </b>\n  </div>\n  <p>p, \n    <span>span, \n      <em>em </em>\n    </span>\n  </p>\n  <div>div, \n    <strong>strong, \n      <span>span, </span>\n      <em>em, \n        <b>b, </b>\n      </em>\n    </strong>\n    <b>b </b>\n  </div>", "exampleId": "99iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"*\", document.body).each(function () {\n      var parentTag = $(this).parent().get(0).tagName;\n      $(this).prepend(document.createTextNode(parentTag + \" > \"));\n    });\n\n  });\n</script>\n<style>\n\n  div,p { margin:10px; }\n  \n</style>\n</head>\n<body>\n<div>div, \n    <span>span, </span>\n    <b>b </b>\n  </div>\n  <p>p, \n    <span>span, \n      <em>em </em>\n    </span>\n  </p>\n  <div>div, \n    <strong>strong, \n      <span>span, </span>\n      <em>em, \n        <b>b, </b>\n      </em>\n    </strong>\n    <b>b </b>\n  </div>\n</body>\n</html>"}, {"code": "$(\"p\").parent(\".selected\").css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").parent(\".selected\").css(\"background\", \"yellow\");", "desc": "Find the parent element of each paragraph with a class \"selected\".", "css": "", "inhead": "", "html": "<div><p>Hello</p></div>\n  <div class=\"selected\"><p>Hello Again</p></div>\n", "exampleId": "99iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").parent(\".selected\").css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div><p>Hello</p></div>\n  <div class=\"selected\"><p>Hello Again</p></div>\n\n</body>\n</html>"}]}, "parents100": {"id": 100, "searchname": "parents", "name": "parents", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing the unique ancestors of the matched set of elements (except for the root element).\n\nThe matched elements can be filtered with an optional expression. ", "longdesc": "", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the ancestors with"}], "examples": [{"code": "\n    var parentEls = $(\"b\").parents()\n                          .map(function () { \n                                return this.tagName; \n                              })\n                          .get().join(\", \");\n    $(\"b\").append(\"<strong>\" + parentEls + \"</strong>\");\n", "htmlCode": "\n    var parentEls = $(\"b\").parents()\n                          .map(function () { \n                                return this.tagName; \n                              })\n                          .get().join(\", \");\n    $(\"b\").append(\"&lt;strong&gt;\" + parentEls + \"&lt;/strong&gt;\");\n", "desc": "Find all parent elements of each span.", "css": "\n  b { color:blue; }\n  strong { color:red; }\n  ", "inhead": "", "html": "<div>\n    <p>\n      <span>\n        <b>My parents are: </b>\n      </span>\n    </p>\n  </div>", "exampleId": "100iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var parentEls = $(\"b\").parents()\n                          .map(function () { \n                                return this.tagName; \n                              })\n                          .get().join(\", \");\n    $(\"b\").append(\"<strong>\" + parentEls + \"</strong>\");\n\n  });\n</script>\n<style>\n\n  b { color:blue; }\n  strong { color:red; }\n  \n</style>\n</head>\n<body>\n<div>\n    <p>\n      <span>\n        <b>My parents are: </b>\n      </span>\n    </p>\n  </div>\n</body>\n</html>"}, {"code": "\n    function showParents() {\n      $(\"div\").css(\"border-color\", \"white\");\n      var len = $(\"span.selected\")\n                       .parents(\"div\")\n                       .css(\"border\", \"2px red solid\")\n                       .length;\n      $(\"b\").text(\"Unique div parents: \" + len);\n    }\n    $(\"span\").click(function () {\n      $(this).toggleClass(\"selected\");\n      showParents();\n    });\n", "htmlCode": "\n    function showParents() {\n      $(\"div\").css(\"border-color\", \"white\");\n      var len = $(\"span.selected\")\n                       .parents(\"div\")\n                       .css(\"border\", \"2px red solid\")\n                       .length;\n      $(\"b\").text(\"Unique div parents: \" + len);\n    }\n    $(\"span\").click(function () {\n      $(this).toggleClass(\"selected\");\n      showParents();\n    });\n", "desc": "Click to find all unique div parent elements of each span.", "css": "\n  p, div, span {margin:2px; padding:1px; }\n  div { border:2px white solid; }\n  span { cursor:pointer; font-size:12px; }\n  .selected { color:blue; }\n  b { color:red; display:block; font-size:14px; }\n  ", "inhead": "", "html": "<p>\n    <div>\n      <div><span>Hello</span></div>\n      <span>Hello Again</span>\n    </div>\n    <div>\n      <span>And Hello Again</span>\n    </div>\n  </p>\n  <b>Click Hellos to toggle their parents.</b>", "exampleId": "100iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function showParents() {\n      $(\"div\").css(\"border-color\", \"white\");\n      var len = $(\"span.selected\")\n                       .parents(\"div\")\n                       .css(\"border\", \"2px red solid\")\n                       .length;\n      $(\"b\").text(\"Unique div parents: \" + len);\n    }\n    $(\"span\").click(function () {\n      $(this).toggleClass(\"selected\");\n      showParents();\n    });\n\n  });\n</script>\n<style>\n\n  p, div, span {margin:2px; padding:1px; }\n  div { border:2px white solid; }\n  span { cursor:pointer; font-size:12px; }\n  .selected { color:blue; }\n  b { color:red; display:block; font-size:14px; }\n  \n</style>\n</head>\n<body>\n<p>\n    <div>\n      <div><span>Hello</span></div>\n      <span>Hello Again</span>\n    </div>\n    <div>\n      <span>And Hello Again</span>\n    </div>\n  </p>\n  <b>Click Hellos to toggle their parents.</b>\n</body>\n</html>"}]}, "prev101": {"id": 101, "searchname": "prev", "name": "prev", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing the unique previous siblings of each of the matched set of elements.", "longdesc": "<p>Use an optional expression to filter the matched set.</p><p>Only the immediately previous sibling is returned, not all previous siblings. </p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the previous Elements with."}], "examples": [{"code": "\n    var $curr = $(\"#start\");\n    $curr.css(\"background\", \"#f99\");\n    $(\"button\").click(function () {\n      $curr = $curr.prev();\n      $(\"div\").css(\"background\", \"\");\n      $curr.css(\"background\", \"#f99\");\n    });\n", "htmlCode": "\n    var $curr = $(\"#start\");\n    $curr.css(\"background\", \"#f99\");\n    $(\"button\").click(function () {\n      $curr = $curr.prev();\n      $(\"div\").css(\"background\", \"\");\n      $curr.css(\"background\", \"#f99\");\n    });\n", "desc": "Find the very previous sibling of each div.", "css": "\n  div { width:40px; height:40px; margin:10px;\n        float:left; border:2px blue solid; \n        padding:2px; }\n  span { font-size:14px; }\n  p { clear:left; margin:10px; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div><span>has child</span></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div id=\"start\"></div>\n  <div></div>\n  <p><button>Go to Prev</button></p>", "exampleId": "101iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var $curr = $(\"#start\");\n    $curr.css(\"background\", \"#f99\");\n    $(\"button\").click(function () {\n      $curr = $curr.prev();\n      $(\"div\").css(\"background\", \"\");\n      $curr.css(\"background\", \"#f99\");\n    });\n\n  });\n</script>\n<style>\n\n  div { width:40px; height:40px; margin:10px;\n        float:left; border:2px blue solid; \n        padding:2px; }\n  span { font-size:14px; }\n  p { clear:left; margin:10px; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div><span>has child</span></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div id=\"start\"></div>\n  <div></div>\n  <p><button>Go to Prev</button></p>\n</body>\n</html>"}, {"code": "$(\"p\").prev(\".selected\").css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").prev(\".selected\").css(\"background\", \"yellow\");", "desc": "Find the very previous sibling of each paragraph that has a class \"selected\".", "css": "", "inhead": "", "html": "<div><span>Hello</span></div>\n  <p class=\"selected\">Hello Again</p>\n  <p>And Again</p>", "exampleId": "101iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").prev(\".selected\").css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div><span>Hello</span></div>\n  <p class=\"selected\">Hello Again</p>\n  <p>And Again</p>\n</body>\n</html>"}]}, "prevall102": {"id": 102, "searchname": "prevall", "name": "prevAll", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Find all sibling elements before the current element.", "longdesc": "<p>Use an optional expression to filter the matched set. </p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the previous Elements with."}], "examples": [{"code": "$(\"div:last\").prevAll().addClass(\"before\");", "htmlCode": "$(\"div:last\").prevAll().addClass(\"before\");", "desc": "Locate all the divs before the last and give them a class.", "css": "\n  div { width:70px; height:70px; background:#abc; \n        border:2px solid black; margin:10px; float:left; }\n  div.before { border-color: red; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "102iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div:last\").prevAll().addClass(\"before\");\n  });\n</script>\n<style>\n\n  div { width:70px; height:70px; background:#abc; \n        border:2px solid black; margin:10px; float:left; }\n  div.before { border-color: red; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "siblings103": {"id": 103, "searchname": "siblings", "name": "siblings", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing all of the unique siblings of each of the matched set of elements.\n\nCan be filtered with an optional expressions. ", "longdesc": "", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the sibling Elements with"}], "examples": [{"code": "\n    var len = $(\".hilite\").siblings()\n                          .css(\"color\", \"red\")\n                          .length;\n    $(\"b\").text(len);\n", "htmlCode": "\n    var len = $(\".hilite\").siblings()\n                          .css(\"color\", \"red\")\n                          .length;\n    $(\"b\").text(len);\n", "desc": "Find the unique siblings of all yellow li elements in the 3 lists (including other yellow li elements if appropriate).", "css": "\n  ul { float:left; margin:5px; font-size:16px; font-weight:bold; }\n  p { color:blue; margin:10px 20px; font-size:16px; padding:5px; \n      font-weight:bolder; }\n  .hilite { background:yellow; }\n", "inhead": "", "html": "<ul>\n    <li>One</li>\n    <li>Two</li>\n    <li class=\"hilite\">Three</li>\n    <li>Four</li>\n  </ul>\n  <ul>\n    <li>Five</li>\n    <li>Six</li>\n    <li>Seven</li>\n  </ul>\n  <ul>\n    <li>Eight</li>\n    <li class=\"hilite\">Nine</li>\n    <li>Ten</li>\n    <li class=\"hilite\">Eleven</li>\n  </ul>\n  <p>Unique siblings: <b></b></p>", "exampleId": "103iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var len = $(\".hilite\").siblings()\n                          .css(\"color\", \"red\")\n                          .length;\n    $(\"b\").text(len);\n\n  });\n</script>\n<style>\n\n  ul { float:left; margin:5px; font-size:16px; font-weight:bold; }\n  p { color:blue; margin:10px 20px; font-size:16px; padding:5px; \n      font-weight:bolder; }\n  .hilite { background:yellow; }\n\n</style>\n</head>\n<body>\n<ul>\n    <li>One</li>\n    <li>Two</li>\n    <li class=\"hilite\">Three</li>\n    <li>Four</li>\n  </ul>\n  <ul>\n    <li>Five</li>\n    <li>Six</li>\n    <li>Seven</li>\n  </ul>\n  <ul>\n    <li>Eight</li>\n    <li class=\"hilite\">Nine</li>\n    <li>Ten</li>\n    <li class=\"hilite\">Eleven</li>\n  </ul>\n  <p>Unique siblings: <b></b></p>\n</body>\n</html>"}, {"code": "$(\"p\").siblings(\".selected\").css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").siblings(\".selected\").css(\"background\", \"yellow\");", "desc": "Find all siblings with a class \"selected\" of each div.", "css": "", "inhead": "", "html": "<div><span>Hello</span></div>\n  <p class=\"selected\">Hello Again</p>\n  <p>And Again</p>", "exampleId": "103iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").siblings(\".selected\").css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div><span>Hello</span></div>\n  <p class=\"selected\">Hello Again</p>\n  <p>And Again</p>\n</body>\n</html>"}]}, "andself104": {"id": 104, "searchname": "andself", "name": "andSelf", "type": "function", "category": "Traversing", "subcategory": "Chaining", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Add the previous selection to the current selection.", "longdesc": "<p>Useful for traversing elements, and then adding something that was matched before the last traversion.</p>", "params": [], "examples": [{"code": "\n    $(\"div\").find(\"p\").andSelf().addClass(\"border\");\n    $(\"div\").find(\"p\").addClass(\"background\");\n", "htmlCode": "\n    $(\"div\").find(\"p\").andSelf().addClass(\"border\");\n    $(\"div\").find(\"p\").addClass(\"background\");\n", "desc": "Find all divs, and all the paragraphs inside of them, and give them both classnames.  Notice the div doesn't have the yellow background color since it didn't use andSelf().", "css": "\n  p, div { margin:5px; padding:5px; }\n  .border { border: 2px solid red; }\n  .background { background:yellow; }\n  ", "inhead": "", "html": "<div>\n    <p>First Paragraph</p>\n    <p>Second Paragraph</p>\n  </div>", "exampleId": "104iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").find(\"p\").andSelf().addClass(\"border\");\n    $(\"div\").find(\"p\").addClass(\"background\");\n\n  });\n</script>\n<style>\n\n  p, div { margin:5px; padding:5px; }\n  .border { border: 2px solid red; }\n  .background { background:yellow; }\n  \n</style>\n</head>\n<body>\n<div>\n    <p>First Paragraph</p>\n    <p>Second Paragraph</p>\n  </div>\n</body>\n</html>"}]}, "end105": {"id": 105, "searchname": "end", "name": "end", "type": "function", "category": "Traversing", "subcategory": "Chaining", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Revert the most recent 'destructive' operation, changing the set of matched elements to its previous state (right before the destructive operation).", "longdesc": "<p>If there was no destructive operation before, an empty set is returned.</p><p>A 'destructive' operation is any operation that changes the set of matched jQuery elements, which means any Traversing function that returns a jQuery object - including <a href='Traversing/add'>add</a>, <a href='Traversing/andSelf'>andSelf</a>, <a href='Traversing/children'>children</a>, <a href='Traversing/filter'>filter</a>, <a href='Traversing/find'>find</a>, <a href='Traversing/map'>map</a>, <a href='Traversing/next'>next</a>, <a href='Traversing/nextAll'>nextAll</a>, <a href='Traversing/not'>not</a>, <a href='Traversing/parent'>parent</a>, <a href='Traversing/parents'>parents</a>, <a href='Traversing/prev'>prev</a>, <a href='Traversing/prevAll'>prevAll</a>, <a href='Traversing/siblings'>siblings</a> and <a href='Traversing/slice'>slice</a> - plus the <a href='Manipulation/clone'>clone</a> function (from Manipulation). </p>", "params": [], "examples": [{"code": "\n    jQuery.fn.showTags = function (n) {\n      var tags = this.map(function () { \n                              return this.tagName; \n                            })\n                        .get().join(\", \");\n      $(\"b:eq(\" + n + \")\").text(tags);\n      return this;\n    };\n\n    $(\"p\").showTags(0)\n          .find(\"span\")\n          .showTags(1)\n          .css(\"background\", \"yellow\")\n          .end()\n          .showTags(2)\n          .css(\"font-style\", \"italic\");\n", "htmlCode": "\n    jQuery.fn.showTags = function (n) {\n      var tags = this.map(function () { \n                              return this.tagName; \n                            })\n                        .get().join(\", \");\n      $(\"b:eq(\" + n + \")\").text(tags);\n      return this;\n    };\n\n    $(\"p\").showTags(0)\n          .find(\"span\")\n          .showTags(1)\n          .css(\"background\", \"yellow\")\n          .end()\n          .showTags(2)\n          .css(\"font-style\", \"italic\");\n", "desc": "Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs.", "css": "\n  p, div { margin:1px; padding:1px; font-weight:bold; \n           font-size:16px; }\n  div { color:blue; }\n  b { color:red; }\n  ", "inhead": "", "html": "<p>\n    Hi there <span>how</span> are you <span>doing</span>?\n  </p>\n  <p>\n    This <span>span</span> is one of \n    several <span>spans</span> in this\n    <span>sentence</span>.\n  </p>\n  <div>\n    Tags in jQuery object initially: <b></b>\n  </div>\n  <div>\n    Tags in jQuery object after find: <b></b>\n  </div>\n  <div>\n    Tags in jQuery object after end: <b></b>\n  </div>", "exampleId": "105iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    jQuery.fn.showTags = function (n) {\n      var tags = this.map(function () { \n                              return this.tagName; \n                            })\n                        .get().join(\", \");\n      $(\"b:eq(\" + n + \")\").text(tags);\n      return this;\n    };\n\n    $(\"p\").showTags(0)\n          .find(\"span\")\n          .showTags(1)\n          .css(\"background\", \"yellow\")\n          .end()\n          .showTags(2)\n          .css(\"font-style\", \"italic\");\n\n  });\n</script>\n<style>\n\n  p, div { margin:1px; padding:1px; font-weight:bold; \n           font-size:16px; }\n  div { color:blue; }\n  b { color:red; }\n  \n</style>\n</head>\n<body>\n<p>\n    Hi there <span>how</span> are you <span>doing</span>?\n  </p>\n  <p>\n    This <span>span</span> is one of \n    several <span>spans</span> in this\n    <span>sentence</span>.\n  </p>\n  <div>\n    Tags in jQuery object initially: <b></b>\n  </div>\n  <div>\n    Tags in jQuery object after find: <b></b>\n  </div>\n  <div>\n    Tags in jQuery object after end: <b></b>\n  </div>\n</body>\n</html>"}, {"code": "$(\"p\").find(\"span\").end().css(\"border\", \"2px red solid\");", "htmlCode": "$(\"p\").find(\"span\").end().css(\"border\", \"2px red solid\");", "desc": "Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs.", "css": "p { margin:10px; padding:10px; }", "inhead": "", "html": "<p><span>Hello</span>, how are you?</p>", "exampleId": "105iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").find(\"span\").end().css(\"border\", \"2px red solid\");\n  });\n</script>\n<style>\np { margin:10px; padding:10px; }\n</style>\n</head>\n<body>\n<p><span>Hello</span>, how are you?</p>\n</body>\n</html>"}]}, "html106": {"id": 106, "searchname": "html", "name": "html", "type": "function", "category": "Attributes", "subcategory": "Changing Contents", "return": "String", "added": "", "sample": "", "desc": "Get the html contents (innerHTML) of the first matched element. This property is not available on XML documents (although it will work for XHTML documents).", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n", "htmlCode": "\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n", "desc": "Click a paragraph to convert it from html to text.", "css": "\n  p { margin:8px; font-size:20px; color:blue; \n      cursor:pointer; }\n  b { text-decoration:underline; }\n  button { cursor:pointer; }\n  ", "inhead": "", "html": "<p>\n    <b>Click</b> to change the <span id=\"tag\">html</span>\n  </p>\n  <p>\n    to a <span id=\"text\">text</span> node.\n  </p>\n  <p>\n    This <button name=\"nada\">button</button> does nothing.\n  </p>", "exampleId": "106iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n\n  });\n</script>\n<style>\n\n  p { margin:8px; font-size:20px; color:blue; \n      cursor:pointer; }\n  b { text-decoration:underline; }\n  button { cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<p>\n    <b>Click</b> to change the <span id=\"tag\">html</span>\n  </p>\n  <p>\n    to a <span id=\"text\">text</span> node.\n  </p>\n  <p>\n    This <button name=\"nada\">button</button> does nothing.\n  </p>\n</body>\n</html>"}]}, "html107": {"id": 107, "searchname": "html", "name": "html", "type": "function", "category": "Attributes", "subcategory": "Changing Contents", "return": "jQuery", "added": "", "sample": "", "desc": "Set the html contents of every matched element. This property is not available on XML documents (although it will work for XHTML documents).", "longdesc": "", "params": [{"optional": false, "name": "val", "type": "String", "desc": "Set the html contents to the specified value."}], "examples": [{"code": "$(\"div\").html(\"<span class='red'>Hello <b>Again</b></span>\");", "htmlCode": "$(\"div\").html(\"&lt;span class='red'&gt;Hello &lt;b&gt;Again&lt;/b&gt;&lt;/span&gt;\");", "desc": "Add some html to each div.", "css": "\n  .red { color:red; }\n  ", "inhead": "", "html": "<span>Hello</span>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "107iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div\").html(\"<span class='red'>Hello <b>Again</b></span>\");\n  });\n</script>\n<style>\n\n  .red { color:red; }\n  \n</style>\n</head>\n<body>\n<span>Hello</span>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    $(\"div\").html(\"<b>Wow!</b> Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n", "htmlCode": "\n    $(\"div\").html(\"&lt;b&gt;Wow!&lt;/b&gt; Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n", "desc": "Add some html to each div then immediately do further manipulations to the inserted html.", "css": "\n  div { color:blue; font-size:18px; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>", "exampleId": "107iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").html(\"<b>Wow!</b> Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n\n  });\n</script>\n<style>\n\n  div { color:blue; font-size:18px; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "text108": {"id": 108, "searchname": "text", "name": "text", "type": "function", "category": "Attributes", "subcategory": "Changing Contents", "return": "String", "added": "", "sample": "", "desc": "Get the combined text contents of all matched elements.", "longdesc": "<p>The result is a string that contains the combined text contents of all matched elements. This method works on both HTML and XML documents.</p>", "params": [], "examples": [{"code": "\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n", "htmlCode": "\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n", "desc": "Find the text in the first paragraph (stripping out the html), then set the html of the last paragraph to show it is just text (the red bold is gone).", "css": "\n  p { color:blue; margin:8px; }\n  b { color:red; }\n  ", "inhead": "", "html": "<p><b>Test</b> Paragraph.</p>\n  <p></p>", "exampleId": "108iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n\n  });\n</script>\n<style>\n\n  p { color:blue; margin:8px; }\n  b { color:red; }\n  \n</style>\n</head>\n<body>\n<p><b>Test</b> Paragraph.</p>\n  <p></p>\n</body>\n</html>"}]}, "text109": {"id": 109, "searchname": "text", "name": "text", "type": "function", "category": "Attributes", "subcategory": "Changing Contents", "return": "jQuery", "added": "", "sample": "", "desc": "Set the text contents of all matched elements.", "longdesc": "<p>Similar to html(), but escapes HTML (replace \"<\" and \">\" with their HTML entities).</p>", "params": [{"optional": false, "name": "val", "type": "String", "desc": "The text value to set the contents of the element to."}], "examples": [{"code": "$(\"p\").text(\"<b>Some</b> new text.\");", "htmlCode": "$(\"p\").text(\"&lt;b&gt;Some&lt;/b&gt; new text.\");", "desc": "Add text to the paragraph (notice the bold tag is escaped).", "css": "\n  p { color:blue; margin:8px; }\n  ", "inhead": "", "html": "<p>Test Paragraph.</p>", "exampleId": "109iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").text(\"<b>Some</b> new text.\");\n  });\n</script>\n<style>\n\n  p { color:blue; margin:8px; }\n  \n</style>\n</head>\n<body>\n<p>Test Paragraph.</p>\n</body>\n</html>"}]}, "append110": {"id": 110, "searchname": "append", "name": "append", "type": "function", "category": "Manipulation", "subcategory": "Inserting Inside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Append content to the inside of every matched element.", "longdesc": "<p>This operation is similar to doing an appendChild to all the specified elements, adding them into the document.</p>", "params": [{"optional": false, "name": "content", "type": "String, Element, jQuery", "desc": "Content to append to the target."}], "examples": [{"code": "$(\"p\").append(\"<b>Hello</b>\");", "htmlCode": "$(\"p\").append(\"&lt;b&gt;Hello&lt;/b&gt;\");", "desc": "Appends some HTML to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>I would like to say: </p>", "exampleId": "110iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").append(\"<b>Hello</b>\");\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>I would like to say: </p>\n</body>\n</html>"}, {"code": "$(\"p\").append(document.createTextNode(\"Hello\"));", "htmlCode": "$(\"p\").append(document.createTextNode(\"Hello\"));", "desc": "Appends an Element to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>I would like to say: </p>", "exampleId": "110iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").append(document.createTextNode(\"Hello\"));\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>I would like to say: </p>\n</body>\n</html>"}, {"code": "$(\"p\").append( $(\"b\") );", "htmlCode": "$(\"p\").append( $(\"b\") );", "desc": "Appends a jQuery object (similar to an Array of DOM Elements) to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<b>Hello</b><p>I would like to say: </p>", "exampleId": "110iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").append( $(\"b\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<b>Hello</b><p>I would like to say: </p>\n</body>\n</html>"}]}, "appendto111": {"id": 111, "searchname": "appendto", "name": "appendTo", "type": "function", "category": "Manipulation", "subcategory": "Inserting Inside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Append all of the matched elements to another, specified, set of elements.", "longdesc": "<p>This operation is, essentially, the reverse of doing a regular $(A).append(B), in that instead of appending B to A, you're appending A to B.</p>", "params": [{"optional": false, "name": "content", "type": "String", "desc": "target to which the content will be appended."}], "examples": [{"code": "$(\"span\").appendTo(\"#foo\"); // check append() examples", "htmlCode": "$(\"span\").appendTo(\"#foo\"); // check append() examples", "desc": "Appends all spans to the element with the ID \"foo\"", "css": "#foo { background:yellow; }", "inhead": "", "html": "<span>I have nothing more to say... </span>\n  <div id=\"foo\">FOO! </div>", "exampleId": "111iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"span\").appendTo(\"#foo\"); // check append() examples\n  });\n</script>\n<style>\n#foo { background:yellow; }\n</style>\n</head>\n<body>\n<span>I have nothing more to say... </span>\n  <div id=\"foo\">FOO! </div>\n</body>\n</html>"}]}, "prepend112": {"id": 112, "searchname": "prepend", "name": "prepend", "type": "function", "category": "Manipulation", "subcategory": "Inserting Inside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Prepend content to the inside of every matched element.", "longdesc": "<p>This operation is the best way to insert elements inside, at the beginning, of all matched elements.</p>", "params": [{"optional": false, "name": "content", "type": "String, Element, jQuery", "desc": "Content to prepend to the target."}], "examples": [{"code": "$(\"p\").prepend(\"<b>Hello </b>\");", "htmlCode": "$(\"p\").prepend(\"&lt;b&gt;Hello &lt;/b&gt;\");", "desc": "Prepends some HTML to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>there friend!</p>\n  <p>amigo!</p>", "exampleId": "112iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").prepend(\"<b>Hello </b>\");\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>there friend!</p>\n  <p>amigo!</p>\n</body>\n</html>"}, {"code": "$(\"p\").prepend(document.createTextNode(\"Hello \"));", "htmlCode": "$(\"p\").prepend(document.createTextNode(\"Hello \"));", "desc": "Prepends a DOM Element to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>is what I'd say</p>\n  <p>is what I said</p>", "exampleId": "112iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").prepend(document.createTextNode(\"Hello \"));\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>is what I'd say</p>\n  <p>is what I said</p>\n</body>\n</html>"}, {"code": "$(\"p\").prepend( $(\"b\") );", "htmlCode": "$(\"p\").prepend( $(\"b\") );", "desc": "Prepends a jQuery object (similar to an Array of DOM Elements) to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p> is what was said.</p><b>Hello</b>", "exampleId": "112iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").prepend( $(\"b\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p> is what was said.</p><b>Hello</b>\n</body>\n</html>"}]}, "prependto113": {"id": 113, "searchname": "prependto", "name": "prependTo", "type": "function", "category": "Manipulation", "subcategory": "Inserting Inside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Prepend all of the matched elements to another, specified, set of elements.", "longdesc": "<p>This operation is, essentially, the reverse of doing a regular $(A).prepend(B), in that instead of prepending B to A, you're prepending A to B.</p>", "params": [{"optional": false, "name": "content", "type": "String", "desc": "target to which the content will be prepended."}], "examples": [{"code": "$(\"span\").prependTo(\"#foo\"); // check prepend() examples", "htmlCode": "$(\"span\").prependTo(\"#foo\"); // check prepend() examples", "desc": "Prepends all spans to the element with the ID \"foo\"", "css": "div { background:yellow; }", "inhead": "", "html": "<div id=\"foo\">FOO!</div>\n  <span>I have something to say... </span>", "exampleId": "113iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"span\").prependTo(\"#foo\"); // check prepend() examples\n  });\n</script>\n<style>\ndiv { background:yellow; }\n</style>\n</head>\n<body>\n<div id=\"foo\">FOO!</div>\n  <span>I have something to say... </span>\n</body>\n</html>"}]}, "after114": {"id": 114, "searchname": "after", "name": "after", "type": "function", "category": "Manipulation", "subcategory": "Inserting Outside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Insert content after each of the matched elements.", "longdesc": "", "params": [{"optional": false, "name": "content", "type": "String, Element, jQuery", "desc": "Content to insert after each target."}], "examples": [{"code": "$(\"p\").after(\"<b>Hello</b>\");", "htmlCode": "$(\"p\").after(\"&lt;b&gt;Hello&lt;/b&gt;\");", "desc": "Inserts some HTML after all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>I would like to say: </p>", "exampleId": "114iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").after(\"<b>Hello</b>\");\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>I would like to say: </p>\n</body>\n</html>"}, {"code": "$(\"p\").after( document.createTextNode(\"Hello\") );", "htmlCode": "$(\"p\").after( document.createTextNode(\"Hello\") );", "desc": "Inserts a DOM element after all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>I would like to say: </p>", "exampleId": "114iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").after( document.createTextNode(\"Hello\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>I would like to say: </p>\n</body>\n</html>"}, {"code": "$(\"p\").after( $(\"b\") );", "htmlCode": "$(\"p\").after( $(\"b\") );", "desc": "Inserts a jQuery object (similar to an Array of DOM Elements) after all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<b>Hello</b>\n  <p>I would like to say: </p>", "exampleId": "114iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").after( $(\"b\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<b>Hello</b>\n  <p>I would like to say: </p>\n</body>\n</html>"}]}, "before115": {"id": 115, "searchname": "before", "name": "before", "type": "function", "category": "Manipulation", "subcategory": "Inserting Outside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Insert content before each of the matched elements.", "longdesc": "", "params": [{"optional": false, "name": "content", "type": "String, Element, jQuery", "desc": "Content to insert before each target."}], "examples": [{"code": "$(\"p\").before(\"<b>Hello</b>\");", "htmlCode": "$(\"p\").before(\"&lt;b&gt;Hello&lt;/b&gt;\");", "desc": "Inserts some HTML before all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p> is what I said...</p>", "exampleId": "115iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").before(\"<b>Hello</b>\");\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p> is what I said...</p>\n</body>\n</html>"}, {"code": "$(\"p\").before( document.createTextNode(\"Hello\") );", "htmlCode": "$(\"p\").before( document.createTextNode(\"Hello\") );", "desc": "Inserts a DOM element before all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p> is what I said...</p>", "exampleId": "115iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").before( document.createTextNode(\"Hello\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p> is what I said...</p>\n</body>\n</html>"}, {"code": "$(\"p\").before( $(\"b\") );", "htmlCode": "$(\"p\").before( $(\"b\") );", "desc": "Inserts a jQuery object (similar to an Array of DOM Elements) before all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p> is what I said...</p><b>Hello</b>", "exampleId": "115iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").before( $(\"b\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p> is what I said...</p><b>Hello</b>\n</body>\n</html>"}]}, "insertafter116": {"id": 116, "searchname": "insertafter", "name": "insertAfter", "type": "function", "category": "Manipulation", "subcategory": "Inserting Outside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Insert all of the matched elements after another, specified, set of elements.", "longdesc": "<p>This operation is, essentially, the reverse of doing a regular $(A).after(B), in that instead of inserting B after A, you're inserting A after B.</p>", "params": [{"optional": false, "name": "content", "type": "String", "desc": "Content after which the selected element(s) is inserted."}], "examples": [{"code": "$(\"p\").insertAfter(\"#foo\"); // check after() examples", "htmlCode": "$(\"p\").insertAfter(\"#foo\"); // check after() examples", "desc": "Inserts all paragraphs after an element with id of \"foo\". Same as $(\"#foo\").after(\"p\")", "css": "#foo { background:yellow; }", "inhead": "", "html": "<p> is what I said... </p><div id=\"foo\">FOO!</div>", "exampleId": "116iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").insertAfter(\"#foo\"); // check after() examples\n  });\n</script>\n<style>\n#foo { background:yellow; }\n</style>\n</head>\n<body>\n<p> is what I said... </p><div id=\"foo\">FOO!</div>\n</body>\n</html>"}]}, "insertbefore117": {"id": 117, "searchname": "insertbefore", "name": "insertBefore", "type": "function", "category": "Manipulation", "subcategory": "Inserting Outside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Insert all of the matched elements before another, specified, set of elements.", "longdesc": "<p>This operation is, essentially, the reverse of doing a regular $(A).before(B), in that instead of inserting B before A, you're inserting A before B.</p>", "params": [{"optional": false, "name": "content", "type": "String", "desc": "Content after which the selected element(s) is inserted."}], "examples": [{"code": "$(\"p\").insertBefore(\"#foo\"); // check before() examples", "htmlCode": "$(\"p\").insertBefore(\"#foo\"); // check before() examples", "desc": "Inserts all paragraphs before an element with id of \"foo\". Same as $(\"#foo\").before(\"p\")", "css": "#foo { background:yellow; }", "inhead": "", "html": "<div id=\"foo\">FOO!</div><p>I would like to say: </p>", "exampleId": "117iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").insertBefore(\"#foo\"); // check before() examples\n  });\n</script>\n<style>\n#foo { background:yellow; }\n</style>\n</head>\n<body>\n<div id=\"foo\">FOO!</div><p>I would like to say: </p>\n</body>\n</html>"}]}, "wrap118": {"id": 118, "searchname": "wrap", "name": "wrap", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "", "sample": "", "desc": "Wrap each matched element with the specified HTML content.", "longdesc": "<p>This wrapping process is most useful for injecting additional structure into a document, without ruining the original semantic qualities of a document.</p><p>This works by going through the first element provided (which is generated, on the fly, from the provided HTML) and finds the deepest ancestor element within its structure -- it is that element that will enwrap everything else.</p>", "params": [{"optional": false, "name": "html", "type": "String", "desc": "A string of HTML that will be created on the fly and wrapped around each target."}], "examples": [{"code": "$(\"p\").wrap(\"<div></div>\");", "htmlCode": "$(\"p\").wrap(\"&lt;div&gt;&lt;/div&gt;\");", "desc": "Wrap a new div around all of the paragraphs.", "css": "\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "118iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrap(\"<div></div>\");\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"span\").wrap(\"<div><div><p><em><b></b></em></p></div></div>\");", "htmlCode": "$(\"span\").wrap(\"&lt;div&gt;&lt;div&gt;&lt;p&gt;&lt;em&gt;&lt;b&gt;&lt;/b&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;\");", "desc": "Wraps a newly created tree of objects around the spans.  Notice anything in between the spans gets left out like the &lt;strong&gt; (red text) in this example.  Even the white space between spans is left out.  Click View Source to see the original html.", "css": "\n  div { border:2px blue solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  strong { color:red; }\n  ", "inhead": "", "html": "<span>Span Text</span>\n  <strong>What about me?</strong>\n  <span>Another One</span>", "exampleId": "118iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"span\").wrap(\"<div><div><p><em><b></b></em></p></div></div>\");\n  });\n</script>\n<style>\n\n  div { border:2px blue solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  strong { color:red; }\n  \n</style>\n</head>\n<body>\n<span>Span Text</span>\n  <strong>What about me?</strong>\n  <span>Another One</span>\n</body>\n</html>"}]}, "wrap119": {"id": 119, "searchname": "wrap", "name": "wrap", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Wrap each matched element with the specified element.", "longdesc": "", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "A DOM element that will be wrapped around each target."}], "examples": [{"code": "$(\"p\").wrap(document.createElement(\"div\"));", "htmlCode": "$(\"p\").wrap(document.createElement(\"div\"));", "desc": "Wrap a new div around all of the paragraphs.", "css": "\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "119iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrap(document.createElement(\"div\"));\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"p\").wrap($(\".doublediv\"));", "htmlCode": "$(\"p\").wrap($(\".doublediv\"));", "desc": "Wrap a jQuery object double depth div around all of the paragraphs.  Notice it doesn't move the object but just clones it to wrap around its target.", "css": "\n  div { border: 2px solid blue; margin:2px; padding:2px; }\n  .doublediv { border-color:red; }\n  p { background:yellow; margin:4px; font-size:14px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div class=\"doublediv\"><div></div></div>", "exampleId": "119iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrap($(\".doublediv\"));\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; margin:2px; padding:2px; }\n  .doublediv { border-color:red; }\n  p { background:yellow; margin:4px; font-size:14px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div class=\"doublediv\"><div></div></div>\n</body>\n</html>"}]}, "wrapall120": {"id": 120, "searchname": "wrapall", "name": "wrapAll", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Wrap all the elements in the matched set into a single wrapper element.", "longdesc": "<p>This is different from <a href='Manipulation/wrap'>.wrap()</a> where each element in the matched set would get wrapped with an element.</p><p>This wrapping process is most useful for injecting additional structure into a document, without ruining the original semantic qualities of a document.</p><p>This works by going through the first element provided (which is generated, on the fly, from the provided HTML) and finds the deepest ancestor element within its structure -- it is that element that will enwrap everything else.</p>", "params": [{"optional": false, "name": "html", "type": "String", "desc": "A string of HTML that will be created on the fly and wrapped around the target."}], "examples": [{"code": "$(\"p\").wrapAll(\"<div></div>\");", "htmlCode": "$(\"p\").wrapAll(\"&lt;div&gt;&lt;/div&gt;\");", "desc": "Wrap a new div around all of the paragraphs.", "css": "\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "120iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapAll(\"<div></div>\");\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"span\").wrapAll(\"<div><div><p><em><b></b></em></p></div></div>\");", "htmlCode": "$(\"span\").wrapAll(\"&lt;div&gt;&lt;div&gt;&lt;p&gt;&lt;em&gt;&lt;b&gt;&lt;/b&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;\");", "desc": "Wraps a newly created tree of objects around the spans.  Notice anything in between the spans gets left out like the &lt;strong&gt; (red text) in this example.  Even the white space between spans is left out.  Click View Source to see the original html.", "css": "\n  div { border:2px blue solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  strong { color:red; }\n  ", "inhead": "", "html": "<span>Span Text</span>\n  <strong>What about me?</strong>\n  <span>Another One</span>", "exampleId": "120iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"span\").wrapAll(\"<div><div><p><em><b></b></em></p></div></div>\");\n  });\n</script>\n<style>\n\n  div { border:2px blue solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  strong { color:red; }\n  \n</style>\n</head>\n<body>\n<span>Span Text</span>\n  <strong>What about me?</strong>\n  <span>Another One</span>\n</body>\n</html>"}]}, "wrapall121": {"id": 121, "searchname": "wrapall", "name": "wrapAll", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Wrap all the elements in the matched set into a single wrapper element.", "longdesc": "<p>This is different from <a href='Manipulation/wrap'>.wrap()</a> where each element in the matched set would get wrapped with an element.</p>", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "A DOM element that will be wrapped around the target."}], "examples": [{"code": "$(\"p\").wrapAll(document.createElement(\"div\"));", "htmlCode": "$(\"p\").wrapAll(document.createElement(\"div\"));", "desc": "Wrap a new div around all of the paragraphs.", "css": "\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "121iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapAll(document.createElement(\"div\"));\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"p\").wrapAll($(\".doublediv\"));", "htmlCode": "$(\"p\").wrapAll($(\".doublediv\"));", "desc": "Wrap a jQuery object double depth div around all of the paragraphs.  Notice it doesn't move the object but just clones it to wrap around its target.", "css": "\n  div { border: 2px solid blue; margin:2px; padding:2px; }\n  .doublediv { border-color:red; }\n  p { background:yellow; margin:4px; font-size:14px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div class=\"doublediv\"><div></div></div>", "exampleId": "121iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapAll($(\".doublediv\"));\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; margin:2px; padding:2px; }\n  .doublediv { border-color:red; }\n  p { background:yellow; margin:4px; font-size:14px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div class=\"doublediv\"><div></div></div>\n</body>\n</html>"}]}, "wrapinner122": {"id": 122, "searchname": "wrapinner", "name": "wrapInner", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Wrap the inner child contents of each matched element (including text nodes) with an HTML structure.", "longdesc": "<p>This wrapping process is most useful for injecting additional structure into a document, without ruining the original semantic qualities of a document.</p><p>This works by going through the first element provided (which is generated, on the fly, from the provided HTML) and finds the deepest ancestor element within its structure -- it is that element that will enwrap everything else.</p>", "params": [{"optional": false, "name": "html", "type": "String", "desc": "A string of HTML that will be created on the fly and wrapped around the target."}], "examples": [{"code": "$(\"p\").wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs and wraps a bold tag around each of its contents.", "css": "p { background:#bbf; }", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "122iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapInner(\"<b></b>\");\n  });\n</script>\n<style>\np { background:#bbf; }\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"body\").wrapInner(\"<div><div><p><em><b></b></em></p></div></div>\");", "htmlCode": "$(\"body\").wrapInner(\"&lt;div&gt;&lt;div&gt;&lt;p&gt;&lt;em&gt;&lt;b&gt;&lt;/b&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;\");", "desc": "Wraps a newly created tree of objects around the inside of the body.", "css": "\n  div { border:2px green solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  ", "inhead": "", "html": "Plain old text, or is it?", "exampleId": "122iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"body\").wrapInner(\"<div><div><p><em><b></b></em></p></div></div>\");\n  });\n</script>\n<style>\n\n  div { border:2px green solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  \n</style>\n</head>\n<body>\nPlain old text, or is it?\n</body>\n</html>"}]}, "wrapinner123": {"id": 123, "searchname": "wrapinner", "name": "wrapInner", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Wrap the inner child contents of each matched element (including text nodes) with a DOM element.", "longdesc": "", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "A DOM element that will be wrapped around the target."}], "examples": [{"code": "$(\"p\").wrapInner(document.createElement(\"b\"));", "htmlCode": "$(\"p\").wrapInner(document.createElement(\"b\"));", "desc": "Selects all paragraphs and wraps a bold tag around each of its contents.", "css": "p { background:#9f9; }", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "123iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapInner(document.createElement(\"b\"));\n  });\n</script>\n<style>\np { background:#9f9; }\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"p\").wrapInner($(\"<span class='red'></span>\"));", "htmlCode": "$(\"p\").wrapInner($(\"&lt;span class='red'&gt;&lt;/span&gt;\"));", "desc": "Selects all paragraphs and wraps a jQuery object around each of its contents.", "css": "\n  p { background:#9f9; }\n  .red { color:red; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "123iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapInner($(\"<span class='red'></span>\"));\n  });\n</script>\n<style>\n\n  p { background:#9f9; }\n  .red { color:red; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}]}, "replacewith124": {"id": 124, "searchname": "replacewith", "name": "replaceWith", "type": "function", "category": "Manipulation", "subcategory": "Replacing", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Replaces all matched elements with the specified HTML or DOM elements.", "longdesc": "", "params": [{"optional": false, "name": "content", "type": "String, Element, jQuery", "desc": "Content to replace the matched elements with."}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(this).replaceWith(\"<div>\" + $(this).text() + \"</div>\");\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(this).replaceWith(\"&lt;div&gt;\" + $(this).text() + \"&lt;/div&gt;\");\n    });\n", "desc": "On click, replace the button with a div containing the same word.", "css": "\n  button { display:block; margin:3px; color:red; width:200px; }\n  div { color:red; border:2px solid blue; width:200px; \n        margin:3px; text-align:center; }\n  ", "inhead": "", "html": "<button>First</button>\n  <button>Second</button>\n  <button>Third</button>", "exampleId": "124iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(this).replaceWith(\"<div>\" + $(this).text() + \"</div>\");\n    });\n\n  });\n</script>\n<style>\n\n  button { display:block; margin:3px; color:red; width:200px; }\n  div { color:red; border:2px solid blue; width:200px; \n        margin:3px; text-align:center; }\n  \n</style>\n</head>\n<body>\n<button>First</button>\n  <button>Second</button>\n  <button>Third</button>\n</body>\n</html>"}, {"code": "$(\"p\").replaceWith(\"<b>Paragraph. </b>\");", "htmlCode": "$(\"p\").replaceWith(\"&lt;b&gt;Paragraph. &lt;/b&gt;\");", "desc": "Replace all the paragraphs with bold words.", "css": "", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "124iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").replaceWith(\"<b>Paragraph. </b>\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"p\").replaceWith(document.createElement(\"div\"));", "htmlCode": "$(\"p\").replaceWith(document.createElement(\"div\"));", "desc": "Replace all the paragraphs with empty div elements.", "css": "\n  div { border:2px solid blue; margin:3px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "124iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").replaceWith(document.createElement(\"div\"));\n  });\n</script>\n<style>\n\n  div { border:2px solid blue; margin:3px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "\n    $(\"p\").click(function () {\n      $(this).replaceWith($(\"div\"));\n    });\n", "htmlCode": "\n    $(\"p\").click(function () {\n      $(this).replaceWith($(\"div\"));\n    });\n", "desc": "On click, replace each paragraph with a jQuery div object that is already in the DOM.  Notice it doesn't clone the object but rather moves it to replace the paragraph.", "css": "\n  div { border:2px solid blue; color:red; margin:3px; }\n  p { border:2px solid red; color:blue; margin:3px; cursor:pointer; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div>Replaced!</div>", "exampleId": "124iframeExample3", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () {\n      $(this).replaceWith($(\"div\"));\n    });\n\n  });\n</script>\n<style>\n\n  div { border:2px solid blue; color:red; margin:3px; }\n  p { border:2px solid red; color:blue; margin:3px; cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div>Replaced!</div>\n</body>\n</html>"}]}, "replaceall125": {"id": 125, "searchname": "replaceall", "name": "replaceAll", "type": "function", "category": "Manipulation", "subcategory": "Replacing", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Replaces the elements matched by the specified selector with the matched elements.", "longdesc": "<p>This function is the complement to replaceWith() which does the same task with the parameters reversed.</p>", "params": [{"optional": false, "name": "selector", "type": "Selector", "desc": "The elements to find and replace the matched elements with."}], "examples": [{"code": "$(\"<b>Paragraph. </b>\").replaceAll(\"p\"); // check replaceWith() examples", "htmlCode": "$(\"&lt;b&gt;Paragraph. &lt;/b&gt;\").replaceAll(\"p\"); // check replaceWith() examples", "desc": "Replace all the paragraphs with bold words.", "css": "", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "125iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"<b>Paragraph. </b>\").replaceAll(\"p\"); // check replaceWith() examples\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}]}, "empty126": {"id": 126, "searchname": "empty", "name": "empty", "type": "function", "category": "Manipulation", "subcategory": "Removing", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Remove all child nodes from the set of matched elements.", "longdesc": "<p>Note that this function starting with 1.2.2 will also remove all event handlers and internally cached data.</p>", "params": [], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").empty();\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").empty();\n    });\n", "desc": "Removes all child nodes (including text nodes) from all paragraphs", "css": "\n  p { background:yellow; }\n  ", "inhead": "", "html": "<p>\n    Hello, <span>Person</span> <a href=\"javascript:;\">and person</a>\n  </p>\n  <button>Call empty() on above paragraph</button>", "exampleId": "126iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").empty();\n    });\n\n  });\n</script>\n<style>\n\n  p { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>\n    Hello, <span>Person</span> <a href=\"javascript:;\">and person</a>\n  </p>\n  <button>Call empty() on above paragraph</button>\n</body>\n</html>"}]}, "remove127": {"id": 127, "searchname": "remove", "name": "remove", "type": "function", "category": "Manipulation", "subcategory": "Removing", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Removes all matched elements from the DOM. ", "longdesc": "<p>This does NOT remove them from the jQuery object, allowing you to use the matched elements further.  Note that this function starting with 1.2.2 will also remove all event handlers and internally cached data.  So:</p><p><code>\n$(\"#foo\").remove().appendTo(\"#bar\");\n</code></p><p>should be written as</p><p><code>\n$(\"#foo\").appendTo(\"#bar\");\n</code></p><p>to avoid losing the event handlers.</p><p>Can be filtered with an optional expression.</p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "A jQuery expression to filter the set of elements to be removed."}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").remove();\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").remove();\n    });\n", "desc": "Removes all paragraphs from the DOM", "css": "p { background:yellow; margin:6px 0; }", "inhead": "", "html": "<p>Hello</p> \n  how are \n  <p>you?</p>\n  <button>Call remove() on paragraphs", "exampleId": "127iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").remove();\n    });\n\n  });\n</script>\n<style>\np { background:yellow; margin:6px 0; }\n</style>\n</head>\n<body>\n<p>Hello</p> \n  how are \n  <p>you?</p>\n  <button>Call remove() on paragraphs\n</body>\n</html>"}, {"code": "\n    $(\"button\").click(function () {\n      $(\"p\").remove(\":contains('Hello')\");\n    });\n\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").remove(\":contains('Hello')\");\n    });\n\n", "desc": "Removes all paragraphs that contain \"Hello\" from the DOM", "css": "p { background:yellow; margin:6px 0; }", "inhead": "", "html": "<p class=\"hello\">Hello</p>\n  how are \n  <p>you?</p>\n  <button>Call remove(\":contains('Hello')\") on paragraphs", "exampleId": "127iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").remove(\":contains('Hello')\");\n    });\n\n\n  });\n</script>\n<style>\np { background:yellow; margin:6px 0; }\n</style>\n</head>\n<body>\n<p class=\"hello\">Hello</p>\n  how are \n  <p>you?</p>\n  <button>Call remove(\":contains('Hello')\") on paragraphs\n</body>\n</html>"}]}, "clone128": {"id": 128, "searchname": "clone", "name": "clone", "type": "function", "category": "Manipulation", "subcategory": "Copying", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Clone matched DOM Elements and select the clones.", "longdesc": "<p>This is useful for moving copies of the elements to another location in the DOM.</p>", "params": [], "examples": [{"code": "$(\"b\").clone().prependTo(\"p\");", "htmlCode": "$(\"b\").clone().prependTo(\"p\");", "desc": "Clones all b elements (and selects the clones) and prepends them to all paragraphs.", "css": "", "inhead": "", "html": "<b>Hello</b><p>, how are you?</p>", "exampleId": "128iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"b\").clone().prependTo(\"p\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<b>Hello</b><p>, how are you?</p>\n</body>\n</html>"}]}, "clone129": {"id": 129, "searchname": "clone", "name": "clone", "type": "function", "category": "Manipulation", "subcategory": "Copying", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Clone matched DOM Elements, and all their event handlers, and select the clones.", "longdesc": "<p>This is useful for moving copies of the elements, and their events, to another location in the DOM.</p>", "params": [{"optional": false, "name": "true", "type": "Boolean", "desc": "Set to true to enable cloning of event handlers."}], "examples": [{"code": "\n    $(\"button\").click(function(){\n      $(this).clone(true).insertAfter(this);\n    });\n", "htmlCode": "\n    $(\"button\").click(function(){\n      $(this).clone(true).insertAfter(this);\n    });\n", "desc": "Create a button that's able to clone itself - and have the clones themselves be clonable.", "css": "", "inhead": "", "html": "<button>Clone Me!</button>", "exampleId": "129iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function(){\n      $(this).clone(true).insertAfter(this);\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<button>Clone Me!</button>\n</body>\n</html>"}]}, "css130": {"id": 130, "searchname": "css", "name": "css", "type": "function", "category": "CSS", "subcategory": "CSS", "return": "String", "added": "1.0", "sample": "", "desc": "Return a style property on the first matched element.", "longdesc": "", "params": [{"optional": false, "name": "name", "type": "String", "desc": "The name of the property to access."}], "examples": [{"code": "\n    $(\"div\").click(function () {\n      var color = $(this).css(\"background-color\");\n      $(\"#result\").html(\"That div is <span style='color:\" +\n                         color + \";'>\" + color + \"</span>.\");\n    });\n", "htmlCode": "\n    $(\"div\").click(function () {\n      var color = $(this).css(\"background-color\");\n      $(\"#result\").html(\"That div is &lt;span style='color:\" +\n                         color + \";'&gt;\" + color + \"&lt;/span&gt;.\");\n    });\n", "desc": "To access the background color of a clicked div.", "css": "\n  div { width:60px; height:60px; margin:5px; float:left; }\n  ", "inhead": "", "html": "<span id=\"result\">&nbsp;</span>\n  <div style=\"background-color:blue;\"></div>\n  <div style=\"background-color:rgb(15,99,30);\"></div>\n  <div style=\"background-color:#123456;\"></div>\n  <div style=\"background-color:#f11;\"></div>", "exampleId": "130iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").click(function () {\n      var color = $(this).css(\"background-color\");\n      $(\"#result\").html(\"That div is <span style='color:\" +\n                         color + \";'>\" + color + \"</span>.\");\n    });\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:5px; float:left; }\n  \n</style>\n</head>\n<body>\n<span id=\"result\">&nbsp;</span>\n  <div style=\"background-color:blue;\"></div>\n  <div style=\"background-color:rgb(15,99,30);\"></div>\n  <div style=\"background-color:#123456;\"></div>\n  <div style=\"background-color:#f11;\"></div>\n</body>\n</html>"}]}, "css131": {"id": 131, "searchname": "css", "name": "css", "type": "function", "category": "CSS", "subcategory": "CSS", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Set a key/value object as style properties to all matched elements.", "longdesc": "<p>This is the best way to set several style properties on all matched elements.</p>", "params": [{"optional": false, "name": "properties", "type": "Map", "desc": "Key/value pairs to set as style properties."}], "examples": [{"code": "\n    $(\"p\").hover(function () {\n      $(this).css({ backgroundColor:\"yellow\", fontWeight:\"bolder\" });\n    }, function () {\n      var cssObj = {\n        backgroundColor: \"#ddd\",\n        fontWeight: \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n", "htmlCode": "\n    $(\"p\").hover(function () {\n      $(this).css({ backgroundColor:\"yellow\", fontWeight:\"bolder\" });\n    }, function () {\n      var cssObj = {\n        backgroundColor: \"#ddd\",\n        fontWeight: \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n", "desc": "To set the color of all paragraphs to red and background to blue:", "css": "\n  p { color:green; }\n  ", "inhead": "", "html": "<p>\n    Move the mouse over a paragraph.\n  </p>\n  <p>\n    Like this one or the one above.\n  </p>", "exampleId": "131iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").hover(function () {\n      $(this).css({ backgroundColor:\"yellow\", fontWeight:\"bolder\" });\n    }, function () {\n      var cssObj = {\n        backgroundColor: \"#ddd\",\n        fontWeight: \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n\n  });\n</script>\n<style>\n\n  p { color:green; }\n  \n</style>\n</head>\n<body>\n<p>\n    Move the mouse over a paragraph.\n  </p>\n  <p>\n    Like this one or the one above.\n  </p>\n</body>\n</html>"}, {"code": "\n    $(\"p\").hover(function () {\n      $(this).css({ \"background-color\":\"yellow\", \"font-weight\":\"bolder\" });\n    }, function () {\n      var cssObj = {\n        \"background-color\": \"#ddd\",\n        \"font-weight\": \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n", "htmlCode": "\n    $(\"p\").hover(function () {\n      $(this).css({ \"background-color\":\"yellow\", \"font-weight\":\"bolder\" });\n    }, function () {\n      var cssObj = {\n        \"background-color\": \"#ddd\",\n        \"font-weight\": \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n", "desc": "If the property name includes a \"-\", put it between quotation marks:", "css": "\n  p { color:green; }\n  ", "inhead": "", "html": "<p>\n    Move the mouse over a paragraph.\n  </p>\n  <p>\n    Like this one or the one above.\n  </p>", "exampleId": "131iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").hover(function () {\n      $(this).css({ \"background-color\":\"yellow\", \"font-weight\":\"bolder\" });\n    }, function () {\n      var cssObj = {\n        \"background-color\": \"#ddd\",\n        \"font-weight\": \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n\n  });\n</script>\n<style>\n\n  p { color:green; }\n  \n</style>\n</head>\n<body>\n<p>\n    Move the mouse over a paragraph.\n  </p>\n  <p>\n    Like this one or the one above.\n  </p>\n</body>\n</html>"}]}, "css132": {"id": 132, "searchname": "css", "name": "css", "type": "function", "category": "CSS", "subcategory": "CSS", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Set a single style property to a value on all matched elements.", "longdesc": "<p>If a number is provided, it is automatically converted into a pixel value.</p>", "params": [{"optional": false, "name": "name", "type": "String", "desc": "The name of the property to set."}, {"optional": false, "name": "value", "type": "String, Number", "desc": "The value to set the property to."}], "examples": [{"code": "\n    $(\"p\").mouseover(function () {\n      $(this).css(\"color\",\"red\");\n    });\n", "htmlCode": "\n    $(\"p\").mouseover(function () {\n      $(this).css(\"color\",\"red\");\n    });\n", "desc": "To change the color of any paragraph to red on mouseover event.", "css": "\n  p { color:blue; width:200px; font-size:14px; }\n  ", "inhead": "", "html": "<p>\n    Just roll the mouse over me.\n  </p>\n  <p>\n    Or me to see a color change.\n  </p>", "exampleId": "132iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").mouseover(function () {\n      $(this).css(\"color\",\"red\");\n    });\n\n  });\n</script>\n<style>\n\n  p { color:blue; width:200px; font-size:14px; }\n  \n</style>\n</head>\n<body>\n<p>\n    Just roll the mouse over me.\n  </p>\n  <p>\n    Or me to see a color change.\n  </p>\n</body>\n</html>"}, {"code": "\n    var words = $(\"p:first\").text().split(\" \");\n    var text = words.join(\"</span> <span>\");\n    $(\"p:first\").html(\"<span>\" + text + \"</span>\");\n    $(\"span\").click(function () {\n      $(this).css(\"background-color\",\"yellow\");\n    });\n", "htmlCode": "\n    var words = $(\"p:first\").text().split(\" \");\n    var text = words.join(\"&lt;/span&gt; &lt;span&gt;\");\n    $(\"p:first\").html(\"&lt;span&gt;\" + text + \"&lt;/span&gt;\");\n    $(\"span\").click(function () {\n      $(this).css(\"background-color\",\"yellow\");\n    });\n", "desc": "To highlight a clicked word in the paragraph.", "css": "\n  p { color:blue; font-weight:bold; cursor:pointer; }\n  ", "inhead": "", "html": "<p>\n    Once upon a time there was a man\n    who lived in a pizza parlor. This\n    man just loved pizza and ate it all \n    the time.  He went on to be the\n    happiest man in the world.  The end.\n  </p>", "exampleId": "132iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var words = $(\"p:first\").text().split(\" \");\n    var text = words.join(\"</span> <span>\");\n    $(\"p:first\").html(\"<span>\" + text + \"</span>\");\n    $(\"span\").click(function () {\n      $(this).css(\"background-color\",\"yellow\");\n    });\n\n  });\n</script>\n<style>\n\n  p { color:blue; font-weight:bold; cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<p>\n    Once upon a time there was a man\n    who lived in a pizza parlor. This\n    man just loved pizza and ate it all \n    the time.  He went on to be the\n    happiest man in the world.  The end.\n  </p>\n</body>\n</html>"}]}, "offset133": {"id": 133, "searchname": "offset", "name": "offset", "type": "function", "category": "CSS", "subcategory": "Positioning", "return": "Object{top,left}", "added": "1.2", "sample": "", "desc": "Get the current offset of the first matched element relative to the viewport.", "longdesc": "<p>The returned object contains two <a href='Types#Integer'>Integer</a> properties, top and left. The method works only with visible elements. </p>", "params": [], "examples": [{"code": "var p = $(\"p:last\");\nvar offset = p.offset();\np.html( \"left: \" + offset.left + \", top: \" + offset.top );", "htmlCode": "var p = $(\"p:last\");\nvar offset = p.offset();\np.html( \"left: \" + offset.left + \", top: \" + offset.top );", "desc": "Access the offset of the second paragraph:", "css": "\n  p { margin-left:10px; }\n  ", "inhead": "", "html": "<p>Hello</p><p>2nd Paragraph</p>", "exampleId": "133iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\nvar p = $(\"p:last\");\nvar offset = p.offset();\np.html( \"left: \" + offset.left + \", top: \" + offset.top );\n  });\n</script>\n<style>\n\n  p { margin-left:10px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p><p>2nd Paragraph</p>\n</body>\n</html>"}, {"code": "\n    $(\"*\", document.body).click(function (e) {\n      var offset = $(this).offset();\n      e.stopPropagation();\n      $(\"#result\").text(this.tagName + \" coords ( \" + offset.left + \", \" +\n                                      offset.top + \" )\");\n    });\n", "htmlCode": "\n    $(\"*\", document.body).click(function (e) {\n      var offset = $(this).offset();\n      e.stopPropagation();\n      $(\"#result\").text(this.tagName + \" coords ( \" + offset.left + \", \" +\n                                      offset.top + \" )\");\n    });\n", "desc": "Click to see the offset.", "css": "\n  p { margin-left:10px; color:blue; width:200px; \n      cursor:pointer; }\n  span { color:red; cursor:pointer; }\n  div.abs { width:50px; height:50px; position:absolute;\n            left:220px; top:35px; background-color:green; \n            cursor:pointer; }\n  ", "inhead": "", "html": "<div id=\"result\">Click an element.</div>\n  <p>\n    This is the best way to <span>find</span> an offset.\n  </p>\n  <div class=\"abs\">\n  </dov>\n  ", "exampleId": "133iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"*\", document.body).click(function (e) {\n      var offset = $(this).offset();\n      e.stopPropagation();\n      $(\"#result\").text(this.tagName + \" coords ( \" + offset.left + \", \" +\n                                      offset.top + \" )\");\n    });\n\n  });\n</script>\n<style>\n\n  p { margin-left:10px; color:blue; width:200px; \n      cursor:pointer; }\n  span { color:red; cursor:pointer; }\n  div.abs { width:50px; height:50px; position:absolute;\n            left:220px; top:35px; background-color:green; \n            cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<div id=\"result\">Click an element.</div>\n  <p>\n    This is the best way to <span>find</span> an offset.\n  </p>\n  <div class=\"abs\">\n  </dov>\n  \n</body>\n</html>"}]}, "height134": {"id": 134, "searchname": "height", "name": "height", "type": "function", "category": "CSS", "subcategory": "Height and Width", "return": "Integer", "added": "1.0", "sample": "", "desc": "Get the current computed, pixel, height of the first matched element.", "longdesc": "<p>In jQuery 1.2, this method is able to find the height of the window and document.</p>", "params": [], "examples": [{"code": "\n    function showHeight(ele, h) {\n      $(\"div\").text(\"The height for the \" + ele + \n                    \" is \" + h + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showHeight(\"paragraph\", $(\"p\").height()); \n    });\n    $(\"#getd\").click(function () { \n      showHeight(\"document\", $(document).height()); \n    });\n    $(\"#getw\").click(function () { \n      showHeight(\"window\", $(window).height()); \n    });\n", "htmlCode": "\n    function showHeight(ele, h) {\n      $(\"div\").text(\"The height for the \" + ele + \n                    \" is \" + h + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showHeight(\"paragraph\", $(\"p\").height()); \n    });\n    $(\"#getd\").click(function () { \n      showHeight(\"document\", $(document).height()); \n    });\n    $(\"#getw\").click(function () { \n      showHeight(\"window\", $(window).height()); \n    });\n", "desc": "Show various heights.  Note the values are from the iframe so might be smaller than you expected.  The yellow highlight shows the iframe body.", "css": "\n  body { background:yellow; }\n  button { font-size:12px; margin:2px; }\n  p { width:150px; border:1px red solid; }\n  div { color:red; font-weight:bold; }\n  ", "inhead": "", "html": "<button id=\"getp\">Get Paragraph Height</button>\n  <button id=\"getd\">Get Document Height</button>\n  <button id=\"getw\">Get Window Height</button>\n  <div>&nbsp;</div>\n  <p>\n    Sample paragraph to test height\n  </p>", "exampleId": "134iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function showHeight(ele, h) {\n      $(\"div\").text(\"The height for the \" + ele + \n                    \" is \" + h + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showHeight(\"paragraph\", $(\"p\").height()); \n    });\n    $(\"#getd\").click(function () { \n      showHeight(\"document\", $(document).height()); \n    });\n    $(\"#getw\").click(function () { \n      showHeight(\"window\", $(window).height()); \n    });\n\n  });\n</script>\n<style>\n\n  body { background:yellow; }\n  button { font-size:12px; margin:2px; }\n  p { width:150px; border:1px red solid; }\n  div { color:red; font-weight:bold; }\n  \n</style>\n</head>\n<body>\n<button id=\"getp\">Get Paragraph Height</button>\n  <button id=\"getd\">Get Document Height</button>\n  <button id=\"getw\">Get Window Height</button>\n  <div>&nbsp;</div>\n  <p>\n    Sample paragraph to test height\n  </p>\n</body>\n</html>"}]}, "height135": {"id": 135, "searchname": "height", "name": "height", "type": "function", "category": "CSS", "subcategory": "Height and Width", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Set the CSS height of every matched element.", "longdesc": "<p>If no explicit unit was specified (like 'em' or '%') then \"px\" is concatenated to the value.</p>", "params": [{"optional": false, "name": "val", "type": "String, Number", "desc": "Set the CSS 'height' property to the specified value."}], "examples": [{"code": "\n    $(\"div\").one('click', function () {\n      $(this).height(30)\n             .css({cursor:\"auto\", backgroundColor:\"green\"});\n    });\n", "htmlCode": "\n    $(\"div\").one('click', function () {\n      $(this).height(30)\n             .css({cursor:\"auto\", backgroundColor:\"green\"});\n    });\n", "desc": "To set the height of each div on click to 30px plus a color change.", "css": "\n  div { width:50px; height:70px; float:left; margin:5px;\n        background:rgb(255,140,0); cursor:pointer; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "135iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").one('click', function () {\n      $(this).height(30)\n             .css({cursor:\"auto\", backgroundColor:\"green\"});\n    });\n\n  });\n</script>\n<style>\n\n  div { width:50px; height:70px; float:left; margin:5px;\n        background:rgb(255,140,0); cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "width136": {"id": 136, "searchname": "width", "name": "width", "type": "function", "category": "CSS", "subcategory": "Height and Width", "return": "Integer", "added": "1.0", "sample": "", "desc": "Get the current computed, pixel, width of the first matched element.", "longdesc": "<p>In jQuery 1.2, this method is able to find the width of the window and document.</p>", "params": [], "examples": [{"code": "\n    function showWidth(ele, w) {\n      $(\"div\").text(\"The width for the \" + ele + \n                    \" is \" + w + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showWidth(\"paragraph\", $(\"p\").width()); \n    });\n    $(\"#getd\").click(function () { \n      showWidth(\"document\", $(document).width()); \n    });\n    $(\"#getw\").click(function () { \n      showWidth(\"window\", $(window).width()); \n    });\n", "htmlCode": "\n    function showWidth(ele, w) {\n      $(\"div\").text(\"The width for the \" + ele + \n                    \" is \" + w + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showWidth(\"paragraph\", $(\"p\").width()); \n    });\n    $(\"#getd\").click(function () { \n      showWidth(\"document\", $(document).width()); \n    });\n    $(\"#getw\").click(function () { \n      showWidth(\"window\", $(window).width()); \n    });\n", "desc": "Show various widths.  Note the values are from the iframe so might be smaller than you expected.  The yellow highlight shows the iframe body.", "css": "\n  body { background:yellow; }\n  button { font-size:12px; margin:2px; }\n  p { width:150px; border:1px red solid; }\n  div { color:red; font-weight:bold;  }\n  ", "inhead": "", "html": "<button id=\"getp\">Get Paragraph Width</button>\n  <button id=\"getd\">Get Document Width</button>\n  <button id=\"getw\">Get Window Width</button>\n  <div>&nbsp;</div>\n  <p>\n    Sample paragraph to test width\n  </p>", "exampleId": "136iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function showWidth(ele, w) {\n      $(\"div\").text(\"The width for the \" + ele + \n                    \" is \" + w + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showWidth(\"paragraph\", $(\"p\").width()); \n    });\n    $(\"#getd\").click(function () { \n      showWidth(\"document\", $(document).width()); \n    });\n    $(\"#getw\").click(function () { \n      showWidth(\"window\", $(window).width()); \n    });\n\n  });\n</script>\n<style>\n\n  body { background:yellow; }\n  button { font-size:12px; margin:2px; }\n  p { width:150px; border:1px red solid; }\n  div { color:red; font-weight:bold;  }\n  \n</style>\n</head>\n<body>\n<button id=\"getp\">Get Paragraph Width</button>\n  <button id=\"getd\">Get Document Width</button>\n  <button id=\"getw\">Get Window Width</button>\n  <div>&nbsp;</div>\n  <p>\n    Sample paragraph to test width\n  </p>\n</body>\n</html>"}]}, "width137": {"id": 137, "searchname": "width", "name": "width", "type": "function", "category": "CSS", "subcategory": "Height and Width", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Set the CSS width of every matched element.", "longdesc": "<p>If no explicit unit was specified (like 'em' or '%') then \"px\" is concatenated to the value.</p>", "params": [{"optional": false, "name": "val", "type": "String, Number", "desc": "Set the CSS 'width' property to the specified value."}], "examples": [{"code": "\n    $(\"div\").one('click', function () {\n      $(this).width(30)\n             .css({cursor:\"auto\", \"background-color\":\"blue\"});\n    });\n", "htmlCode": "\n    $(\"div\").one('click', function () {\n      $(this).width(30)\n             .css({cursor:\"auto\", \"background-color\":\"blue\"});\n    });\n", "desc": "To set the width of each div on click to 30px plus a color change.", "css": "\n  div { width:70px; height:50px; float:left; margin:5px;\n        background:red; cursor:pointer; }\n  ", "inhead": "", "html": "<div></div>\n  <div>d</div>\n  <div>d</div>\n  <div>d</div>\n  <div>d</div>", "exampleId": "137iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").one('click', function () {\n      $(this).width(30)\n             .css({cursor:\"auto\", \"background-color\":\"blue\"});\n    });\n\n  });\n</script>\n<style>\n\n  div { width:70px; height:50px; float:left; margin:5px;\n        background:red; cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div>d</div>\n  <div>d</div>\n  <div>d</div>\n  <div>d</div>\n</body>\n</html>"}]}, "ready138": {"id": 138, "searchname": "ready", "name": "ready", "type": "function", "category": "Events", "subcategory": "Page Load", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to be executed whenever the DOM is ready to be traversed and manipulated.", "longdesc": "<p>This is probably the most important function included in the event module, as it can greatly improve the response times of your web applications.</p><p>In a nutshell, this is a solid replacement for using window.onload, and attaching a function to that. By using this method, your bound function will be called the instant the DOM is ready to be read and manipulated, which is when what 99.99% of all JavaScript code needs to run.</p><p>There is one argument passed to the ready event handler: A reference to the jQuery function. You can name that argument whatever you like, and can therefore stick with the $ alias without risk of naming collisions.</p><p>Please ensure you have no code in your &lt;body&gt; onload event handler, otherwise $(document).ready() may not fire.</p><p>You can have as many $(document).ready events on your page as you like. The functions are then executed in the order they were added.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "The function to be executed when the DOM is ready.\n<pre>function callback(jQueryReference) {\n  this; // document\n}\n</pre>"}], "examples": [{"code": "$(\"p\").text(\"The DOM is now loaded and can be manipulated.\");", "htmlCode": "$(\"p\").text(\"The DOM is now loaded and can be manipulated.\");", "desc": "Display a message when the DOM is loaded.", "css": "p { color:red; }", "inhead": "", "html": "<p>\n  </p>", "exampleId": "138iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").text(\"The DOM is now loaded and can be manipulated.\");\n  });\n</script>\n<style>\np { color:red; }\n</style>\n</head>\n<body>\n<p>\n  </p>\n</body>\n</html>"}, {"code": "$(document).ready(function(){\n  // Your code here...\n});", "htmlCode": "$(document).ready(function(){\n  // Your code here...\n});", "desc": "To run code when the DOM loads, write:", "css": "", "inhead": "", "html": "", "exampleId": "138iframeExample1", "runCode": ""}, {"code": "jQuery(function($) {\n  // Your code using failsafe $ alias here...\n});", "htmlCode": "jQuery(function($) {\n  // Your code using failsafe $ alias here...\n});", "desc": "To use both the shortcut for $(document).ready() and the argument to write failsafe jQuery code using the $ alias, without relying on the global alias, write:", "css": "", "inhead": "", "html": "", "exampleId": "138iframeExample2", "runCode": ""}, {"code": "$(function() {\n  // Your code here...\n});", "htmlCode": "$(function() {\n  // Your code here...\n});", "desc": "Commonly written as:", "css": "", "inhead": "", "html": "", "exampleId": "138iframeExample3", "runCode": ""}]}, "bind139": {"id": 139, "searchname": "bind", "name": "bind", "type": "function", "category": "Events", "subcategory": "Event Handling", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Binds a handler to one or more events (like click) for each matched element.  Can also bind custom events.", "longdesc": "<p><strong>Possible event values:</strong> <code>blur</code>, <code>focus</code>, <code>load</code>, <code>resize</code>, <code>scroll</code>, <code>unload</code>, <code>click</code>, <code>dblclick</code>, <code> mousedown</code>, <code>mouseup</code>, <code>mousemove</code>, <code>mouseover</code>, <code>mouseout</code>, <code>mouseenter</code>, <code>mouseleave</code>, <code>change</code>, <code>select</code>, <code> submit</code>, <code>keydown</code>, <code>keypress</code>, <code>keyup</code>, <code>error</code></p><p>The event handler is passed an event object that you can use to prevent default behaviour. To stop both default action and event bubbling, your handler has to return false. Note that this will prevent handlers on parent elements from running but not other jQuery handlers on the same element.</p><p>In most cases, you can define your event handlers as anonymous functions (see first example). In cases where that is not possible, you can pass additional data as the second parameter (and the handler function as the third), see second example.</p>", "params": [{"optional": false, "name": "type", "type": "String", "desc": "One or more event types separated by a space"}, {"optional": true, "name": "data", "type": "Object", "desc": "Additional data passed to the event handler as event.data"}, {"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the event on each of the set of matched elements\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").bind(\"click\", function(e){\n      var str = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      $(\"span\").text(\"Click happened! \" + str);\n    });\n    $(\"p\").bind(\"dblclick\", function(){\n      $(\"span\").text(\"Double-click happened in \" + this.tagName);\n    });\n    $(\"p\").bind(\"mouseenter mouseleave\", function(e){\n        $(this).toggleClass(\"over\");\n    });\n", "htmlCode": "\n    $(\"p\").bind(\"click\", function(e){\n      var str = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      $(\"span\").text(\"Click happened! \" + str);\n    });\n    $(\"p\").bind(\"dblclick\", function(){\n      $(\"span\").text(\"Double-click happened in \" + this.tagName);\n    });\n    $(\"p\").bind(\"mouseenter mouseleave\", function(e){\n        $(this).toggleClass(\"over\");\n    });\n", "desc": "Handle click and double-click for the paragraph.  Note: the coordinates are window relative so in this case relative to the demo iframe.", "css": "\n  p { background:yellow; font-weight:bold; cursor:pointer; \n      padding:5px; }\n  p.over { background: #ccc; }\n  span { color:red; }\n  ", "inhead": "", "html": "<p>Click or double click here.</p>\n  <span></span>", "exampleId": "139iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").bind(\"click\", function(e){\n      var str = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      $(\"span\").text(\"Click happened! \" + str);\n    });\n    $(\"p\").bind(\"dblclick\", function(){\n      $(\"span\").text(\"Double-click happened in \" + this.tagName);\n    });\n    $(\"p\").bind(\"mouseenter mouseleave\", function(e){\n        $(this).toggleClass(\"over\");\n    });\n\n  });\n</script>\n<style>\n\n  p { background:yellow; font-weight:bold; cursor:pointer; \n      padding:5px; }\n  p.over { background: #ccc; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<p>Click or double click here.</p>\n  <span></span>\n</body>\n</html>"}, {"code": "$(\"p\").bind(\"click\", function(){\n  alert( $(this).text() );\n});", "htmlCode": "$(\"p\").bind(\"click\", function(){\n  alert( $(this).text() );\n});", "desc": "To display each paragraph's text in an alert box whenever it is clicked:", "css": "", "inhead": "", "html": "", "exampleId": "139iframeExample1", "runCode": ""}, {"code": "function handler(event) {\n  alert(event.data.foo);\n}\n$(\"p\").bind(\"click\", {foo: \"bar\"}, handler)", "htmlCode": "function handler(event) {\n  alert(event.data.foo);\n}\n$(\"p\").bind(\"click\", {foo: \"bar\"}, handler)", "desc": "You can pass some extra data before the event handler:", "css": "", "inhead": "", "html": "", "exampleId": "139iframeExample2", "runCode": ""}, {"code": "$(\"form\").bind(\"submit\", function() { return false; })", "htmlCode": "$(\"form\").bind(\"submit\", function() { return false; })", "desc": "To cancel a default action and prevent it from bubbling up, return false:", "css": "", "inhead": "", "html": "", "exampleId": "139iframeExample3", "runCode": ""}, {"code": "$(\"form\").bind(\"submit\", function(event){\n  event.preventDefault();\n});", "htmlCode": "$(\"form\").bind(\"submit\", function(event){\n  event.preventDefault();\n});", "desc": "To cancel only the default action by using the preventDefault method.", "css": "", "inhead": "", "html": "", "exampleId": "139iframeExample4", "runCode": ""}, {"code": "$(\"form\").bind(\"submit\", function(event){\n  event.stopPropagation();\n});", "htmlCode": "$(\"form\").bind(\"submit\", function(event){\n  event.stopPropagation();\n});", "desc": "Stop only an event from bubbling by using the stopPropagation method.", "css": "", "inhead": "", "html": "", "exampleId": "139iframeExample5", "runCode": ""}, {"code": "\n    $(\"p\").bind(\"myCustomEvent\", function(e, myName, myValue){\n      $(this).text(myName + \", hi there!\");\n      $(\"span\").stop().css(\"opacity\", 1)\n               .text(\"myName = \" + myName)\n               .fadeIn(30).fadeOut(1000);\n    });\n    $(\"button\").click(function () {\n      $(\"p\").trigger(\"myCustomEvent\", [ \"John\" ]);\n    });\n", "htmlCode": "\n    $(\"p\").bind(\"myCustomEvent\", function(e, myName, myValue){\n      $(this).text(myName + \", hi there!\");\n      $(\"span\").stop().css(\"opacity\", 1)\n               .text(\"myName = \" + myName)\n               .fadeIn(30).fadeOut(1000);\n    });\n    $(\"button\").click(function () {\n      $(\"p\").trigger(\"myCustomEvent\", [ \"John\" ]);\n    });\n", "desc": "Can bind custom events too.", "css": "\n  p { color:red; }\n  span { color:blue; }\n  ", "inhead": "", "html": "<p>Has an attached custom event.</p>\n  <button>Trigger custom event</button>\n  <span style=\"display:none;\"></span>", "exampleId": "139iframeExample6", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").bind(\"myCustomEvent\", function(e, myName, myValue){\n      $(this).text(myName + \", hi there!\");\n      $(\"span\").stop().css(\"opacity\", 1)\n               .text(\"myName = \" + myName)\n               .fadeIn(30).fadeOut(1000);\n    });\n    $(\"button\").click(function () {\n      $(\"p\").trigger(\"myCustomEvent\", [ \"John\" ]);\n    });\n\n  });\n</script>\n<style>\n\n  p { color:red; }\n  span { color:blue; }\n  \n</style>\n</head>\n<body>\n<p>Has an attached custom event.</p>\n  <button>Trigger custom event</button>\n  <span style=\"display:none;\"></span>\n</body>\n</html>"}]}, "one140": {"id": 140, "searchname": "one", "name": "one", "type": "function", "category": "Events", "subcategory": "Event Handling", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a handler to one or more events to be executed <i>once</i> for each matched element.", "longdesc": "<p>The handler is executed only once for each element. Otherwise, the same rules as described in <a href='Events/bind'>bind</a>() apply. The event handler is passed an event object that you can use to prevent default behaviour. To stop both default action and event bubbling, your handler should return false.</p><p>In most cases, you can define your event handlers as anonymous functions (see first example). In cases where that is not possible, you can pass additional data as the second paramter (and the handler function as the third), see second example.</p>", "params": [{"optional": false, "name": "type", "type": "String", "desc": "An event type"}, {"optional": true, "name": "data", "type": "Object", "desc": "Additional data passed to the event handler as event.data"}, {"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the specified event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    var n = 0;\n    $(\"div\").one(\"click\", function(){\n      var index = $(\"div\").index(this);\n      $(this).css({ borderStyle:\"inset\",\n                    cursor:\"auto\" });\n      $(\"p\").text(\"Div at index #\" + index + \" clicked.\" +\n                  \"  That's \" + ++n + \" total clicks.\");\n    });\n", "htmlCode": "\n    var n = 0;\n    $(\"div\").one(\"click\", function(){\n      var index = $(\"div\").index(this);\n      $(this).css({ borderStyle:\"inset\",\n                    cursor:\"auto\" });\n      $(\"p\").text(\"Div at index #\" + index + \" clicked.\" +\n                  \"  That's \" + ++n + \" total clicks.\");\n    });\n", "desc": "Tie a one-time click to each div.", "css": "\n  div { width:60px; height:60px; margin:5px; float:left;\n        background:green; border:10px outset; \n        cursor:pointer; }\n  p { color:red; margin:0; clear:left; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <p>Click a green square...</p>", "exampleId": "140iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var n = 0;\n    $(\"div\").one(\"click\", function(){\n      var index = $(\"div\").index(this);\n      $(this).css({ borderStyle:\"inset\",\n                    cursor:\"auto\" });\n      $(\"p\").text(\"Div at index #\" + index + \" clicked.\" +\n                  \"  That's \" + ++n + \" total clicks.\");\n    });\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:5px; float:left;\n        background:green; border:10px outset; \n        cursor:pointer; }\n  p { color:red; margin:0; clear:left; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <p>Click a green square...</p>\n</body>\n</html>"}, {"code": "$(\"p\").one(\"click\", function(){\n  alert( $(this).text() );\n});", "htmlCode": "$(\"p\").one(\"click\", function(){\n  alert( $(this).text() );\n});", "desc": "To display the text of all paragraphs in an alert box the first time each of them is clicked:", "css": "", "inhead": "", "html": "", "exampleId": "140iframeExample1", "runCode": ""}]}, "trigger141": {"id": 141, "searchname": "trigger", "name": "trigger", "type": "function", "category": "Events", "subcategory": "Event Handling", "return": "jQuery", "added": "", "sample": "", "desc": "Trigger a type of event on every matched element.", "longdesc": "<p>This will also cause the default action of the browser with the same name (if one exists) to be executed. For example, passing 'submit' to the trigger() function will also cause the browser to submit the form. This default action can be prevented by returning false from one of the functions bound to the event.</p><p>If a native event is triggered and a suitable event object is not passed as the first element of 'data', then a fake event object is added before all supplied 'data' arguments.  This element contains appropriate 'type' and 'target' fields and null-op 'preventDefault' and 'stopPropagation' methods, but none of the clientXY/pageXY/keyCode fields specific to mouse and keyboard events.  A \"suitable\" event object is judged by the presence of the 'preventDefault' field.</p><p>You can also trigger custom events registered with bind.</p>", "params": [{"optional": false, "name": "type ", "type": "String", "desc": "An event type to trigger."}, {"optional": true, "name": "data ", "type": "Array", "desc": "Additional data to pass as arguments (after the event object) to the event handler."}], "examples": [{"code": "\n    $(\"button:first\").click(function () {\n      update($(\"span:first\"));\n    });\n    $(\"button:last\").click(function () {\n      $(\"button:first\").trigger('click');\n\n      update($(\"span:last\"));\n    });\n\n    function update(j) {\n      var n = parseInt(j.text(), 0);\n      j.text(n + 1);\n    }\n", "htmlCode": "\n    $(\"button:first\").click(function () {\n      update($(\"span:first\"));\n    });\n    $(\"button:last\").click(function () {\n      $(\"button:first\").trigger('click');\n\n      update($(\"span:last\"));\n    });\n\n    function update(j) {\n      var n = parseInt(j.text(), 0);\n      j.text(n + 1);\n    }\n", "desc": "Clicks to button #2 also trigger a click for button #1.", "css": "\n  button { margin:10px; }\n  div { color:blue; font-weight:bold; }\n  span { color:red; }\n  ", "inhead": "", "html": "<button>Button #1</button>\n  <button>Button #2</button>\n  <div><span>0</span> button #1 clicks.</div>\n  <div><span>0</span> button #2 clicks.</div>", "exampleId": "141iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button:first\").click(function () {\n      update($(\"span:first\"));\n    });\n    $(\"button:last\").click(function () {\n      $(\"button:first\").trigger('click');\n\n      update($(\"span:last\"));\n    });\n\n    function update(j) {\n      var n = parseInt(j.text(), 0);\n      j.text(n + 1);\n    }\n\n  });\n</script>\n<style>\n\n  button { margin:10px; }\n  div { color:blue; font-weight:bold; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<button>Button #1</button>\n  <button>Button #2</button>\n  <div><span>0</span> button #1 clicks.</div>\n  <div><span>0</span> button #2 clicks.</div>\n</body>\n</html>"}, {"code": "$(\"form:first\").trigger(\"submit\")", "htmlCode": "$(\"form:first\").trigger(\"submit\")", "desc": "To submit the first form without using the submit() function, try:", "css": "", "inhead": "", "html": "", "exampleId": "141iframeExample1", "runCode": ""}, {"code": "$(\"p\").click( function (event, a, b) {\n  // when a normal click fires, a and b are undefined\n  // for a trigger like below a refers too \"foo\" and b refers to \"bar\"\n} ).trigger(\"click\", [\"foo\", \"bar\"]);", "htmlCode": "$(\"p\").click( function (event, a, b) {\n  // when a normal click fires, a and b are undefined\n  // for a trigger like below a refers too \"foo\" and b refers to \"bar\"\n} ).trigger(\"click\", [\"foo\", \"bar\"]);", "desc": "To pass arbitrary data to an event:", "css": "", "inhead": "", "html": "", "exampleId": "141iframeExample2", "runCode": ""}, {"code": "$(\"p\").bind(\"myEvent\", function (event, message1, message2) {\n  alert(message1 + ' ' + message2);\n});\n$(\"p\").trigger(\"myEvent\", [\"Hello\",\"World!\"]);", "htmlCode": "$(\"p\").bind(\"myEvent\", function (event, message1, message2) {\n  alert(message1 + ' ' + message2);\n});\n$(\"p\").trigger(\"myEvent\", [\"Hello\",\"World!\"]);", "desc": "This would display a \"Hello World!\" alert box.", "css": "", "inhead": "", "html": "", "exampleId": "141iframeExample3", "runCode": ""}]}, "triggerhandler142": {"id": 142, "searchname": "triggerhandler", "name": "triggerHandler", "type": "function", "category": "Events", "subcategory": "Event Handling", "return": "jQuery", "added": "", "sample": "", "desc": "This particular method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browsers default actions.", "longdesc": "<p>The event is only triggered on the first element within the JQuery collection.  Also, if the JQuery collection is empty, this method returns 'undefined' instead of an empty JQuery collection.</p>", "params": [{"optional": false, "name": "type ", "type": "String", "desc": "An event type to trigger."}, {"optional": true, "name": "data ", "type": "Array", "desc": "Additional data to pass as arguments (after the event object) to the event handler."}], "examples": [{"code": "\n    $(\"#old\").click(function(){\n      $(\"input\").trigger(\"focus\");\n    });\n    $(\"#new\").click(function(){\n      $(\"input\").triggerHandler(\"focus\");\n    });\n    $(\"input\").focus(function(){\n      $(\"<span>Focused!</span>\").appendTo(\"body\").fadeOut(1000);\n    });\n", "htmlCode": "\n    $(\"#old\").click(function(){\n      $(\"input\").trigger(\"focus\");\n    });\n    $(\"#new\").click(function(){\n      $(\"input\").triggerHandler(\"focus\");\n    });\n    $(\"input\").focus(function(){\n      $(\"&lt;span&gt;Focused!&lt;/span&gt;\").appendTo(\"body\").fadeOut(1000);\n    });\n", "desc": "If you called .triggerHandler() on a focus event - the browsers default focus action would not be triggered, only the event handlers bound to the focus event.", "css": "", "inhead": "", "html": "<button id=\"old\">.trigger(\"focus\")</button>\n  <button id=\"new\">.triggerHandler(\"focus\")</button><br/><br/>\n  <input type=\"text\" value=\"To Be Focused\"/>", "exampleId": "142iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#old\").click(function(){\n      $(\"input\").trigger(\"focus\");\n    });\n    $(\"#new\").click(function(){\n      $(\"input\").triggerHandler(\"focus\");\n    });\n    $(\"input\").focus(function(){\n      $(\"<span>Focused!</span>\").appendTo(\"body\").fadeOut(1000);\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<button id=\"old\">.trigger(\"focus\")</button>\n  <button id=\"new\">.triggerHandler(\"focus\")</button><br/><br/>\n  <input type=\"text\" value=\"To Be Focused\"/>\n</body>\n</html>"}]}, "unbind143": {"id": 143, "searchname": "unbind", "name": "unbind", "type": "function", "category": "Events", "subcategory": "Event Handling", "return": "jQuery", "added": "", "sample": "", "desc": "This does the opposite of bind, it removes bound events from each of the matched elements.", "longdesc": "<p>Without any arguments, all bound events are removed.</p><p>You can also unbind custom events registered with bind.</p><p>If the type is provided, all bound events of that type are removed.</p><p>If the function that was passed to bind is provided as the second argument, only that specific event handler is removed.</p>", "params": [{"optional": true, "name": "type ", "type": "String", "desc": "An event type to unbind."}, {"optional": true, "name": "data ", "type": "Function", "desc": "A function to unbind from the event on each of the set of matched elements."}], "examples": [{"code": "\n    function aClick() {\n      $(\"div\").show().fadeOut(\"slow\");\n    }\n    $(\"#bind\").click(function () {\n      // could use .bind('click', aClick) instead but for variety...\n      $(\"#theone\").click(aClick)\n                  .text(\"Can Click!\");\n    });\n    $(\"#unbind\").click(function () {\n      $(\"#theone\").unbind('click', aClick)\n                  .text(\"Does nothing...\");\n    });\n", "htmlCode": "\n    function aClick() {\n      $(\"div\").show().fadeOut(\"slow\");\n    }\n    $(\"#bind\").click(function () {\n      // could use .bind('click', aClick) instead but for variety...\n      $(\"#theone\").click(aClick)\n                  .text(\"Can Click!\");\n    });\n    $(\"#unbind\").click(function () {\n      $(\"#theone\").unbind('click', aClick)\n                  .text(\"Does nothing...\");\n    });\n", "desc": "Can bind and unbind events to the colored button.", "css": "\n  button { margin:5px; }\n  button#theone { color:red; background:yellow; }\n  ", "inhead": "", "html": "<button id=\"theone\">Does nothing...</button>\n  <button id=\"bind\">Bind Click</button>\n  <button id=\"unbind\">Unbind Click</button>\n  <div style=\"display:none;\">Click!</div>", "exampleId": "143iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function aClick() {\n      $(\"div\").show().fadeOut(\"slow\");\n    }\n    $(\"#bind\").click(function () {\n      // could use .bind('click', aClick) instead but for variety...\n      $(\"#theone\").click(aClick)\n                  .text(\"Can Click!\");\n    });\n    $(\"#unbind\").click(function () {\n      $(\"#theone\").unbind('click', aClick)\n                  .text(\"Does nothing...\");\n    });\n\n  });\n</script>\n<style>\n\n  button { margin:5px; }\n  button#theone { color:red; background:yellow; }\n  \n</style>\n</head>\n<body>\n<button id=\"theone\">Does nothing...</button>\n  <button id=\"bind\">Bind Click</button>\n  <button id=\"unbind\">Unbind Click</button>\n  <div style=\"display:none;\">Click!</div>\n</body>\n</html>"}, {"code": "$(\"p\").unbind()", "htmlCode": "$(\"p\").unbind()", "desc": "To unbind all events from all paragraphs, write:", "css": "", "inhead": "", "html": "", "exampleId": "143iframeExample1", "runCode": ""}, {"code": "$(\"p\").unbind( \"click\" )", "htmlCode": "$(\"p\").unbind( \"click\" )", "desc": "To unbind all click events from all paragraphs, write:", "css": "", "inhead": "", "html": "", "exampleId": "143iframeExample2", "runCode": ""}, {"code": "var foo = function () {\n  // code to handle some kind of event\n};\n\n$(\"p\").bind(\"click\", foo); // ... now foo will be called when paragraphs are clicked ...\n\n$(\"p\").unbind(\"click\", foo); // ... foo will no longer be called.", "htmlCode": "var foo = function () {\n  // code to handle some kind of event\n};\n\n$(\"p\").bind(\"click\", foo); // ... now foo will be called when paragraphs are clicked ...\n\n$(\"p\").unbind(\"click\", foo); // ... foo will no longer be called.", "desc": "To unbind just one previously bound handler, pass the function in as the second argument:", "css": "", "inhead": "", "html": "", "exampleId": "143iframeExample3", "runCode": ""}]}, "hover144": {"id": 144, "searchname": "hover", "name": "hover", "type": "function", "category": "Events", "subcategory": "Interaction Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Simulates hovering (moving the mouse on, and off, an object). This is a custom method which provides an 'in' to a frequent task.", "longdesc": "<p>Whenever the mouse cursor is moved over a matched element, the first specified function is fired. Whenever the mouse moves off of the element, the second specified function fires. Additionally, checks are in place to see if the mouse is still within the specified element itself (for example, an image inside of a div), and if it is, it will continue to 'hover', and not move out (a common error in using a mouseout event handler).</p>", "params": [{"optional": false, "name": "over", "type": "Function", "desc": "The function to fire when the mouse is moved over a matched element.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}, {"optional": false, "name": "out", "type": "Function", "desc": "The function to fire when the mouse is moved off of a matched element.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"li\").hover(\n      function () {\n        $(this).append($(\"<span> ***</span>\"));\n      }, \n      function () {\n        $(this).find(\"span:last\").remove();\n      }\n    );\n", "htmlCode": "\n    $(\"li\").hover(\n      function () {\n        $(this).append($(\"&lt;span&gt; ***&lt;/span&gt;\"));\n      }, \n      function () {\n        $(this).find(\"span:last\").remove();\n      }\n    );\n", "desc": "To add a special style to table cells that are being hovered over, try:", "css": "\n  ul { margin-left:20px; color:blue; }\n  li { cursor:default; }\n  span { color:red; }\n  ", "inhead": "", "html": "<ul>\n    <li>Milk</li>\n    <li>Bread</li>\n    <li>Chips</li>\n    <li>Socks</li>\n  </ul>", "exampleId": "144iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"li\").hover(\n      function () {\n        $(this).append($(\"<span> ***</span>\"));\n      }, \n      function () {\n        $(this).find(\"span:last\").remove();\n      }\n    );\n\n  });\n</script>\n<style>\n\n  ul { margin-left:20px; color:blue; }\n  li { cursor:default; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<ul>\n    <li>Milk</li>\n    <li>Bread</li>\n    <li>Chips</li>\n    <li>Socks</li>\n  </ul>\n</body>\n</html>"}, {"code": "$(\"td\").hover(\n  function () {\n    $(this).addClass(\"hover\");\n  },\n  function () {\n    $(this).removeClass(\"hover\");\n  }\n);", "htmlCode": "$(\"td\").hover(\n  function () {\n    $(this).addClass(\"hover\");\n  },\n  function () {\n    $(this).removeClass(\"hover\");\n  }\n);", "desc": "To add a special style to table cells that are being hovered over, try:", "css": "", "inhead": "", "html": "", "exampleId": "144iframeExample1", "runCode": ""}]}, "toggle145": {"id": 145, "searchname": "toggle", "name": "toggle", "type": "function", "category": "Events", "subcategory": "Interaction Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Toggle between two function calls every other click.", "longdesc": "<p>Whenever a matched element is clicked, the first specified function is fired, when clicked again, the second is fired. All subsequent clicks continue to rotate through the two functions.</p><p>Use unbind(\"click\") to remove.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "The function to execute on every even click.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}, {"optional": false, "name": "fn1", "type": "Function", "desc": "The function to execute on every odd click.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"li\").toggle(\n      function () {\n        $(this).css(\"list-style-type\", \"disc\")\n               .css(\"color\", \"blue\");\n      },\n      function () {\n        $(this).css({\"list-style-type\":\"\", \"color\":\"\"});\n      }\n    );\n", "htmlCode": "\n    $(\"li\").toggle(\n      function () {\n        $(this).css(\"list-style-type\", \"disc\")\n               .css(\"color\", \"blue\");\n      },\n      function () {\n        $(this).css({\"list-style-type\":\"\", \"color\":\"\"});\n      }\n    );\n", "desc": "Click to toggle highlight on the list item.", "css": "\n  ul { margin:10px; list-style:inside circle; font-weight:bold; }\n  li { cursor:pointer; }\n  ", "inhead": "", "html": "<ul>\n    <li>Go to the store</li>\n    <li>Pick up dinner</li>\n    <li>Debug crash</li>\n    <li>Take a jog</li>\n  </ul>", "exampleId": "145iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"li\").toggle(\n      function () {\n        $(this).css(\"list-style-type\", \"disc\")\n               .css(\"color\", \"blue\");\n      },\n      function () {\n        $(this).css({\"list-style-type\":\"\", \"color\":\"\"});\n      }\n    );\n\n  });\n</script>\n<style>\n\n  ul { margin:10px; list-style:inside circle; font-weight:bold; }\n  li { cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<ul>\n    <li>Go to the store</li>\n    <li>Pick up dinner</li>\n    <li>Debug crash</li>\n    <li>Take a jog</li>\n  </ul>\n</body>\n</html>"}, {"code": "$(\"td\").toggle(\n  function () {\n    $(this).addClass(\"selected\");\n  },\n  function () {\n    $(this).removeClass(\"selected\");\n  }\n);", "htmlCode": "$(\"td\").toggle(\n  function () {\n    $(this).addClass(\"selected\");\n  },\n  function () {\n    $(this).removeClass(\"selected\");\n  }\n);", "desc": "To toggle a style on table cells:", "css": "", "inhead": "", "html": "", "exampleId": "145iframeExample1", "runCode": ""}]}, "blur146": {"id": 146, "searchname": "blur", "name": "blur", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Triggers the blur event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that blur event to be executed, and calls the browser's default blur action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the blur event. The blur event usually fires when an element loses focus either via the pointing device or by tabbing navigation</p>", "params": [], "examples": [{"code": "$(\"p\").blur();", "htmlCode": "$(\"p\").blur();", "desc": "To triggers the blur event on all paragraphs:", "css": "", "inhead": "", "html": "", "exampleId": "146iframeExample0", "runCode": ""}]}, "blur147": {"id": 147, "searchname": "blur", "name": "blur", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Bind a function to the blur event of each matched element.", "longdesc": "<p>The blur event fires when an element loses focus either via the pointing device or by tabbing navigation.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the blur event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(\"p\").blur( function () { alert(\"Hello World!\"); } );", "htmlCode": "$(\"p\").blur( function () { alert(\"Hello World!\"); } );", "desc": "To pop up an alert saying \"Hello World!\" every time any paragraph's blur event triggers:", "css": "", "inhead": "", "html": "", "exampleId": "147iframeExample0", "runCode": ""}]}, "change148": {"id": 148, "searchname": "change", "name": "change", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Triggers the change event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that change event to be executed, and calls the browser's default change action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the change event. The change event usually fires when a control loses the input focus and its value has been modified since gaining focus.</p>", "params": [], "examples": []}, "change149": {"id": 149, "searchname": "change", "name": "change", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Binds a function to the change event of each matched element.", "longdesc": "<p>The change event fires when a control loses the input focus and its value has been modified since gaining focus.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the change event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .change();\n", "htmlCode": "\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .change();\n", "desc": "Attaches a change event to the select that gets the text for each selected option and writes them in the div.  It then triggers the event for the initial text draw.", "css": "\n  div { color:red; }\n  ", "inhead": "", "html": "<select name=\"sweets\" multiple=\"multiple\">\n    <option>Chocolate</option>\n    <option selected=\"selected\">Candy</option>\n    <option>Taffy</option>\n    <option selected=\"selected\">Caramel</option>\n    <option>Fudge</option>\n    <option>Cookie</option>\n  </select>\n  <div></div>", "exampleId": "149iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .change();\n\n  });\n</script>\n<style>\n\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<select name=\"sweets\" multiple=\"multiple\">\n    <option>Chocolate</option>\n    <option selected=\"selected\">Candy</option>\n    <option>Taffy</option>\n    <option selected=\"selected\">Caramel</option>\n    <option>Fudge</option>\n    <option>Cookie</option>\n  </select>\n  <div></div>\n</body>\n</html>"}, {"code": "$(\"input[@type='text']\").change( function() {\n  // check input for validity here\n});", "htmlCode": "$(\"input[@type='text']\").change( function() {\n  // check input for validity here\n});", "desc": "To add a validity test to all text input elements:", "css": "", "inhead": "", "html": "", "exampleId": "149iframeExample1", "runCode": ""}]}, "click150": {"id": 150, "searchname": "click", "name": "click", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Triggers the click event of each matched element.", "longdesc": "<p>Causes all of the functions that have been bound to that click event to be executed.</p>", "params": [], "examples": [{"code": "$(\"p\").click();", "htmlCode": "$(\"p\").click();", "desc": "To trigger the click event on all of the paragraphs on the page:", "css": "", "inhead": "", "html": "", "exampleId": "150iframeExample0", "runCode": ""}]}, "click151": {"id": 151, "searchname": "click", "name": "click", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Binds a function to the click event of each matched element.", "longdesc": "<p>The click event fires when the pointing device button is clicked over an element. A click is defined as a mousedown and mouseup over the same screen location. The sequence of these events is:<ul><li>mousedown</li><li>mouseup</li><li>click</li></ul></p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the click event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").click(function () { \n      $(this).slideUp(); \n    });\n    $(\"p\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n", "htmlCode": "\n    $(\"p\").click(function () { \n      $(this).slideUp(); \n    });\n    $(\"p\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n", "desc": "To hide paragraphs on a page when they are clicked:", "css": "\n  p { color:red; margin:5px; cursor:pointer; }\n  p.hilite { background:yellow; }\n  ", "inhead": "", "html": "<p>First Paragraph</p>\n  <p>Second Paragraph</p>\n  <p>Yet one more Paragraph</p>", "exampleId": "151iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () { \n      $(this).slideUp(); \n    });\n    $(\"p\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n\n  });\n</script>\n<style>\n\n  p { color:red; margin:5px; cursor:pointer; }\n  p.hilite { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>First Paragraph</p>\n  <p>Second Paragraph</p>\n  <p>Yet one more Paragraph</p>\n</body>\n</html>"}]}, "dblclick152": {"id": 152, "searchname": "dblclick", "name": "dblclick", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Triggers the dblclick event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that dblclick event to be executed, and calls the browser's default dblclick action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the dblclick event. The dblclick event usually fires when the pointing device button is double clicked over an element.</p>", "params": [], "examples": []}, "dblclick153": {"id": 153, "searchname": "dblclick", "name": "dblclick", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Binds a function to the dblclick event of each matched element.", "longdesc": "<p>The dblclick event fires when the pointing device button is double clicked over an element</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "The function to bind to the dblclick event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(\"p\").dblclick( function () { alert(\"Hello World!\"); });", "htmlCode": "$(\"p\").dblclick( function () { alert(\"Hello World!\"); });", "desc": "To bind a \"Hello World!\" alert box the dblclick event on every paragraph on the page:", "css": "", "inhead": "", "html": "", "exampleId": "153iframeExample0", "runCode": ""}, {"code": "\n    var divdbl = $(\"div:first\");\n    divdbl.dblclick(function () { \n      divdbl.toggleClass('dbl'); \n    });\n\n", "htmlCode": "\n    var divdbl = $(\"div:first\");\n    divdbl.dblclick(function () { \n      divdbl.toggleClass('dbl'); \n    });\n\n", "desc": "Double click to toggle background color.", "css": "\n  div { background:blue;\n        color:white;\n        height:100px;\n        width:150px;\n }\n  div.dbl { background:yellow;color:black; }\n  ", "inhead": "", "html": "<div></div><span>Double click the block</span>", "exampleId": "153iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var divdbl = $(\"div:first\");\n    divdbl.dblclick(function () { \n      divdbl.toggleClass('dbl'); \n    });\n\n\n  });\n</script>\n<style>\n\n  div { background:blue;\n        color:white;\n        height:100px;\n        width:150px;\n }\n  div.dbl { background:yellow;color:black; }\n  \n</style>\n</head>\n<body>\n<div></div><span>Double click the block</span>\n</body>\n</html>"}]}, "error154": {"id": 154, "searchname": "error", "name": "error", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Triggers the error event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that error event to be executed, and calls the browser's default error action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the error event. The error event usually fires when an element loses focus either via the pointing device or by tabbing navigation.</p>", "params": [], "examples": []}, "error155": {"id": 155, "searchname": "error", "name": "error", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the error event of each matched element.", "longdesc": "<p>There is no public standard for the error event. In most browsers, the window object's error event is triggered when a JavaScript error occurs on the page. An image object's error event is triggered when it is set an invalid src attribute - either a non-existent file, or one with corrupt image data.</p><p>If the event is thrown by the window object, the event handler will be passed three parameters: <ol><li>A message describing the event (\"varName is not defined\", \"missing operator in expression\", etc.),</li><li>the full URL of the document containing the error, and</li><li>the line number on which the error occured.</li></ol></p>\n<p>If the event handler returns true, it signifies that the event was handled, and the browser raises no errors.</p><p>For more information, see: <ul><li><a href=\"http://msdn2.microsoft.com/en-us/library/ms536930.aspx\">http://msdn2.microsoft.com/en-us/library/ms536930.aspx</a></li><li>[http://developer.mozilla.org/en/docs/DOM:window.onerror Gecko DOM Reference - onerror Event]</li><li>[http://developer.mozilla.org/en/docs/DOM:event Gecko DOM Reference - Event object]</li><li>[http://en.wikipedia.org/wiki/DOM_Events Wikipedia: DOM Events]</ul></p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "An event handler function to bind to the error event.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(window).error(function(msg, url, line){\n  jQuery.post(\"js_error_log.php\", { msg: msg, url: url, line: line });\n});", "htmlCode": "$(window).error(function(msg, url, line){\n  jQuery.post(\"js_error_log.php\", { msg: msg, url: url, line: line });\n});", "desc": "To keep a server-side log of JavaScript errors, you might want to:", "css": "", "inhead": "", "html": "", "exampleId": "155iframeExample0", "runCode": ""}, {"code": "$(window).error(function(){\n  return true;\n});", "htmlCode": "$(window).error(function(){\n  return true;\n});", "desc": "To hide JavaScript errors from the user, you can try:", "css": "", "inhead": "", "html": "", "exampleId": "155iframeExample1", "runCode": ""}, {"code": "$(\"img\").error(function(){\n  $(this).hide();\n});", "htmlCode": "$(\"img\").error(function(){\n  $(this).hide();\n});", "desc": "To hide the \"broken image\" icons for your IE users, you can try:", "css": "", "inhead": "", "html": "", "exampleId": "155iframeExample2", "runCode": ""}]}, "focus156": {"id": 156, "searchname": "focus", "name": "focus", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Triggers the focus event of each matched element. ", "longdesc": "<p>This causes all of the functions that have been bound to the focus event to be executed. Note that this does not execute the focus method of the underlying elements.</p>", "params": [], "examples": [{"code": "$(document).ready(function(){\n  $(\"#login\").focus();\n});", "htmlCode": "$(document).ready(function(){\n  $(\"#login\").focus();\n});", "desc": "To focus on a login input box with id 'login' on page startup, try:", "css": "", "inhead": "", "html": "", "exampleId": "156iframeExample0", "runCode": ""}]}, "focus157": {"id": 157, "searchname": "focus", "name": "focus", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the focus event of each matched element.", "longdesc": "<p>The focus event fires when an element receives focus either via the pointing device or by tab navigation.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the focus event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"input\").focus(function () {\n         $(this).next(\"span\").css('display','inline').fadeOut(1000);\n    });\n", "htmlCode": "\n    $(\"input\").focus(function () {\n         $(this).next(\"span\").css('display','inline').fadeOut(1000);\n    });\n", "desc": "Fire focus.", "css": "span {display:none;}", "inhead": "", "html": "<p><input type=\"text\" /> <span>focus fire</span></p>\n<p><input type=\"password\" /> <span>focus fire</span></p>", "exampleId": "157iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"input\").focus(function () {\n         $(this).next(\"span\").css('display','inline').fadeOut(1000);\n    });\n\n  });\n</script>\n<style>\nspan {display:none;}\n</style>\n</head>\n<body>\n<p><input type=\"text\" /> <span>focus fire</span></p>\n<p><input type=\"password\" /> <span>focus fire</span></p>\n</body>\n</html>"}, {"code": "$(\"input[@type=text]\").focus(function(){\n  $(this).blur();\n});", "htmlCode": "$(\"input[@type=text]\").focus(function(){\n  $(this).blur();\n});", "desc": "To stop people from writing in text input boxes, try:", "css": "", "inhead": "", "html": "", "exampleId": "157iframeExample1", "runCode": ""}]}, "keydown158": {"id": 158, "searchname": "keydown", "name": "keydown", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Triggers the keydown event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to the keydown event to be executed, and calls the browser's default keydown action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the keydown event. The keydown event usually fires when a key on the keyboard is pressed.</p>", "params": [], "examples": []}, "keydown159": {"id": 159, "searchname": "keydown", "name": "keydown", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the keydown event of each matched element.", "longdesc": "<p>The keydown event fires when a key on the keyboard is pressed.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the keydown event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(window).keydown(function(event){\n  switch (event.keyCode) {\n    // ...\n    // different keys do different things\n    // Different browsers provide different codes\n    // see here for details: http://unixpapa.com/js/key.html    \n    // ...\n  }\n});", "htmlCode": "$(window).keydown(function(event){\n  switch (event.keyCode) {\n    // ...\n    // different keys do different things\n    // Different browsers provide different codes\n    // see here for details: http://unixpapa.com/js/key.html    \n    // ...\n  }\n});", "desc": "To perform actions in response to keyboard presses on a page, try:", "css": "", "inhead": "", "html": "", "exampleId": "159iframeExample0", "runCode": ""}]}, "keypress160": {"id": 160, "searchname": "keypress", "name": "keypress", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Triggers the keypress event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to the keypress event to be executed, and calls the browser's default keypress action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the keypress event. The keypress event usually fires when a key on the keyboard is pressed.\n</p>", "params": [], "examples": []}, "keypress161": {"id": 161, "searchname": "keypress", "name": "keypress", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the keypress event of each matched element.", "longdesc": "<p>The keypress event fires when a key on the keyboard is \"clicked\". A keypress is defined as a keydown and keyup on the same key. The sequence of these events is: <ul><li>keydown</li><li>keyup</li><li>keypress</li></ul></p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the keypress event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"input\").keypress(function (e) {\n      if (e.which == 32 || (65 <= e.which && e.which <= 65 + 25)\n                        || (97 <= e.which && e.which <= 97 + 25)) {\n        var c = String.fromCharCode(e.which);\n        $(\"p\").append($(\"<span/>\"))\n              .children(\":last\")\n              .append(document.createTextNode(c));\n      } else if (e.which == 8) {\n        // backspace in IE only be on keydown\n        $(\"p\").children(\":last\").remove();\n      }\n      $(\"div\").text(e.which);\n    });\n", "htmlCode": "\n    $(\"input\").keypress(function (e) {\n      if (e.which == 32 || (65 &lt;= e.which && e.which &lt;= 65 + 25)\n                        || (97 &lt;= e.which && e.which &lt;= 97 + 25)) {\n        var c = String.fromCharCode(e.which);\n        $(\"p\").append($(\"&lt;span/&gt;\"))\n              .children(\":last\")\n              .append(document.createTextNode(c));\n      } else if (e.which == 8) {\n        // backspace in IE only be on keydown\n        $(\"p\").children(\":last\").remove();\n      }\n      $(\"div\").text(e.which);\n    });\n", "desc": "Show spaces and letters when typed.", "css": "\n  input { margin:10px; }\n  p { color:blue; margin:10px; font-size:18px; }\n  p.hilite { background:yellow; }\n  div { color:red; }\n  ", "inhead": "", "html": "<input type=\"text\" />\n  <p>Add text - </p>\n  <div></div>", "exampleId": "161iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"input\").keypress(function (e) {\n      if (e.which == 32 || (65 <= e.which && e.which <= 65 + 25)\n                        || (97 <= e.which && e.which <= 97 + 25)) {\n        var c = String.fromCharCode(e.which);\n        $(\"p\").append($(\"<span/>\"))\n              .children(\":last\")\n              .append(document.createTextNode(c));\n      } else if (e.which == 8) {\n        // backspace in IE only be on keydown\n        $(\"p\").children(\":last\").remove();\n      }\n      $(\"div\").text(e.which);\n    });\n\n  });\n</script>\n<style>\n\n  input { margin:10px; }\n  p { color:blue; margin:10px; font-size:18px; }\n  p.hilite { background:yellow; }\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<input type=\"text\" />\n  <p>Add text - </p>\n  <div></div>\n</body>\n</html>"}]}, "keyup162": {"id": 162, "searchname": "keyup", "name": "keyup", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Triggers the keyup event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to the keyup event to be executed, and calls the browser's default keyup action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the keyup event. The keyup event usually fires when a key on the keyboard is released.</p>", "params": [], "examples": []}, "keyup163": {"id": 163, "searchname": "keyup", "name": "keyup", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the keyup event of each matched element.", "longdesc": "<p>The keyup event fires when a key on the keyboard is released.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the keyup event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(document).keyup(function(event){\n    if (event.keyCode == 27) {\n        alert('escaped!');\n    }\n});", "htmlCode": "$(document).keyup(function(event){\n    if (event.keyCode == 27) {\n        alert('escaped!');\n    }\n});", "desc": "To perform an action when the escape key has been released:", "css": "", "inhead": "", "html": "", "exampleId": "163iframeExample0", "runCode": ""}]}, "load164": {"id": 164, "searchname": "load", "name": "load", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the load event of each matched element.", "longdesc": "<p>When bound to the window element, the event fires when the user agent finishes loading all content within a document, including window, frames, objects and images. For elements, it fires when the target element and all of its content has finished loading. Note: load will work only if you set it before the element has completely loaded, if you set it after that nothing will happen. This doesn't happen in $(document).ready(), which jQuery handles it to work as expected, also when setting it after the DOM has loaded.\n </p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the load event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(window).load(function () {\n      // run code\n    });\n", "htmlCode": "\n    $(window).load(function () {\n      // run code\n    });\n", "desc": "Run a function when the page is fully loaded including graphics.", "css": "", "inhead": "", "html": "", "exampleId": "164iframeExample0", "runCode": ""}]}, "mousedown165": {"id": 165, "searchname": "mousedown", "name": "mousedown", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the mousedown event of each matched element.", "longdesc": "<p>The mousedown event fires when the pointing device button is pressed over an element.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the mousedown event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").mouseup(function(){\n      $(this).append('<span style=\"color:#F00;\">Mouse up.</span>');\n    }).mousedown(function(){\n      $(this).append('<span style=\"color:#00F;\">Mouse down.</span>');\n    });\n", "htmlCode": "\n    $(\"p\").mouseup(function(){\n      $(this).append('&lt;span style=\"color:#F00;\"&gt;Mouse up.&lt;/span&gt;');\n    }).mousedown(function(){\n      $(this).append('&lt;span style=\"color:#00F;\"&gt;Mouse down.&lt;/span&gt;');\n    });\n", "desc": "Show texts when mouseup and mousedown event triggering.", "css": "", "inhead": "", "html": "<p>Press mouse and release here.</p>\n", "exampleId": "165iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").mouseup(function(){\n      $(this).append('<span style=\"color:#F00;\">Mouse up.</span>');\n    }).mousedown(function(){\n      $(this).append('<span style=\"color:#00F;\">Mouse down.</span>');\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Press mouse and release here.</p>\n\n</body>\n</html>"}]}, "mousemove166": {"id": 166, "searchname": "mousemove", "name": "mousemove", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the mousemove event of each matched element.", "longdesc": "<p>The mousemove event fires when the pointing device is moved while it is over an element. The event handler is passed one variable - the event object. Its .clientX and .clientY properties represent the coordinates of the mouse.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the mousmove event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"div\").mousemove(function(e){\n      var pageCoords = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      var clientCoords = \"( \" + e.clientX + \", \" + e.clientY + \" )\";\n      $(\"span:first\").text(\"( e.pageX, e.pageY ) - \" + pageCoords);\n      $(\"span:last\").text(\"( e.clientX, e.clientY ) - \" + clientCoords);\n    });\n", "htmlCode": "\n    $(\"div\").mousemove(function(e){\n      var pageCoords = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      var clientCoords = \"( \" + e.clientX + \", \" + e.clientY + \" )\";\n      $(\"span:first\").text(\"( e.pageX, e.pageY ) - \" + pageCoords);\n      $(\"span:last\").text(\"( e.clientX, e.clientY ) - \" + clientCoords);\n    });\n", "desc": "Show the mouse coordinates when the mouse is moved over the yellow div.  Coordinates are relative to the window which in this case is the iframe.", "css": "\n  div { width:250px; height:170px; margin;10px; margin-right:50px;\n        background:yellow; border:2px groove; float:right; }\n  p { margin:0; margin-left:10px; color:red; width:250px;\n      height:120px; padding-top:70px;\n      float:left; font-size:14px; }\n  span { display:block; }\n  ", "inhead": "", "html": "<p>   \n    Try scrolling too.\n    <span>Move the mouse over the div.</span>\n    <span>&nbsp;</span>\n  </p>\n  <div></div>", "exampleId": "166iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").mousemove(function(e){\n      var pageCoords = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      var clientCoords = \"( \" + e.clientX + \", \" + e.clientY + \" )\";\n      $(\"span:first\").text(\"( e.pageX, e.pageY ) - \" + pageCoords);\n      $(\"span:last\").text(\"( e.clientX, e.clientY ) - \" + clientCoords);\n    });\n\n  });\n</script>\n<style>\n\n  div { width:250px; height:170px; margin;10px; margin-right:50px;\n        background:yellow; border:2px groove; float:right; }\n  p { margin:0; margin-left:10px; color:red; width:250px;\n      height:120px; padding-top:70px;\n      float:left; font-size:14px; }\n  span { display:block; }\n  \n</style>\n</head>\n<body>\n<p>   \n    Try scrolling too.\n    <span>Move the mouse over the div.</span>\n    <span>&nbsp;</span>\n  </p>\n  <div></div>\n</body>\n</html>"}]}, "mouseout167": {"id": 167, "searchname": "mouseout", "name": "mouseout", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the mouseout event of each matched element.", "longdesc": "<p>The mouseout event fires when the pointing device is moved away from an element.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the mouseout event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    var i = 0;\n    $(\"div.overout\").mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n      $(\"p:last\",this).text(++i);\n    }).mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n      $(\"p:last\",this).text(++n);\n    });\n", "htmlCode": "\n    var i = 0;\n    $(\"div.overout\").mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n      $(\"p:last\",this).text(++i);\n    }).mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n      $(\"p:last\",this).text(++n);\n    });\n", "desc": "Show texts when mouseover and mouseout event triggering.\n<strong>Mouseout</strong> fires when pointer move into or out from child element, while <strong>mouseleave</strong> doesn't.", "css": "\ndiv.out {\nwidth:40%;\nheight:120px;\nmargin:0 15px;\nbackground-color:#D6EDFC;\nfloat:left;\n}\ndiv.in {\nwidth:60%;\nheight:60%;\nbackground-color:#FFCC00;\nmargin:10px auto;\n}\np {\nline-height:1em;\nmargin:0;\npadding:0;\n}\n", "inhead": "", "html": "\n<div class=\"out overout\"><p>move your mouse</p><div class=\"in overout\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n<div class=\"out enterleave\"><p>move your mouse</p><div class=\"in enterleave\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n", "exampleId": "167iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var i = 0;\n    $(\"div.overout\").mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n      $(\"p:last\",this).text(++i);\n    }).mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n      $(\"p:last\",this).text(++n);\n    });\n\n  });\n</script>\n<style>\n\ndiv.out {\nwidth:40%;\nheight:120px;\nmargin:0 15px;\nbackground-color:#D6EDFC;\nfloat:left;\n}\ndiv.in {\nwidth:60%;\nheight:60%;\nbackground-color:#FFCC00;\nmargin:10px auto;\n}\np {\nline-height:1em;\nmargin:0;\npadding:0;\n}\n\n</style>\n</head>\n<body>\n\n<div class=\"out overout\"><p>move your mouse</p><div class=\"in overout\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n<div class=\"out enterleave\"><p>move your mouse</p><div class=\"in enterleave\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n\n</body>\n</html>"}]}, "mouseover168": {"id": 168, "searchname": "mouseover", "name": "mouseover", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the mouseover event of each matched element.", "longdesc": "<p>The mouseover event fires when the pointing device is moved onto an element.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the mouseover event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    var i = 0;\n    $(\"div.overout\").mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n      $(\"p:last\",this).text(++i);\n    }).mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n      $(\"p:last\",this).text(++n);\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n    });\n", "htmlCode": "\n    var i = 0;\n    $(\"div.overout\").mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n      $(\"p:last\",this).text(++i);\n    }).mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n      $(\"p:last\",this).text(++n);\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n    });\n", "desc": "Show texts when mouseover and mouseout event triggering.\n<strong>Mouseover</strong> fires when the pointer moves into or out from child element, while <strong>mouseenter</strong> does't.", "css": "\ndiv.out {\nwidth:40%;\nheight:120px;\nmargin:0 15px;\nbackground-color:#D6EDFC;\nfloat:left;\n}\ndiv.in {\nwidth:60%;\nheight:60%;\nbackground-color:#FFCC00;\nmargin:10px auto;\n}\np {\nline-height:1em;\nmargin:0;\npadding:0;\n}\n", "inhead": "", "html": "\n<div class=\"out overout\"><p>move your mouse</p><div class=\"in overout\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n<div class=\"out enterleave\"><p>move your mouse</p><div class=\"in enterleave\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n", "exampleId": "168iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var i = 0;\n    $(\"div.overout\").mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n      $(\"p:last\",this).text(++i);\n    }).mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n      $(\"p:last\",this).text(++n);\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n    });\n\n  });\n</script>\n<style>\n\ndiv.out {\nwidth:40%;\nheight:120px;\nmargin:0 15px;\nbackground-color:#D6EDFC;\nfloat:left;\n}\ndiv.in {\nwidth:60%;\nheight:60%;\nbackground-color:#FFCC00;\nmargin:10px auto;\n}\np {\nline-height:1em;\nmargin:0;\npadding:0;\n}\n\n</style>\n</head>\n<body>\n\n<div class=\"out overout\"><p>move your mouse</p><div class=\"in overout\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n<div class=\"out enterleave\"><p>move your mouse</p><div class=\"in enterleave\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n\n</body>\n</html>"}]}, "mouseup169": {"id": 169, "searchname": "mouseup", "name": "mouseup", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the mouseup event of each matched element.", "longdesc": "<p>The mouseup event fires when the pointing device button is released over an element.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the mouseup event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").mouseup(function(){\n      $(this).append('<span style=\"color:#F00;\">Mouse up.</span>');\n    }).mousedown(function(){\n      $(this).append('<span style=\"color:#00F;\">Mouse down.</span>');\n    });\n", "htmlCode": "\n    $(\"p\").mouseup(function(){\n      $(this).append('&lt;span style=\"color:#F00;\"&gt;Mouse up.&lt;/span&gt;');\n    }).mousedown(function(){\n      $(this).append('&lt;span style=\"color:#00F;\"&gt;Mouse down.&lt;/span&gt;');\n    });\n", "desc": "Show texts when mouseup and mousedown event triggering.", "css": "", "inhead": "", "html": "<p>Press mouse and release here.</p>\n", "exampleId": "169iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").mouseup(function(){\n      $(this).append('<span style=\"color:#F00;\">Mouse up.</span>');\n    }).mousedown(function(){\n      $(this).append('<span style=\"color:#00F;\">Mouse down.</span>');\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Press mouse and release here.</p>\n\n</body>\n</html>"}]}, "resize170": {"id": 170, "searchname": "resize", "name": "resize", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the resize event of each matched element.", "longdesc": "<p>The resize event fires when a document view is resized</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the resize event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(window).resize(function(){\n  alert(\"Stop it!\");\n});", "htmlCode": "$(window).resize(function(){\n  alert(\"Stop it!\");\n});", "desc": "To make resizing the web page window a pain in the neck, try:", "css": "", "inhead": "", "html": "", "exampleId": "170iframeExample0", "runCode": ""}]}, "scroll171": {"id": 171, "searchname": "scroll", "name": "scroll", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the scroll event of each matched element.", "longdesc": "<p>The scroll event fires when a document view is scrolled.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the scroll event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(window).scroll(function () { \n      $(\"span\").css(\"display\", \"inline\").fadeOut(\"slow\"); \n    });\n", "htmlCode": "\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(window).scroll(function () { \n      $(\"span\").css(\"display\", \"inline\").fadeOut(\"slow\"); \n    });\n", "desc": "To do something when your page is scrolled:", "css": "\n  div { color:blue; }\n  p { color:green; }\n  span { color:red; display:none; }\n  ", "inhead": "", "html": "<div>Try scrolling the iframe.</div>\n  <p>Paragraph - <span>Scroll happened!</span></p>", "exampleId": "171iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(window).scroll(function () { \n      $(\"span\").css(\"display\", \"inline\").fadeOut(\"slow\"); \n    });\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  p { color:green; }\n  span { color:red; display:none; }\n  \n</style>\n</head>\n<body>\n<div>Try scrolling the iframe.</div>\n  <p>Paragraph - <span>Scroll happened!</span></p>\n</body>\n</html>"}]}, "select172": {"id": 172, "searchname": "select", "name": "select", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Trigger the select event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that select event to be executed, and calls the browser's default select action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the select event.</p><p>\nNote: Do not confuse the \"select\" event with the \"change\" event, which is the one triggered when an html \"select\" element is having its selected option modified by the user.</p>", "params": [], "examples": [{"code": "$(\"input\").select();", "htmlCode": "$(\"input\").select();", "desc": "To trigger the select event on all input elements, try:", "css": "", "inhead": "", "html": "", "exampleId": "172iframeExample0", "runCode": ""}]}, "select173": {"id": 173, "searchname": "select", "name": "select", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the select event of each matched element.", "longdesc": "<p>The select event fires when a user selects some text in a text field, including input and textarea.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the select event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(document).select( function () { \n      $(\"div\").text(\"Something was selected\").show().fadeOut(1000); \n    });\n", "htmlCode": "\n    $(document).select( function () { \n      $(\"div\").text(\"Something was selected\").show().fadeOut(1000); \n    });\n", "desc": "To do something when text in input boxes is selected:", "css": "\n  p { color:blue; }\n  div { color:red; }\n  ", "inhead": "", "html": "<p>\n    Click and drag the mouse to select text in the inputs.\n  </p>\n  <input type=\"text\" value=\"Some text\" />\n  <input type=\"text\" value=\"to test on\" />\n  <div></div>", "exampleId": "173iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document).select( function () { \n      $(\"div\").text(\"Something was selected\").show().fadeOut(1000); \n    });\n\n  });\n</script>\n<style>\n\n  p { color:blue; }\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<p>\n    Click and drag the mouse to select text in the inputs.\n  </p>\n  <input type=\"text\" value=\"Some text\" />\n  <input type=\"text\" value=\"to test on\" />\n  <div></div>\n</body>\n</html>"}]}, "submit174": {"id": 174, "searchname": "submit", "name": "submit", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Trigger the submit event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that submit event to be executed, and calls the browser's default submit action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the submit event.</p>", "params": [], "examples": [{"code": "$(\"form:first\").submit();", "htmlCode": "$(\"form:first\").submit();", "desc": "To trigger the submit event on the first form on the page, try:", "css": "", "inhead": "", "html": "", "exampleId": "174iframeExample0", "runCode": ""}]}, "submit175": {"id": 175, "searchname": "submit", "name": "submit", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the submit event of each matched element.", "longdesc": "<p>The select event fires when a form is submitted</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the submit event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"form\").submit(function() {\n      if ($(\"input:first\").val() == \"correct\") {\n        $(\"span\").text(\"Validated...\").show();\n        return true;\n      }\n      $(\"span\").text(\"Not valid!\").show().fadeOut(1000);\n      return false;\n    });\n", "htmlCode": "\n    $(\"form\").submit(function() {\n      if ($(\"input:first\").val() == \"correct\") {\n        $(\"span\").text(\"Validated...\").show();\n        return true;\n      }\n      $(\"span\").text(\"Not valid!\").show().fadeOut(1000);\n      return false;\n    });\n", "desc": "If you'd like to prevent forms from being submitted unless a flag variable is set, try:", "css": "\n  p { margin:0; color:blue; }\n  div,p { margin-left:10px; }\n  span { color:red; }\n  ", "inhead": "", "html": "<p>Type 'correct' to validate.</p>\n  <form action=\"javascript:alert('success!');\">\n    <div>\n      <input type=\"text\" />\n      <input type=\"submit\" />\n    </div>\n  </form>\n  <span></span>", "exampleId": "175iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"form\").submit(function() {\n      if ($(\"input:first\").val() == \"correct\") {\n        $(\"span\").text(\"Validated...\").show();\n        return true;\n      }\n      $(\"span\").text(\"Not valid!\").show().fadeOut(1000);\n      return false;\n    });\n\n  });\n</script>\n<style>\n\n  p { margin:0; color:blue; }\n  div,p { margin-left:10px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<p>Type 'correct' to validate.</p>\n  <form action=\"javascript:alert('success!');\">\n    <div>\n      <input type=\"text\" />\n      <input type=\"submit\" />\n    </div>\n  </form>\n  <span></span>\n</body>\n</html>"}, {"code": "$(\"form\").submit( function () {\n  return this.some_flag_variable;\n} );", "htmlCode": "$(\"form\").submit( function () {\n  return this.some_flag_variable;\n} );", "desc": "If you'd like to prevent forms from being submitted unless a flag variable is set, try:", "css": "", "inhead": "", "html": "", "exampleId": "175iframeExample1", "runCode": ""}]}, "unload176": {"id": 176, "searchname": "unload", "name": "unload", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the unload event of each matched element.", "longdesc": "", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "function to bind to the unload event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(window).unload( function () { alert(\"Bye now!\"); } );", "htmlCode": "$(window).unload( function () { alert(\"Bye now!\"); } );", "desc": "To display an alert when a page is unloaded:", "css": "", "inhead": "", "html": "", "exampleId": "176iframeExample0", "runCode": ""}]}, "show177": {"id": 177, "searchname": "show", "name": "show", "type": "function", "category": "Effects", "subcategory": "Basics", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Displays each of the set of matched elements if they are hidden.", "longdesc": "<p>Same as <a href='Effects/show#speedcallback'>show( speed, [callback] )</a> without animations. Doesn't change anything if the selected elements are all visible. It doesn't matter if the element is hidden via a hide() call, or via a display:none in a stylesheet.</p>", "params": [], "examples": [{"code": "$(\"p\").show()", "htmlCode": "$(\"p\").show()", "desc": "Shows all paragraphs.", "css": "", "inhead": "", "html": "<p style=\"display:none\">Hello</p>", "exampleId": "177iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").show()\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p style=\"display:none\">Hello</p>\n</body>\n</html>"}]}, "show178": {"id": 178, "searchname": "show", "name": "show", "type": "function", "category": "Effects", "subcategory": "Basics", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Show all matched elements using a graceful animation and firing an optional callback after completion.", "longdesc": "<p>The height, width, and opacity of each of the matched elements are changed dynamically according to the specified speed.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").show(\"slow\");\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").show(\"slow\");\n    });\n", "desc": "Animates all hidden paragraphs to show slowly, completing the animation within 600 milliseconds.", "css": "\n  p { background:yellow; }\n  ", "inhead": "", "html": "<button>Show it</button>\n  <p style=\"display: none\">Hello</p>", "exampleId": "178iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").show(\"slow\");\n    });\n\n  });\n</script>\n<style>\n\n  p { background:yellow; }\n  \n</style>\n</head>\n<body>\n<button>Show it</button>\n  <p style=\"display: none\">Hello</p>\n</body>\n</html>"}, {"code": "\n    $(\"#showr\").click(function () {\n      $(\"div:eq(0)\").show(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).next().show(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#hidr\").click(function () {\n      $(\"div\").hide(2000);\n    });\n", "htmlCode": "\n    $(\"#showr\").click(function () {\n      $(\"div:eq(0)\").show(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).next().show(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#hidr\").click(function () {\n      $(\"div\").hide(2000);\n    });\n", "desc": "Animates all hidden divs to show fastly in order, completing each animation within 200 milliseconds. Once each animation is done, it starts the next one.", "css": "\n  div { background:#def3ca; margin:3px; width:80px; \n        display:none; float:left; text-align:center; }\n  ", "inhead": "", "html": "<button id=\"showr\">Show</button>\n  <button id=\"hidr\">Hide</button>\n  <div>Hello,</div>\n  <div>how</div>\n  <div>are</div>\n  <div>you?</div>", "exampleId": "178iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#showr\").click(function () {\n      $(\"div:eq(0)\").show(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).next().show(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#hidr\").click(function () {\n      $(\"div\").hide(2000);\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#def3ca; margin:3px; width:80px; \n        display:none; float:left; text-align:center; }\n  \n</style>\n</head>\n<body>\n<button id=\"showr\">Show</button>\n  <button id=\"hidr\">Hide</button>\n  <div>Hello,</div>\n  <div>how</div>\n  <div>are</div>\n  <div>you?</div>\n</body>\n</html>"}, {"code": "\n    function doIt() {\n      $(\"span,div\").show(\"normal\");\n    }\n    $(\"button\").click(doIt); // can pass in function name\n    $(\"form\").submit(function () {\n      if ($(\"input\").val() == \"yes\") {\n        $(\"p\").show(4000, function () {\n          $(this).text(\"Ok, DONE! (now showing)\");\n        });\n      }\n      $(\"span,div\").hide(\"normal\");\n      return false; // to stop the submit\n    });\n", "htmlCode": "\n    function doIt() {\n      $(\"span,div\").show(\"normal\");\n    }\n    $(\"button\").click(doIt); // can pass in function name\n    $(\"form\").submit(function () {\n      if ($(\"input\").val() == \"yes\") {\n        $(\"p\").show(4000, function () {\n          $(this).text(\"Ok, DONE! (now showing)\");\n        });\n      }\n      $(\"span,div\").hide(\"normal\");\n      return false; // to stop the submit\n    });\n", "desc": "Animates all span and input elements to show normally. Once the animation is done, it changes the text.", "css": "\n  span { display:none; }\n  div { display:none; }\n  p { font-weight:bold; background-color:#fcd; }\n  ", "inhead": "", "html": "<button>Do it!</button>\n  <span>Are you sure? (type 'yes' if you are) </span>\n  <div>\n    <form>\n      <input type=\"text\" />\n    </form>\n  </div>\n  <p style=\"display:none;\">I'm hidden...</p>", "exampleId": "178iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function doIt() {\n      $(\"span,div\").show(\"normal\");\n    }\n    $(\"button\").click(doIt); // can pass in function name\n    $(\"form\").submit(function () {\n      if ($(\"input\").val() == \"yes\") {\n        $(\"p\").show(4000, function () {\n          $(this).text(\"Ok, DONE! (now showing)\");\n        });\n      }\n      $(\"span,div\").hide(\"normal\");\n      return false; // to stop the submit\n    });\n\n  });\n</script>\n<style>\n\n  span { display:none; }\n  div { display:none; }\n  p { font-weight:bold; background-color:#fcd; }\n  \n</style>\n</head>\n<body>\n<button>Do it!</button>\n  <span>Are you sure? (type 'yes' if you are) </span>\n  <div>\n    <form>\n      <input type=\"text\" />\n    </form>\n  </div>\n  <p style=\"display:none;\">I'm hidden...</p>\n</body>\n</html>"}]}, "hide179": {"id": 179, "searchname": "hide", "name": "hide", "type": "function", "category": "Effects", "subcategory": "Basics", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Hides each of the set of matched elements if they are shown.", "longdesc": "<p>Same as <a href='Effects/hide#speedcallback'>hide( speed, [callback] )</a> without animations. Doesn't change anything if the selected elements are all hidden.</p>", "params": [], "examples": [{"code": "\n    $(\"p\").hide();\n    $(\"a\").click(function () {\n      $(this).hide();\n      return false;\n    });\n", "htmlCode": "\n    $(\"p\").hide();\n    $(\"a\").click(function () {\n      $(this).hide();\n      return false;\n    });\n", "desc": "Hides all paragraphs then the link on click.", "css": "", "inhead": "", "html": "<p>Hello</p>\n  <a href=\"#\">Click to hide me too</a>\n  <p>Here is another paragraph</p>", "exampleId": "179iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").hide();\n    $(\"a\").click(function () {\n      $(this).hide();\n      return false;\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <a href=\"#\">Click to hide me too</a>\n  <p>Here is another paragraph</p>\n</body>\n</html>"}]}, "hide180": {"id": 180, "searchname": "hide", "name": "hide", "type": "function", "category": "Effects", "subcategory": "Basics", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Hide all matched elements using a graceful animation and firing an optional callback after completion.", "longdesc": "<p>The height, width, and opacity of each of the matched elements are changed dynamically according to the specified speed.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").hide(\"slow\");\n    });    \n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").hide(\"slow\");\n    });    \n", "desc": "Animates all shown paragraphs to hide slowly, completing the animation within 600 milliseconds.", "css": "\n  p { background:#dad; font-weight:bold; }\n  ", "inhead": "", "html": "<button>Hide 'em</button>\n  <p>Hiya</p>\n  <p>Such interesting text, eh?</p>", "exampleId": "180iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").hide(\"slow\");\n    });    \n\n  });\n</script>\n<style>\n\n  p { background:#dad; font-weight:bold; }\n  \n</style>\n</head>\n<body>\n<button>Hide 'em</button>\n  <p>Hiya</p>\n  <p>Such interesting text, eh?</p>\n</body>\n</html>"}, {"code": "\n    $(\"#hidr\").click(function () {\n      $(\"span:last-child\").hide(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).prev().hide(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#showr\").click(function () {\n      $(\"span\").show(2000);\n    });\n", "htmlCode": "\n    $(\"#hidr\").click(function () {\n      $(\"span:last-child\").hide(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).prev().hide(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#showr\").click(function () {\n      $(\"span\").show(2000);\n    });\n", "desc": "Animates all spans (words in this case) to hide fastly, completing each animation within 200 milliseconds. Once each animation is done, it starts the next one.", "css": "\n  span { background:#def3ca; padding:3px; float:left; }\n  ", "inhead": "", "html": "<button id=\"hidr\">Hide</button>\n  <button id=\"showr\">Show</button>\n  <div>\n    <span>Once</span> <span>upon</span> <span>a</span> \n    <span>time</span> <span>there</span> <span>were</span> \n    <span>three</span> <span>programmers...</span>\n  </div>", "exampleId": "180iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#hidr\").click(function () {\n      $(\"span:last-child\").hide(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).prev().hide(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#showr\").click(function () {\n      $(\"span\").show(2000);\n    });\n\n  });\n</script>\n<style>\n\n  span { background:#def3ca; padding:3px; float:left; }\n  \n</style>\n</head>\n<body>\n<button id=\"hidr\">Hide</button>\n  <button id=\"showr\">Show</button>\n  <div>\n    <span>Once</span> <span>upon</span> <span>a</span> \n    <span>time</span> <span>there</span> <span>were</span> \n    <span>three</span> <span>programmers...</span>\n  </div>\n</body>\n</html>"}, {"code": "\n    for (var i = 0; i < 5; i++) {\n      $(\"<div>\").appendTo(document.body);\n    }\n    $(\"div\").click(function () {\n      $(this).hide(2000, function () {\n        $(this).remove();\n      });\n    });\n", "htmlCode": "\n    for (var i = 0; i &lt; 5; i++) {\n      $(\"&lt;div&gt;\").appendTo(document.body);\n    }\n    $(\"div\").click(function () {\n      $(this).hide(2000, function () {\n        $(this).remove();\n      });\n    });\n", "desc": "Hides the divs when clicked over 2 seconds, then removes the div element when its hidden.  Try clicking on more than one box at a time.", "css": "\n  div { background:#ece0fb; width:30px; \n        height:40px; margin:2px; float:left; }\n  ", "inhead": "", "html": "<div></div>", "exampleId": "180iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    for (var i = 0; i < 5; i++) {\n      $(\"<div>\").appendTo(document.body);\n    }\n    $(\"div\").click(function () {\n      $(this).hide(2000, function () {\n        $(this).remove();\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#ece0fb; width:30px; \n        height:40px; margin:2px; float:left; }\n  \n</style>\n</head>\n<body>\n<div></div>\n</body>\n</html>"}]}, "toggle181": {"id": 181, "searchname": "toggle", "name": "toggle", "type": "function", "category": "Effects", "subcategory": "Basics", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Toggles displaying each of the set of matched elements.", "longdesc": "<p>If they are shown, toggle makes them hidden. If they are hidden, toggle makes them shown.</p>", "params": [], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").toggle();\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").toggle();\n    });\n", "desc": "Toggles all paragraphs.", "css": "", "inhead": "", "html": "<button>Toggle</button>\n  <p>Hello</p>\n  <p style=\"display: none\">Good Bye</p>", "exampleId": "181iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").toggle();\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<button>Toggle</button>\n  <p>Hello</p>\n  <p style=\"display: none\">Good Bye</p>\n</body>\n</html>"}]}, "slidedown182": {"id": 182, "searchname": "slidedown", "name": "slideDown", "type": "function", "category": "Effects", "subcategory": "Sliding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Reveal all matched elements by adjusting their height and firing an optional callback after completion.", "longdesc": "<p>Only the height is adjusted for this animation, causing all matched elements to be revealed in a \"sliding\" manner.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").slideDown(\"slow\");\n      } else {\n        $(\"div\").hide();\n      }\n    });\n", "htmlCode": "\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").slideDown(\"slow\");\n      } else {\n        $(\"div\").hide();\n      }\n    });\n", "desc": "Animates all divs to slide down and show themselves over 600 milliseconds.", "css": "\n  div { background:#de9a44; margin:3px; width:80px; \n        height:40px; display:none; float:left; }\n  ", "inhead": "", "html": "Click me!\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "182iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").slideDown(\"slow\");\n      } else {\n        $(\"div\").hide();\n      }\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#de9a44; margin:3px; width:80px; \n        height:40px; display:none; float:left; }\n  \n</style>\n</head>\n<body>\nClick me!\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    $(\"div\").click(function () {\n      $(this).css({ borderStyle:\"inset\", cursor:\"wait\" });\n      $(\"input\").slideDown(1000,function(){\n        $(this).css(\"border\", \"2px red inset\")\n               .filter(\".middle\")\n                 .css(\"background\", \"yellow\")\n                 .focus();\n        $(\"div\").css(\"visibility\", \"hidden\");\n      });\n    });\n", "htmlCode": "\n    $(\"div\").click(function () {\n      $(this).css({ borderStyle:\"inset\", cursor:\"wait\" });\n      $(\"input\").slideDown(1000,function(){\n        $(this).css(\"border\", \"2px red inset\")\n               .filter(\".middle\")\n                 .css(\"background\", \"yellow\")\n                 .focus();\n        $(\"div\").css(\"visibility\", \"hidden\");\n      });\n    });\n", "desc": "Animates all inputs to slide down, completing the animation within 1000 milliseconds. Once the animation is done, the input look is changed especially if it is the middle input which gets the focus.", "css": "\n  div { background:#cfd; margin:3px; width:50px; \n        text-align:center; float:left; cursor:pointer;\n        border:2px outset black; font-weight:bolder; }\n  input { display:none; width:120px; float:left; \n          margin:10px; }\n  ", "inhead": "", "html": "<div>Push!</div>\n  <input type=\"text\" />\n  <input type=\"text\" class=\"middle\" />\n  <input type=\"text\" />", "exampleId": "182iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").click(function () {\n      $(this).css({ borderStyle:\"inset\", cursor:\"wait\" });\n      $(\"input\").slideDown(1000,function(){\n        $(this).css(\"border\", \"2px red inset\")\n               .filter(\".middle\")\n                 .css(\"background\", \"yellow\")\n                 .focus();\n        $(\"div\").css(\"visibility\", \"hidden\");\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#cfd; margin:3px; width:50px; \n        text-align:center; float:left; cursor:pointer;\n        border:2px outset black; font-weight:bolder; }\n  input { display:none; width:120px; float:left; \n          margin:10px; }\n  \n</style>\n</head>\n<body>\n<div>Push!</div>\n  <input type=\"text\" />\n  <input type=\"text\" class=\"middle\" />\n  <input type=\"text\" />\n</body>\n</html>"}]}, "slideup183": {"id": 183, "searchname": "slideup", "name": "slideUp", "type": "function", "category": "Effects", "subcategory": "Sliding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Hide all matched elements by adjusting their height and firing an optional callback after completion.", "longdesc": "<p>Only the height is adjusted for this animation, causing all matched elements to be hidden in a \"sliding\" manner.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").show(\"slow\");\n      } else {\n        $(\"div\").slideUp();\n      }\n    });\n", "htmlCode": "\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").show(\"slow\");\n      } else {\n        $(\"div\").slideUp();\n      }\n    });\n", "desc": "Animates all divs to slide up, completing the animation within 400 milliseconds.", "css": "\n  div { background:#3d9a44; margin:3px; width:80px; \n        height:40px; float:left; }\n  ", "inhead": "", "html": "Click me!\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "183iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").show(\"slow\");\n      } else {\n        $(\"div\").slideUp();\n      }\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#3d9a44; margin:3px; width:80px; \n        height:40px; float:left; }\n  \n</style>\n</head>\n<body>\nClick me!\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    $(\"button\").click(function () {\n      $(this).parent().slideUp(\"slow\", function () {\n        $(\"#msg\").text($(\"button\", this).text() + \" has completed.\");\n      });\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(this).parent().slideUp(\"slow\", function () {\n        $(\"#msg\").text($(\"button\", this).text() + \" has completed.\");\n      });\n    });\n", "desc": "Animates all paragraph to slide up, completing the animation within 200 milliseconds. Once the animation is done, it displays an alert.", "css": "\n  div { margin:2px; }\n  ", "inhead": "", "html": "<div>\n    <button>Hide One</button>\n    <input type=\"text\" value=\"One\" />\n  </div>\n  <div>\n    <button>Hide Two</button>\n    <input type=\"text\" value=\"Two\" />\n  </div>\n  <div>\n    <button>Hide Three</button>\n    <input type=\"text\" value=\"Three\" />\n  </div>\n  <div id=\"msg\"></div>", "exampleId": "183iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(this).parent().slideUp(\"slow\", function () {\n        $(\"#msg\").text($(\"button\", this).text() + \" has completed.\");\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:2px; }\n  \n</style>\n</head>\n<body>\n<div>\n    <button>Hide One</button>\n    <input type=\"text\" value=\"One\" />\n  </div>\n  <div>\n    <button>Hide Two</button>\n    <input type=\"text\" value=\"Two\" />\n  </div>\n  <div>\n    <button>Hide Three</button>\n    <input type=\"text\" value=\"Three\" />\n  </div>\n  <div id=\"msg\"></div>\n</body>\n</html>"}]}, "slidetoggle184": {"id": 184, "searchname": "slidetoggle", "name": "slideToggle", "type": "function", "category": "Effects", "subcategory": "Sliding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Toggle the visibility of all matched elements by adjusting their height and firing an optional callback after completion.", "longdesc": "<p>Only the height is adjusted for this animation, causing all matched elements to be hidden or shown in a \"sliding\" manner.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").slideToggle(\"slow\");\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").slideToggle(\"slow\");\n    });\n", "desc": "Animates all paragraphs to slide up or down, completing the animation within 600 milliseconds.", "css": "\n  p { width:400px; }\n  ", "inhead": "", "html": "<button>Toggle</button>\n  <p>\n    This is the paragraph to end all paragraphs.  You\n    should feel <em>lucky</em> to have seen such a paragraph in\n    your life.  Congratulations!\n  </p>", "exampleId": "184iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").slideToggle(\"slow\");\n    });\n\n  });\n</script>\n<style>\n\n  p { width:400px; }\n  \n</style>\n</head>\n<body>\n<button>Toggle</button>\n  <p>\n    This is the paragraph to end all paragraphs.  You\n    should feel <em>lucky</em> to have seen such a paragraph in\n    your life.  Congratulations!\n  </p>\n</body>\n</html>"}, {"code": "\n    $(\"button\").click(function () {\n      $(\"div:not(.still)\").slideToggle(\"slow\", function () {\n        var n = parseInt($(\"span\").text(), 10);\n        $(\"span\").text(n + 1);\n      });\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"div:not(.still)\").slideToggle(\"slow\", function () {\n        var n = parseInt($(\"span\").text(), 10);\n        $(\"span\").text(n + 1);\n      });\n    });\n", "desc": "Animates divs between dividers with a toggle that makes some appear and some disappear.", "css": "\n  div { background:#b977d1; margin:3px; width:60px; \n        height:60px; float:left; }\n  div.still { background:#345; width:5px; }\n  div.hider { display:none; }\n  span { color:red; }\n  ", "inhead": "", "html": "<button>Toggle</button> There have been <span>0</span> toggled divs.\n  <div></div><div class=\"still\"></div>\n  <div style=\"display:none;\"></div><div class=\"still\"></div>\n  <div></div><div class=\"still\"></div>\n  <div class=\"hider\"></div><div class=\"still\"></div>\n  <div class=\"hider\"></div><div class=\"still\"></div>\n  <div></div>", "exampleId": "184iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"div:not(.still)\").slideToggle(\"slow\", function () {\n        var n = parseInt($(\"span\").text(), 10);\n        $(\"span\").text(n + 1);\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#b977d1; margin:3px; width:60px; \n        height:60px; float:left; }\n  div.still { background:#345; width:5px; }\n  div.hider { display:none; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<button>Toggle</button> There have been <span>0</span> toggled divs.\n  <div></div><div class=\"still\"></div>\n  <div style=\"display:none;\"></div><div class=\"still\"></div>\n  <div></div><div class=\"still\"></div>\n  <div class=\"hider\"></div><div class=\"still\"></div>\n  <div class=\"hider\"></div><div class=\"still\"></div>\n  <div></div>\n</body>\n</html>"}]}, "fadein185": {"id": 185, "searchname": "fadein", "name": "fadeIn", "type": "function", "category": "Effects", "subcategory": "Fading", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Fade in all matched elements by adjusting their opacity and firing an optional callback after completion.", "longdesc": "<p>Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(document.body).click(function () {\n      $(\"div:hidden:first\").fadeIn(\"slow\");\n    });\n", "htmlCode": "\n    $(document.body).click(function () {\n      $(\"div:hidden:first\").fadeIn(\"slow\");\n    });\n", "desc": "Animates hidden divs to fade in one by one, completing each animation within 600 milliseconds.", "css": "\n  span { color:red; cursor:pointer; }\n  div { margin:3px; width:80px; display:none;\n        height:80px; float:left; }\n  div#one { background:#f00; }\n  div#two { background:#0f0; }\n  div#three { background:#00f; }\n  ", "inhead": "", "html": "<span>Click here...</span>\n  <div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>", "exampleId": "185iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function () {\n      $(\"div:hidden:first\").fadeIn(\"slow\");\n    });\n\n  });\n</script>\n<style>\n\n  span { color:red; cursor:pointer; }\n  div { margin:3px; width:80px; display:none;\n        height:80px; float:left; }\n  div#one { background:#f00; }\n  div#two { background:#0f0; }\n  div#three { background:#00f; }\n  \n</style>\n</head>\n<body>\n<span>Click here...</span>\n  <div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>\n</body>\n</html>"}, {"code": "\n    $(\"a\").click(function () {\n      $(\"div\").fadeIn(3000, function () {\n        $(\"span\").fadeIn(100);\n      });\n      return false;\n    }); \n", "htmlCode": "\n    $(\"a\").click(function () {\n      $(\"div\").fadeIn(3000, function () {\n        $(\"span\").fadeIn(100);\n      });\n      return false;\n    }); \n", "desc": "Fades a red block in over the text. Once the animation is done, it quickly fades in more text on top.", "css": "\n  p { position:relative; width:400px; height:90px; }\n  div { position:absolute; width:400px; height:65px; \n        font-size:36px; text-align:center; \n        color:yellow; background:red;\n        padding-top:25px; \n        top:0; left:0; display:none; }\n  span { display:none; }\n  ", "inhead": "", "html": "<p>\n    Let it be known that the party of the first part\n    and the party of the second part are henceforth\n    and hereto directed to assess the allegations\n    for factual correctness... (<a href=\"#\">click!</a>)\n    <div><span>CENSORED!</span></div>\n  </p>", "exampleId": "185iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"a\").click(function () {\n      $(\"div\").fadeIn(3000, function () {\n        $(\"span\").fadeIn(100);\n      });\n      return false;\n    }); \n\n  });\n</script>\n<style>\n\n  p { position:relative; width:400px; height:90px; }\n  div { position:absolute; width:400px; height:65px; \n        font-size:36px; text-align:center; \n        color:yellow; background:red;\n        padding-top:25px; \n        top:0; left:0; display:none; }\n  span { display:none; }\n  \n</style>\n</head>\n<body>\n<p>\n    Let it be known that the party of the first part\n    and the party of the second part are henceforth\n    and hereto directed to assess the allegations\n    for factual correctness... (<a href=\"#\">click!</a>)\n    <div><span>CENSORED!</span></div>\n  </p>\n</body>\n</html>"}]}, "fadeout186": {"id": 186, "searchname": "fadeout", "name": "fadeOut", "type": "function", "category": "Effects", "subcategory": "Fading", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Fade out all matched elements by adjusting their opacity and firing an optional callback after completion.", "longdesc": "<p>Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").click(function () {\n      $(\"p\").fadeOut(\"slow\");\n    });\n", "htmlCode": "\n    $(\"p\").click(function () {\n      $(\"p\").fadeOut(\"slow\");\n    });\n", "desc": "Animates all paragraphs to fade out, completing the animation within 600 milliseconds.", "css": "\n  p { font-size:150%; cursor:pointer; }\n  ", "inhead": "", "html": "<p>\n    If you click on this paragraph\n    you'll see it just fade away.\n  </p>", "exampleId": "186iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () {\n      $(\"p\").fadeOut(\"slow\");\n    });\n\n  });\n</script>\n<style>\n\n  p { font-size:150%; cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<p>\n    If you click on this paragraph\n    you'll see it just fade away.\n  </p>\n</body>\n</html>"}, {"code": "\n    $(\"span\").click(function () {\n      $(this).fadeOut(1000, function () {\n        $(\"div\").text(\"'\" + $(this).text() + \"' has faded!\");\n        $(this).remove();\n      });\n    });\n    $(\"span\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n", "htmlCode": "\n    $(\"span\").click(function () {\n      $(this).fadeOut(1000, function () {\n        $(\"div\").text(\"'\" + $(this).text() + \"' has faded!\");\n        $(this).remove();\n      });\n    });\n    $(\"span\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n", "desc": "Fades out spans in one section that you click on.", "css": "\n  span { cursor:pointer; }\n  span.hilite { background:yellow; }\n  div { display:inline; color:red; }\n  ", "inhead": "", "html": "<h3>Find the modifiers - <div></div></h3>\n  <p>\n    If you <span>really</span> want to go outside\n    <span>in the cold</span> then make sure to wear\n    your <span>warm</span> jacket given to you by\n    your <span>favorite</span> teacher.\n  </p>", "exampleId": "186iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"span\").click(function () {\n      $(this).fadeOut(1000, function () {\n        $(\"div\").text(\"'\" + $(this).text() + \"' has faded!\");\n        $(this).remove();\n      });\n    });\n    $(\"span\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n\n  });\n</script>\n<style>\n\n  span { cursor:pointer; }\n  span.hilite { background:yellow; }\n  div { display:inline; color:red; }\n  \n</style>\n</head>\n<body>\n<h3>Find the modifiers - <div></div></h3>\n  <p>\n    If you <span>really</span> want to go outside\n    <span>in the cold</span> then make sure to wear\n    your <span>warm</span> jacket given to you by\n    your <span>favorite</span> teacher.\n  </p>\n</body>\n</html>"}]}, "fadeto187": {"id": 187, "searchname": "fadeto", "name": "fadeTo", "type": "function", "category": "Effects", "subcategory": "Fading", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Fade the opacity of all matched elements to a specified opacity and firing an optional callback after completion.", "longdesc": "<p>Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": false, "name": "opacity", "type": "Number ", "desc": "The opacity to fade to (a number from 0 to 1)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executed once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p:first\").click(function () {\n      $(this).fadeTo(\"slow\", 0.33);\n    });\n", "htmlCode": "\n    $(\"p:first\").click(function () {\n      $(this).fadeTo(\"slow\", 0.33);\n    });\n", "desc": "Animates first paragraph to fade to an opacity of 0.33 (33%, about one third visible), completing the animation within 600 milliseconds.", "css": "", "inhead": "", "html": "<p>\n    Click this paragraph to see it fade.\n  </p>\n  <p>\n    Compare to this one that won't fade.\n  </p>", "exampleId": "187iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p:first\").click(function () {\n      $(this).fadeTo(\"slow\", 0.33);\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>\n    Click this paragraph to see it fade.\n  </p>\n  <p>\n    Compare to this one that won't fade.\n  </p>\n</body>\n</html>"}, {"code": "\n    $(\"div\").click(function () {\n      $(this).fadeTo(\"fast\", Math.random());\n    });\n", "htmlCode": "\n    $(\"div\").click(function () {\n      $(this).fadeTo(\"fast\", Math.random());\n    });\n", "desc": "Fade div to a random opacity on each click, completing the animation within 200 milliseconds.", "css": "\n  p { width:80px; margin:0; padding:5px; }\n  div { width:40px; height:40px; position:absolute; }\n  div#one { top:0; left:0; background:#f00; }\n  div#two { top:20px; left:20px; background:#0f0; }\n  div#three { top:40px; left:40px; background:#00f; }\n  ", "inhead": "", "html": "<p>And this is the library that John built...</p>\n  <div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>", "exampleId": "187iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").click(function () {\n      $(this).fadeTo(\"fast\", Math.random());\n    });\n\n  });\n</script>\n<style>\n\n  p { width:80px; margin:0; padding:5px; }\n  div { width:40px; height:40px; position:absolute; }\n  div#one { top:0; left:0; background:#f00; }\n  div#two { top:20px; left:20px; background:#0f0; }\n  div#three { top:40px; left:40px; background:#00f; }\n  \n</style>\n</head>\n<body>\n<p>And this is the library that John built...</p>\n  <div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>\n</body>\n</html>"}, {"code": "\n    var getPos = function (n) {\n      return (Math.floor(n) * 90) + \"px\";\n    };\n    $(\"p\").each(function (n) {\n      var r = Math.floor(Math.random() * 3);\n      var tmp = $(this).text();\n      $(this).text($(\"p:eq(\" + r + \")\").text());\n      $(\"p:eq(\" + r + \")\").text(tmp);\n      $(this).css(\"left\", getPos(n));\n    });\n    $(\"div\").each(function (n) {\n                  $(this).css(\"left\", getPos(n));\n                })\n            .css(\"cursor\", \"pointer\")\n            .click(function () {\n                  $(this).fadeTo(250, 0.25, function () {\n                        $(this).css(\"cursor\", \"\")\n                               .prev().css({\"font-weight\": \"bolder\",\n                                            \"font-style\": \"italic\"});\n                      });\n                });\n", "htmlCode": "\n    var getPos = function (n) {\n      return (Math.floor(n) * 90) + \"px\";\n    };\n    $(\"p\").each(function (n) {\n      var r = Math.floor(Math.random() * 3);\n      var tmp = $(this).text();\n      $(this).text($(\"p:eq(\" + r + \")\").text());\n      $(\"p:eq(\" + r + \")\").text(tmp);\n      $(this).css(\"left\", getPos(n));\n    });\n    $(\"div\").each(function (n) {\n                  $(this).css(\"left\", getPos(n));\n                })\n            .css(\"cursor\", \"pointer\")\n            .click(function () {\n                  $(this).fadeTo(250, 0.25, function () {\n                        $(this).css(\"cursor\", \"\")\n                               .prev().css({\"font-weight\": \"bolder\",\n                                            \"font-style\": \"italic\"});\n                      });\n                });\n", "desc": "Find the right answer!  The fade will take 250 milliseconds and change various styles when it completes.", "css": "\n  div, p { width:80px; height:40px; top:0; margin:0; \n           position:absolute; padding-top:8px; }\n  p { background:#fcc; text-align:center; }\n  div { background:blue; }\n  ", "inhead": "", "html": "<p>Wrong</p>\n  <div></div>\n  <p>Wrong</p>\n  <div></div>\n  <p>Right!</p>\n  <div></div>", "exampleId": "187iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var getPos = function (n) {\n      return (Math.floor(n) * 90) + \"px\";\n    };\n    $(\"p\").each(function (n) {\n      var r = Math.floor(Math.random() * 3);\n      var tmp = $(this).text();\n      $(this).text($(\"p:eq(\" + r + \")\").text());\n      $(\"p:eq(\" + r + \")\").text(tmp);\n      $(this).css(\"left\", getPos(n));\n    });\n    $(\"div\").each(function (n) {\n                  $(this).css(\"left\", getPos(n));\n                })\n            .css(\"cursor\", \"pointer\")\n            .click(function () {\n                  $(this).fadeTo(250, 0.25, function () {\n                        $(this).css(\"cursor\", \"\")\n                               .prev().css({\"font-weight\": \"bolder\",\n                                            \"font-style\": \"italic\"});\n                      });\n                });\n\n  });\n</script>\n<style>\n\n  div, p { width:80px; height:40px; top:0; margin:0; \n           position:absolute; padding-top:8px; }\n  p { background:#fcc; text-align:center; }\n  div { background:blue; }\n  \n</style>\n</head>\n<body>\n<p>Wrong</p>\n  <div></div>\n  <p>Wrong</p>\n  <div></div>\n  <p>Right!</p>\n  <div></div>\n</body>\n</html>"}]}, "animate188": {"id": 188, "searchname": "animate", "name": "animate", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.0", "sample": "", "desc": "A function for making your own, custom animations...", "longdesc": "<p>The key aspect of this function is the object of style properties that will be animated, and to what end. Each key within the object represents a style property that will also be animated (for example: \"height\", \"top\", or \"opacity\").</p><p>Note that properties should be specified using camel case eg. marginLeft instead of margin-left.</p><p>The value associated with the key represents to what end the property will be animated. If a number is provided as the value, then the style property will be transitioned from its current state to that new number. Otherwise if the string \"hide\", \"show\", or \"toggle\" is provided, a default animation will be constructed for that property.  Only properties that take numeric values are supported (e.g. backgroundColor is not supported by animate()).</p><p>As of jQuery 1.2 you can now animate properties by em and % (where applicable). Additionally, in jQuery 1.2, you can now do relative animations - specifying a \"<em>+=</em>\" or \"<em>-=</em>\" in front of the property value to move the element positively, or negatively, relative to the current position.</p>", "params": [{"optional": false, "name": "params", "type": "Options", "desc": "A set of style attributes that you wish to animate, and to what end."}, {"optional": true, "name": "duration", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "easing", "type": "String ", "desc": "The name of the easing effect that you want to use (Plugin Required). There are two built-in values, \"linear\" and \"swing\"."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against."}], "options": [], "examples": [{"code": "\n    // Using multiple unit types within one animation.\n    $(\"#go\").click(function(){\n      $(\"#block\").animate({ \n        width: \"70%\",\n        opacity: 0.4,\n        marginLeft: \"0.6in\",\n        fontSize: \"3em\", \n        borderWidth: \"10px\"\n      }, 1500 );\n    });\n", "htmlCode": "\n    // Using multiple unit types within one animation.\n    $(\"#go\").click(function(){\n      $(\"#block\").animate({ \n        width: \"70%\",\n        opacity: 0.4,\n        marginLeft: \"0.6in\",\n        fontSize: \"3em\", \n        borderWidth: \"10px\"\n      }, 1500 );\n    });\n", "desc": "Click the button to animate the div with a number of different properties.", "css": "\n  div { \n    background-color:#bca; \n    width:100px; \n    border:1px solid green;\n  }\n  ", "inhead": "", "html": "<button id=\"go\">&raquo; Run</button>\n  <div id=\"block\">Hello!</div>", "exampleId": "188iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    // Using multiple unit types within one animation.\n    $(\"#go\").click(function(){\n      $(\"#block\").animate({ \n        width: \"70%\",\n        opacity: 0.4,\n        marginLeft: \"0.6in\",\n        fontSize: \"3em\", \n        borderWidth: \"10px\"\n      }, 1500 );\n    });\n\n  });\n</script>\n<style>\n\n  div { \n    background-color:#bca; \n    width:100px; \n    border:1px solid green;\n  }\n  \n</style>\n</head>\n<body>\n<button id=\"go\">&raquo; Run</button>\n  <div id=\"block\">Hello!</div>\n</body>\n</html>"}, {"code": "\n    $(\"#right\").click(function(){\n      $(\".block\").animate({\"left\": \"+=50px\"}, \"slow\");\n    });\n\n    $(\"#left\").click(function(){\n      $(\".block\").animate({\"left\": \"-=50px\"}, \"slow\");\n    });\n", "htmlCode": "\n    $(\"#right\").click(function(){\n      $(\".block\").animate({\"left\": \"+=50px\"}, \"slow\");\n    });\n\n    $(\"#left\").click(function(){\n      $(\".block\").animate({\"left\": \"-=50px\"}, \"slow\");\n    });\n", "desc": "Shows a div animate with a relative move.  Click several times on the buttons to see the relative animations queued up.", "css": "\n  div { \n    position:absolute; \n    background-color:#abc; \n    left:50px;\n    width:90px; \n    height:90px;\n    margin:5px; \n  }\n  ", "inhead": "", "html": "<button id=\"left\">&laquo;</button> <button id=\"right\">&raquo;</button>\n<div class=\"block\"></div>\n", "exampleId": "188iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#right\").click(function(){\n      $(\".block\").animate({\"left\": \"+=50px\"}, \"slow\");\n    });\n\n    $(\"#left\").click(function(){\n      $(\".block\").animate({\"left\": \"-=50px\"}, \"slow\");\n    });\n\n  });\n</script>\n<style>\n\n  div { \n    position:absolute; \n    background-color:#abc; \n    left:50px;\n    width:90px; \n    height:90px;\n    margin:5px; \n  }\n  \n</style>\n</head>\n<body>\n<button id=\"left\">&laquo;</button> <button id=\"right\">&raquo;</button>\n<div class=\"block\"></div>\n\n</body>\n</html>"}, {"code": "$(\"p\").animate({\n      \"height\": \"toggle\", \"opacity\": \"toggle\"\n    }, \"slow\");", "htmlCode": "$(\"p\").animate({\n      \"height\": \"toggle\", \"opacity\": \"toggle\"\n    }, \"slow\");", "desc": "Animates all paragraphs to toggle both height and opacity, completing the animation within 600 milliseconds.", "css": "", "inhead": "", "html": "", "exampleId": "188iframeExample2", "runCode": ""}, {"code": "$(\"p\").animate({\n      \"left\": \"50\", \"opacity\": 1\n    }, 500);\n", "htmlCode": "$(\"p\").animate({\n      \"left\": \"50\", \"opacity\": 1\n    }, 500);\n", "desc": "Animates all paragraph to a left style of 50 and opacity of 1 (opaque, visible), completing the animation within 500 milliseconds.", "css": "", "inhead": "", "html": "", "exampleId": "188iframeExample3", "runCode": ""}, {"code": "$(\"p\").animate({\n      \"opacity\": \"show\"\n    }, \"slow\", \"easein\");", "htmlCode": "$(\"p\").animate({\n      \"opacity\": \"show\"\n    }, \"slow\", \"easein\");", "desc": "An example of using an 'easing' function to provide a different style of animation. This will only work if you have a plugin that provides this easing function.  Note, this code will do nothing unless the paragraph element is hidden.", "css": "", "inhead": "", "html": "", "exampleId": "188iframeExample4", "runCode": ""}]}, "animate189": {"id": 189, "searchname": "animate", "name": "animate", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.0", "sample": "", "desc": "A function for making your own, custom animations.", "longdesc": "<p>The key aspect of this function is the object of style properties that will be animated, and to what end. Each key within the object represents a style property that will also be animated (for example: \"height\", \"top\", or \"opacity\").</p><p>Note that properties should be specified using camel case eg. marginLeft instead of margin-left.</p><p>The value associated with the key represents to what end the property will be animated. If a number is provided as the value, then the style property will be transitioned from its current state to that new number. Otherwise if the string \"hide\", \"show\", or \"toggle\" is provided, a default animation will be constructed for that property. </p>", "params": [{"optional": false, "name": "params", "type": "Options", "desc": "A set of style attributes that you wish to animate, and to what end."}, {"optional": false, "name": "options", "type": "Options ", "desc": "A set of options with which to configure the animation."}], "options": [{"name": "duration", "default": "\"normal\"", "type": "String, Number", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"name": "easing", "default": "\"swing\"", "type": "String", "desc": "The name of the easing effect that you want to use (Plugin Required). There are two built-in values, \"linear\" and \"swing\"."}, {"name": "complete", "default": "", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against."}, {"name": "step", "default": "", "type": "Callback", "desc": ""}, {"name": "queue", "default": "true", "type": "Boolean", "desc": "Setting this to false will make the animation skip the queue and will begin running immediately. (Added in jQuery 1.2)"}], "examples": [{"code": "\n    $(\"#go1\").click(function(){\n      $(\"#block1\").animate( { width:\"90%\" }, { queue:false, duration:3000 } )\n         .animate( { fontSize:\"24px\" }, 1500 )\n         .animate( { borderRightWidth:\"15px\" }, 1500);\n    });\n\n    $(\"#go2\").click(function(){\n      $(\"#block2\").animate( { width:\"90%\"}, 1000 )\n         .animate( { fontSize:\"24px\" } , 1000 )\n         .animate( { borderLeftWidth:\"15px\" }, 1000);\n    });\n\n    $(\"#go3\").click(function(){\n      $(\"#go1\").add(\"#go2\").click();\n    });\n\n    $(\"#go4\").click(function(){\n      $(\"div\").css({width:\"\", fontSize:\"\", borderWidth:\"\"});\n    });\n", "htmlCode": "\n    $(\"#go1\").click(function(){\n      $(\"#block1\").animate( { width:\"90%\" }, { queue:false, duration:3000 } )\n         .animate( { fontSize:\"24px\" }, 1500 )\n         .animate( { borderRightWidth:\"15px\" }, 1500);\n    });\n\n    $(\"#go2\").click(function(){\n      $(\"#block2\").animate( { width:\"90%\"}, 1000 )\n         .animate( { fontSize:\"24px\" } , 1000 )\n         .animate( { borderLeftWidth:\"15px\" }, 1000);\n    });\n\n    $(\"#go3\").click(function(){\n      $(\"#go1\").add(\"#go2\").click();\n    });\n\n    $(\"#go4\").click(function(){\n      $(\"div\").css({width:\"\", fontSize:\"\", borderWidth:\"\"});\n    });\n", "desc": "The first button shows how an unqueued animation works.  It expands the div out to 90% width <strong>while</strong> the font-size is increasing. Once the font-size change is complete, the border animation will begin.\n\nThe second button starts a traditional chained animation, where each animation will start once the previous animation on the element has completed.", "css": "div { \n    background-color:#bca; \n    width:200px;\n    height:1.1em;\n    text-align:center;\n    border:2px solid green;\n    margin:3px;\n    font-size:14px;\n  }\n  button {\n    font-size:14px;\n  }\n  ", "inhead": "", "html": "<button id=\"go1\">&raquo; Animate Block1</button>\n  <button id=\"go2\">&raquo; Animate Block2</button>\n  <button id=\"go3\">&raquo; Animate Both</button>\n  <button id=\"go4\">&raquo; Reset</button>\n  <div id=\"block1\">Block1</div>\n  <div id=\"block2\">Block2</div>", "exampleId": "189iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#go1\").click(function(){\n      $(\"#block1\").animate( { width:\"90%\" }, { queue:false, duration:3000 } )\n         .animate( { fontSize:\"24px\" }, 1500 )\n         .animate( { borderRightWidth:\"15px\" }, 1500);\n    });\n\n    $(\"#go2\").click(function(){\n      $(\"#block2\").animate( { width:\"90%\"}, 1000 )\n         .animate( { fontSize:\"24px\" } , 1000 )\n         .animate( { borderLeftWidth:\"15px\" }, 1000);\n    });\n\n    $(\"#go3\").click(function(){\n      $(\"#go1\").add(\"#go2\").click();\n    });\n\n    $(\"#go4\").click(function(){\n      $(\"div\").css({width:\"\", fontSize:\"\", borderWidth:\"\"});\n    });\n\n  });\n</script>\n<style>\ndiv { \n    background-color:#bca; \n    width:200px;\n    height:1.1em;\n    text-align:center;\n    border:2px solid green;\n    margin:3px;\n    font-size:14px;\n  }\n  button {\n    font-size:14px;\n  }\n  \n</style>\n</head>\n<body>\n<button id=\"go1\">&raquo; Animate Block1</button>\n  <button id=\"go2\">&raquo; Animate Block2</button>\n  <button id=\"go3\">&raquo; Animate Both</button>\n  <button id=\"go4\">&raquo; Reset</button>\n  <div id=\"block1\">Block1</div>\n  <div id=\"block2\">Block2</div>\n</body>\n</html>"}, {"code": "$(\"p\").animate({\n      \"height\": \"toggle\", \"opacity\": \"toggle\"\n    }, { duration: \"slow\" });", "htmlCode": "$(\"p\").animate({\n      \"height\": \"toggle\", \"opacity\": \"toggle\"\n    }, { duration: \"slow\" });", "desc": "Animates all paragraphs to toggle both height and opacity, completing the animation within 600 milliseconds.", "css": "", "inhead": "", "html": "", "exampleId": "189iframeExample1", "runCode": ""}, {"code": "$(\"p\").animate({\n      left: \"50px\", opacity: 1\n    }, { duration: 500, queue: false });", "htmlCode": "$(\"p\").animate({\n      left: \"50px\", opacity: 1\n    }, { duration: 500, queue: false });", "desc": "Animates all paragraph to a left style of 50 and opacity of 1 (opaque, visible), completing the animation within 500 milliseconds.  It also will do it <em>outside</em> the queue, meaning it will automatically start without waiting for its turn.", "css": "", "inhead": "", "html": "", "exampleId": "189iframeExample2", "runCode": ""}, {"code": "$(\"p\").animate({\n      \"opacity\": \"show\"\n    }, { \"duration\": \"slow\", \"easing\": \"easein\" });", "htmlCode": "$(\"p\").animate({\n      \"opacity\": \"show\"\n    }, { \"duration\": \"slow\", \"easing\": \"easein\" });", "desc": "An example of using an 'easing' function to provide a different style of animation. This will only work if you have a plugin that provides this easing function.", "css": "", "inhead": "", "html": "", "exampleId": "189iframeExample3", "runCode": ""}]}, "stop190": {"id": 190, "searchname": "stop", "name": "stop", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Stops all the currently running animations on all the specified elements. ", "longdesc": "<p>If any animations are queued to run, then they will begin immediately.</p>", "params": [], "examples": [{"code": "\n    // Start animation\n    $(\"#go\").click(function(){\n      $(\".block\").animate({left: '+=100px'}, 2000);\n    });\n\n    // Stop animation when button is clicked\n    $(\"#stop\").click(function(){\n      $(\".block\").stop();\n    });\n\n    // Start animation in the opposite direction\n    $(\"#back\").click(function(){\n      $(\".block\").animate({left: '-=100px'}, 2000);\n    });\n", "htmlCode": "\n    // Start animation\n    $(\"#go\").click(function(){\n      $(\".block\").animate({left: '+=100px'}, 2000);\n    });\n\n    // Stop animation when button is clicked\n    $(\"#stop\").click(function(){\n      $(\".block\").stop();\n    });\n\n    // Start animation in the opposite direction\n    $(\"#back\").click(function(){\n      $(\".block\").animate({left: '-=100px'}, 2000);\n    });\n", "desc": "Click the Go button once to start the animation, then click the STOP button to stop it where it's currently positioned.  Another option is to click several buttons to queue them up and see that stop just kills the currently playing one.", "css": "div { \n    position: absolute; \n    background-color: #abc;\n    left: 0px;\n    top:30px;\n    width: 60px; \n    height: 60px;\n    margin: 5px; \n  }\n  ", "inhead": "", "html": "<button id=\"go\">Go</button> \n  <button id=\"stop\">STOP!</button>\n  <button id=\"back\">Back</button>\n  <div class=\"block\"></div>", "exampleId": "190iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    // Start animation\n    $(\"#go\").click(function(){\n      $(\".block\").animate({left: '+=100px'}, 2000);\n    });\n\n    // Stop animation when button is clicked\n    $(\"#stop\").click(function(){\n      $(\".block\").stop();\n    });\n\n    // Start animation in the opposite direction\n    $(\"#back\").click(function(){\n      $(\".block\").animate({left: '-=100px'}, 2000);\n    });\n\n  });\n</script>\n<style>\ndiv { \n    position: absolute; \n    background-color: #abc;\n    left: 0px;\n    top:30px;\n    width: 60px; \n    height: 60px;\n    margin: 5px; \n  }\n  \n</style>\n</head>\n<body>\n<button id=\"go\">Go</button> \n  <button id=\"stop\">STOP!</button>\n  <button id=\"back\">Back</button>\n  <div class=\"block\"></div>\n</body>\n</html>"}]}, "queue191": {"id": 191, "searchname": "queue", "name": "queue", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "Array&lt;Function&gt;", "added": "1.2", "sample": "", "desc": "Returns a reference to the first element's queue (which is an array of functions).", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"#show\").click(function () {\n      var n = $(\"div\").queue(\"fx\");\n      $(\"span\").text(\"Queue length is: \" + n.length);\n    });\n    function runIt() {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").slideToggle(1000);\n      $(\"div\").slideToggle(\"fast\");\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").hide(\"slow\");\n      $(\"div\").show(1200);\n      $(\"div\").slideUp(\"normal\", runIt);\n    }\n    runIt();\n", "htmlCode": "\n    $(\"#show\").click(function () {\n      var n = $(\"div\").queue(\"fx\");\n      $(\"span\").text(\"Queue length is: \" + n.length);\n    });\n    function runIt() {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").slideToggle(1000);\n      $(\"div\").slideToggle(\"fast\");\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").hide(\"slow\");\n      $(\"div\").show(1200);\n      $(\"div\").slideUp(\"normal\", runIt);\n    }\n    runIt();\n", "desc": "Show the length of the queue.", "css": "\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<button id=\"show\">Show Length of Queue</button>\n  <span></span>\n  <div></div>", "exampleId": "191iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#show\").click(function () {\n      var n = $(\"div\").queue(\"fx\");\n      $(\"span\").text(\"Queue length is: \" + n.length);\n    });\n    function runIt() {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").slideToggle(1000);\n      $(\"div\").slideToggle(\"fast\");\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").hide(\"slow\");\n      $(\"div\").show(1200);\n      $(\"div\").slideUp(\"normal\", runIt);\n    }\n    runIt();\n\n  });\n</script>\n<style>\n\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<button id=\"show\">Show Length of Queue</button>\n  <span></span>\n  <div></div>\n</body>\n</html>"}]}, "queue192": {"id": 192, "searchname": "queue", "name": "queue", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Adds a new function, to be executed, onto the end of the queue of all matched elements.", "longdesc": "", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to add to the queue.\n<pre>function callback() {\n  this; // dom element\n  // to continue the queue you must call\n  jQuery(this).dequeue();\n}\n</pre>"}], "examples": [{"code": "\n    $(document.body).click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n", "htmlCode": "\n    $(document.body).click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n", "desc": "Queue a custom function.", "css": "\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  ", "inhead": "", "html": "Click here...\n  <div></div>", "exampleId": "192iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  \n</style>\n</head>\n<body>\nClick here...\n  <div></div>\n</body>\n</html>"}]}, "queue193": {"id": 193, "searchname": "queue", "name": "queue", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Replaces the queue of all matched element with this new queue (the array of functions).", "longdesc": "", "params": [{"optional": false, "name": "queue", "type": "Array&lt;Function&gt;", "desc": "The queue to replace all the queues with.  The functions have the same parameters and this value as queue(callback)."}], "examples": [{"code": "\n    $(\"#start\").click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},5000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n    $(\"#stop\").click(function () {\n      $(\"div\").queue(\"fx\", []);\n      $(\"div\").stop();\n    });\n", "htmlCode": "\n    $(\"#start\").click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},5000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n    $(\"#stop\").click(function () {\n      $(\"div\").queue(\"fx\", []);\n      $(\"div\").stop();\n    });\n", "desc": "Set a queue array to delete the queue.", "css": "\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  ", "inhead": "", "html": "<button id=\"start\">Start</button>\n  <button id=\"stop\">Stop</button>\n  <div></div>", "exampleId": "193iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#start\").click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},5000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n    $(\"#stop\").click(function () {\n      $(\"div\").queue(\"fx\", []);\n      $(\"div\").stop();\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  \n</style>\n</head>\n<body>\n<button id=\"start\">Start</button>\n  <button id=\"stop\">Stop</button>\n  <div></div>\n</body>\n</html>"}]}, "dequeue194": {"id": 194, "searchname": "dequeue", "name": "dequeue", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Removes a queued function from the front of the queue and executes it.", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"div\").animate({left:'+=200px'}, 2000);\n      $(\"div\").animate({top:'0px'}, 600);\n      $(\"div\").queue(function () {\n        $(this).toggleClass(\"red\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'10px', top:'30px'}, 700);\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"div\").animate({left:'+=200px'}, 2000);\n      $(\"div\").animate({top:'0px'}, 600);\n      $(\"div\").queue(function () {\n        $(this).toggleClass(\"red\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'10px', top:'30px'}, 700);\n    });\n", "desc": "Use dequeue to end a custom queue function which allows the queue to keep going.", "css": "\n  div { margin:3px; width:50px; position:absolute;\n        height:50px; left:10px; top:30px; \n        background-color:yellow; }\n  div.red { background-color:red; }\n  ", "inhead": "", "html": "<button>Start</button>\n  <div></div>", "exampleId": "194iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"div\").animate({left:'+=200px'}, 2000);\n      $(\"div\").animate({top:'0px'}, 600);\n      $(\"div\").queue(function () {\n        $(this).toggleClass(\"red\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'10px', top:'30px'}, 700);\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:3px; width:50px; position:absolute;\n        height:50px; left:10px; top:30px; \n        background-color:yellow; }\n  div.red { background-color:red; }\n  \n</style>\n</head>\n<body>\n<button>Start</button>\n  <div></div>\n</body>\n</html>"}]}, "ajax195": {"id": 195, "searchname": "ajax", "name": "$.ajax", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "XMLHttpRequest", "added": "1.0", "sample": "", "desc": "Load a remote page using an HTTP request.", "longdesc": "<p>This is jQuery's low-level AJAX implementation. See $.get, $.post etc. for higher-level abstractions that are often easier to understand and use, but don't offer as much functionality (such as error callbacks).</p><p>$.ajax() returns the XMLHttpRequest that it creates. In most cases you won't need that object to manipulate directly, but it is available if you need to abort the request manually.</p><p>$.ajax() takes one argument, an object of key/value pairs, that are used to initialize and handle the request. See below for a full list of the key/values that can be used.</p><p><strong>Note:</strong> If you specify the dataType option described below, make sure\nthe server sends the correct MIME type in the response (eg. xml as \"text/xml\").\nSending the wrong MIME type can lead to unexpected problems in your script.\nSee <a href='Specifying_the_Data_Type_for_AJAX_Requests'>Specifying the Data Type for AJAX Requests</a> for more information.</p><p><strong>Note:</strong> All remote (not on the same domain) POST requests are converted to GET when 'script' is the dataType (because it loads script using a DOM script tag).</p><p>As of jQuery 1.2, you can load JSON data located on another domain if you specify a <a href=\"http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/\">JSONP</a> callback, which can be done like so: \"myurl?callback=?\". jQuery automatically replaces the ? with the correct method name to call, calling your specified callback. Or, if you set the dataType to \"jsonp\" a callback will be automatically added to your Ajax request.</p>", "params": [{"optional": false, "name": "options", "type": "Options", "desc": "A set of key/value pairs that configure the Ajax request. All options are optional. A default can be set for any option with <a href='Ajax/jQuery.ajaxSetup'>$.ajaxSetup</a>()."}], "options": [{"name": "async", "default": "true", "type": "Boolean", "desc": "By default, all requests are sent asynchronous (e.g. this is set to true by default). If you need synchronous requests, set this option to false. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active."}, {"name": "beforeSend", "default": "", "type": "Function", "desc": "A pre-callback to modify the XMLHttpRequest object before it is sent. Use this to set custom headers etc. The XMLHttpRequest is passed as the only argument. This is an <a href='Ajax_Events'>Ajax Event</a>.\n<pre>function (XMLHttpRequest) {\n  this; // the options for this ajax request\n}\n</pre>"}, {"name": "cache", "default": "true, false for dataType \"script\"", "type": "Boolean", "desc": "Added in jQuery 1.2, if set to false it will force the pages that you request to not be cached by the browser."}, {"name": "complete", "default": "", "type": "Function", "desc": "A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The XMLHttpRequest object and a string describing the type of success of the request. This is an <a href='Ajax_Events'>Ajax Event</a>.\n<pre>function (XMLHttpRequest, textStatus) {\n  this; // the options for this ajax request\n}\n</pre>"}, {"name": "contentType", "default": "\"application/x-www-form-urlencoded\"", "type": "String", "desc": "When sending data to the server, use this content-type. Default is \"application/x-www-form-urlencoded\", which is fine for most cases."}, {"name": "data", "default": "", "type": "Object, String", "desc": "Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key i.e. {foo:[\"bar1\", \"bar2\"]} becomes '&foo=bar1&foo=bar2'."}, {"name": "dataType", "default": "Intelligent Guess (xml or html)", "type": "String", "desc": "The type of data that you're expecting back from the server. If none is specified, jQuery will intelligently pass either responseXML or responseText to your success callback, based on the MIME type of the response. The available types (and the result passed as the first argument to your success callback) are:<ul><li>\"xml\": Returns a XML document that can be processed via jQuery.</li><li>\"html\": Returns HTML as plain text; included script tags are evaluated when inserted in the DOM.</li><li>\"script\": Evaluates the response as JavaScript and returns it as plain text. Disables caching unless option \"cache\" is used. <strong>Note:</strong> This will turn POSTs into GETs for remote-domain requests.</li><li>\"json\": Evaluates the response as JSON and returns a JavaScript Object.</li><li>\"jsonp\": Loads in a JSON block using <a href=\"http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/\">JSONP</a>. Will add an extra \"?callback=?\" to the end of your URL to specify the callback. (Added in jQuery 1.2)</li><li>\"text\": A plain text string.</li></ul>"}, {"name": "error", "default": "", "type": "Function", "desc": "A function to be called if the request fails. The function gets passed three arguments: The XMLHttpRequest object, a string describing the type of error that occurred and an optional exception object, if one occurred. This is an <a href='Ajax_Events'>Ajax Event</a>.\n<pre>function (XMLHttpRequest, textStatus, errorThrown) {\n  // typically only one of textStatus or errorThrown \n  // will have info\n  this; // the options for this ajax request\n}\n</pre>"}, {"name": "global", "default": "true", "type": "Boolean", "desc": "Whether to trigger global AJAX event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various <a href='Ajax_Events'>Ajax Events</a>."}, {"name": "ifModified", "default": "false", "type": "Boolean", "desc": "Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header."}, {"name": "jsonp", "default": "", "type": "String", "desc": "Override the callback function name in a jsonp request.  This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url for a GET or the data for a POST.  So {jsonp:'onJsonPLoad'} would result in 'onJsonPLoad=?' passed to the server."}, {"name": "password", "default": "", "type": "String", "desc": "A password to be used in response to an HTTP access authentication request."}, {"name": "processData", "default": "true", "type": "Boolean", "desc": "By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type \"application/x-www-form-urlencoded\". If you want to send DOMDocuments, or other non-processed data, set this option to false."}, {"name": "success", "default": "", "type": "Function", "desc": "A function to be called if the request succeeds. The function gets passed two arguments: The data returned from the server, formatted according to the 'dataType' parameter, and a string describing the status. This is an <a href='Ajax_Events'>Ajax Event</a>.\n<pre>function (data, textStatus) {\n  // data could be xmlDoc, jsonObj, html, text, etc...\n  this; // the options for this ajax request\n}\n</pre>"}, {"name": "timeout", "default": "", "type": "Number", "desc": "Set a local timeout in ms for the request. This will override the global timeout, if one is set via <a href='Ajax/jQuery.ajaxSetup'>$.ajaxSetup</a>. For example, you could use this property to give a single request a longer timeout than all other requests that you've set to time out in one second. See <a href='Ajax/jQuery.ajaxSetup'>$.ajaxSetup</a>() for global timeouts."}, {"name": "type", "default": "\"GET\"", "type": "String", "desc": "The type of request to make (\"POST\" or \"GET\"), default is \"GET\". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers."}, {"name": "url", "default": "The current page", "type": "String", "desc": "The URL to request."}, {"name": "username", "default": "", "type": "String", "desc": "A username to be used in response to an HTTP access authentication request."}], "examples": [{"code": " $.ajax({\n   type: \"GET\",\n   url: \"test.js\",\n   dataType: \"script\"\n });", "htmlCode": " $.ajax({\n   type: \"GET\",\n   url: \"test.js\",\n   dataType: \"script\"\n });", "desc": "Load and execute a JavaScript file.", "css": "", "inhead": "", "html": "", "exampleId": "195iframeExample0", "runCode": ""}, {"code": " $.ajax({\n   type: \"POST\",\n   url: \"some.php\",\n   data: \"name=John&location=Boston\",\n   success: function(msg){\n     alert( \"Data Saved: \" + msg );\n   }\n });", "htmlCode": " $.ajax({\n   type: \"POST\",\n   url: \"some.php\",\n   data: \"name=John&location=Boston\",\n   success: function(msg){\n     alert( \"Data Saved: \" + msg );\n   }\n });", "desc": "Save some data to the server and notify the user once its complete.", "css": "", "inhead": "", "html": "", "exampleId": "195iframeExample1", "runCode": ""}, {"code": "$.ajax({\n  url: \"test.html\",\n  cache: false,\n  success: function(html){\n    $(\"#results\").append(html);\n  }\n});", "htmlCode": "$.ajax({\n  url: \"test.html\",\n  cache: false,\n  success: function(html){\n    $(\"#results\").append(html);\n  }\n});", "desc": "Retrieve the latest version of an HTML page.", "css": "", "inhead": "", "html": "", "exampleId": "195iframeExample2", "runCode": ""}, {"code": " var html = $.ajax({\n  url: \"some.php\",\n  async: false\n }).responseText;", "htmlCode": " var html = $.ajax({\n  url: \"some.php\",\n  async: false\n }).responseText;", "desc": "Loads data synchronously. Blocks the browser while the requests is active.\nIt is better to block user interaction by other means when synchronization is\nnecessary.", "css": "", "inhead": "", "html": "", "exampleId": "195iframeExample3", "runCode": ""}, {"code": " var xmlDocument = [create xml document];\n $.ajax({\n   url: \"page.php\",\n   processData: false,\n   data: xmlDocument,\n   success: handleResponse\n });", "htmlCode": " var xmlDocument = [create xml document];\n $.ajax({\n   url: \"page.php\",\n   processData: false,\n   data: xmlDocument,\n   success: handleResponse\n });", "desc": "Sends an xml document as data to the server. By setting the processData\noption to false, the automatic conversion of data to strings is prevented.", "css": "", "inhead": "", "html": "", "exampleId": "195iframeExample4", "runCode": ""}]}, "load196": {"id": 196, "searchname": "load", "name": "load", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Load HTML from a remote file and inject it into the DOM.", "longdesc": "<p>A GET request will be performed by default - but if you pass in any extra parameters then a POST will occur.</p><p>In jQuery 1.2 you can now specify a jQuery selector in the URL. Doing so will filter the incoming HTML document, only injecting the elements that match the selector. The syntax looks something like \"url #some > selector\". See the examples for more information.</p>", "params": [{"optional": false, "name": "url", "type": "String", "desc": "The URL of the HTML page to load."}, {"optional": true, "name": "data", "type": "Map", "desc": "Key/value pairs that will be sent to the server."}, {"optional": false, "name": "callback", "type": "Callback", "desc": "The function called when the ajax request is complete (not necessarily success).\n<pre>function (responseText, textStatus, XMLHttpRequest) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(\"#links\").load(\"/Main_Page #p-Getting-Started li\");", "htmlCode": "$(\"#links\").load(\"/Main_Page #p-Getting-Started li\");", "desc": "Load a piece of the documentation sidebar navigation into a custom unordered list.", "css": "body{ font-size: 11px; font-family: Arial; }", "inhead": "", "html": "<b>jQuery Links:</b>\n<ul id=\"links\"></ul>", "exampleId": "196iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"#links\").load(\"/Main_Page #p-Getting-Started li\");\n  });\n</script>\n<style>\nbody{ font-size: 11px; font-family: Arial; }\n</style>\n</head>\n<body>\n<b>jQuery Links:</b>\n<ul id=\"links\"></ul>\n</body>\n</html>"}, {"code": "$(\"#feeds\").load(\"feeds.html\");", "htmlCode": "$(\"#feeds\").load(\"feeds.html\");", "desc": "Load the feeds.html file into the div with the ID of feeds.", "css": "", "inhead": "", "html": "", "exampleId": "196iframeExample1", "runCode": ""}, {"code": " $(\"#feeds\").load(\"feeds.php\", {limit: 25}, function(){\n   alert(\"The last 25 entries in the feed have been loaded\");\n });", "htmlCode": " $(\"#feeds\").load(\"feeds.php\", {limit: 25}, function(){\n   alert(\"The last 25 entries in the feed have been loaded\");\n });", "desc": "Same as above, but will POST the additional parameters to the server and a callback that is executed when the server is finished responding.", "css": "", "inhead": "", "html": "", "exampleId": "196iframeExample2", "runCode": ""}]}, "get197": {"id": 197, "searchname": "get", "name": "$.get", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "XMLHttpRequest", "added": "1.0", "sample": "", "desc": "Load a remote page using an HTTP GET request.", "longdesc": "<p>This is an easy way to send a simple GET request to a server without having to use the more complex $.ajax function. It allows a single callback function to be specified that will be executed when the request is complete (and only if the response has a successful response code). If you need to have both error and success callbacks, you may want to use $.ajax.</p>", "params": [{"optional": false, "name": "url", "type": "String", "desc": "The URL of the page to load."}, {"optional": true, "name": "data", "type": "Map", "desc": "Key/value pairs that will be sent to the server."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the data is loaded successfully.\n<pre>function (data, textStatus) {\n  // data could be xmlDoc, jsonObj, html, text, etc...\n  this; // the options for this ajax request\n}\n</pre>"}], "examples": [{"code": " $.get(\"test.php\");", "htmlCode": " $.get(\"test.php\");", "desc": "Request the test.php page, but ignore the return results.", "css": "", "inhead": "", "html": "", "exampleId": "197iframeExample0", "runCode": ""}, {"code": " $.get(\"test.php\", { name: \"John\", time: \"2pm\" } );", "htmlCode": " $.get(\"test.php\", { name: \"John\", time: \"2pm\" } );", "desc": "Request the test.php page and send some additional data along (while still ignoring the return results).", "css": "", "inhead": "", "html": "", "exampleId": "197iframeExample1", "runCode": ""}, {"code": " $.get(\"test.php\", function(data){\n   alert(\"Data Loaded: \" + data);\n });", "htmlCode": " $.get(\"test.php\", function(data){\n   alert(\"Data Loaded: \" + data);\n });", "desc": "Alert out the results from requesting test.php (HTML or XML, depending on what was returned).", "css": "", "inhead": "", "html": "", "exampleId": "197iframeExample2", "runCode": ""}, {"code": " $.get(\"test.cgi\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     alert(\"Data Loaded: \" + data);\n   });", "htmlCode": " $.get(\"test.cgi\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     alert(\"Data Loaded: \" + data);\n   });", "desc": "Alert out the results from requesting test.cgi with an additional payload of data (HTML or XML, depending on what was returned).", "css": "", "inhead": "", "html": "", "exampleId": "197iframeExample3", "runCode": ""}]}, "getjson198": {"id": 198, "searchname": "getjson", "name": "$.getJSON", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "XMLHttpRequest", "added": "1.0", "sample": "", "desc": "Load JSON data using an HTTP GET request.", "longdesc": "<p>As of jQuery 1.2, you can load JSON data located on another domain if you specify a <a href=\"http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/\">JSONP</a> callback, which can be done like so: \"myurl?callback=?\". jQuery automatically replaces the ? with the correct method name to call, calling your specified callback.</p><p>\nNote: Keep in mind, that lines after this function will be executed before callback.</p>", "params": [{"optional": false, "name": "url", "type": "String", "desc": "The URL of the page to load."}, {"optional": true, "name": "data", "type": "Map", "desc": "Key/value pairs that will be sent to the server."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the data is loaded successfully.\n<pre>function (data, textStatus) {\n  // data will be a jsonObj\n  this; // the options for this ajax request\n}\n</pre>"}], "examples": [{"code": "$.getJSON(\"http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?\",\n        function(data){\n          $.each(data.items, function(i,item){\n            $(\"<img/>\").attr(\"src\", item.media.m).appendTo(\"#images\");\n            if ( i == 3 ) return false;\n          });\n        });", "htmlCode": "$.getJSON(\"http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?\",\n        function(data){\n          $.each(data.items, function(i,item){\n            $(\"&lt;img/&gt;\").attr(\"src\", item.media.m).appendTo(\"#images\");\n            if ( i == 3 ) return false;\n          });\n        });", "desc": "Loads the four most recent cat pictures from the Flickr JSONP API.", "css": "img{ height: 100px; float: left; }", "inhead": "", "html": "<div id=\"images\"></div>", "exampleId": "198iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$.getJSON(\"http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?\",\n        function(data){\n          $.each(data.items, function(i,item){\n            $(\"<img/>\").attr(\"src\", item.media.m).appendTo(\"#images\");\n            if ( i == 3 ) return false;\n          });\n        });\n  });\n</script>\n<style>\nimg{ height: 100px; float: left; }\n</style>\n</head>\n<body>\n<div id=\"images\"></div>\n</body>\n</html>"}, {"code": " $.getJSON(\"test.js\", function(json){\n   alert(\"JSON Data: \" + json.users[3].name);\n });", "htmlCode": " $.getJSON(\"test.js\", function(json){\n   alert(\"JSON Data: \" + json.users[3].name);\n });", "desc": "Load the JSON data from test.js and access a name from the returned JSON data.", "css": "", "inhead": "", "html": "", "exampleId": "198iframeExample1", "runCode": ""}, {"code": " $.getJSON(\"test.js\", { name: \"John\", time: \"2pm\" }, function(json){\n   alert(\"JSON Data: \" + json.users[3].name);\n });", "htmlCode": " $.getJSON(\"test.js\", { name: \"John\", time: \"2pm\" }, function(json){\n   alert(\"JSON Data: \" + json.users[3].name);\n });", "desc": "Load the JSON data from test.js, passing along additional data, and access a name from the returned JSON data.", "css": "", "inhead": "", "html": "", "exampleId": "198iframeExample2", "runCode": ""}, {"code": "\nvar id=$(\"#id\").attr(\"value\");\n  $.getJSON(\"pages.php\",{id:id},dates);\nfunction dates(datos)\n{\n\t\n $(\"#list\").html(\"Name:\"+datos[1].name+\"<br>\"+\"Last Name:\"+datos[1].lastname+\"<br>\"+\"Address:\"+datos[1].address);\n}\n", "htmlCode": "\nvar id=$(\"#id\").attr(\"value\");\n  $.getJSON(\"pages.php\",{id:id},dates);\nfunction dates(datos)\n{\n\t\n $(\"#list\").html(\"Name:\"+datos[1].name+\"&lt;br&gt;\"+\"Last Name:\"+datos[1].lastname+\"&lt;br&gt;\"+\"Address:\"+datos[1].address);\n}\n", "desc": "List the result of a consultation of pages.php in HTML as an array. By Manuel Gonzalez.", "css": "", "inhead": "", "html": "", "exampleId": "198iframeExample3", "runCode": ""}]}, "getscript199": {"id": 199, "searchname": "getscript", "name": "$.getScript", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "XMLHttpRequest", "added": "1.0", "sample": "", "desc": "Loads, and executes, a local JavaScript file using an HTTP GET request.", "longdesc": "<p>Before jQuery 1.2, getScript was only able to load scripts from the same domain as the original page. As of 1.2, you can now load JavaScript files from any domain.</p><p>Warning: Safari 2 and older is unable to evaluate scripts in a global context synchronously. If you load functions via getScript, make sure to call them after a delay.</p>", "params": [{"optional": false, "name": "url", "type": "String", "desc": "The URL of the page to load."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the data is loaded successfully.\n<pre>function (data, textStatus) {\n  // data should be javascript\n  this; // the options for this ajax request\n}\n</pre>"}], "examples": [{"code": "$.getScript(\"http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js\", function(){\n  $(\"#go\").click(function(){\n    $(\".block\").animate( { backgroundColor: 'pink' }, 1000)\n      .animate( { backgroundColor: 'blue' }, 1000);\n  });\n});", "htmlCode": "$.getScript(\"http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js\", function(){\n  $(\"#go\").click(function(){\n    $(\".block\").animate( { backgroundColor: 'pink' }, 1000)\n      .animate( { backgroundColor: 'blue' }, 1000);\n  });\n});", "desc": "We load the new <a href=\"http://jquery.com/plugins/project/color\">http://jquery.com/plugins/project/color</a> dynamically and bind some color animations to occur once the new functionality is loaded.", "css": ".block { \n   background-color: blue; \n   width: 150px; \n   height: 70px;\n   margin: 10px; \n}", "inhead": "", "html": "<button id=\"go\">&raquo; Run</button>\n<div class=\"block\"></div>\n", "exampleId": "199iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$.getScript(\"http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js\", function(){\n  $(\"#go\").click(function(){\n    $(\".block\").animate( { backgroundColor: 'pink' }, 1000)\n      .animate( { backgroundColor: 'blue' }, 1000);\n  });\n});\n  });\n</script>\n<style>\n.block { \n   background-color: blue; \n   width: 150px; \n   height: 70px;\n   margin: 10px; \n}\n</style>\n</head>\n<body>\n<button id=\"go\">&raquo; Run</button>\n<div class=\"block\"></div>\n\n</body>\n</html>"}, {"code": " $.getScript(\"test.js\");", "htmlCode": " $.getScript(\"test.js\");", "desc": "Load the test.js JavaScript file and execute it.", "css": "", "inhead": "", "html": "", "exampleId": "199iframeExample1", "runCode": ""}, {"code": " $.getScript(\"test.js\", function(){\n   alert(\"Script loaded and executed.\");\n });", "htmlCode": " $.getScript(\"test.js\", function(){\n   alert(\"Script loaded and executed.\");\n });", "desc": "Load the test.js JavaScript file and execute it, displaying an alert message when the execution is complete.", "css": "", "inhead": "", "html": "", "exampleId": "199iframeExample2", "runCode": ""}]}, "post200": {"id": 200, "searchname": "post", "name": "$.post", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "XMLHttpRequest", "added": "1.0", "sample": "", "desc": "Load a remote page using an HTTP POST request.", "longdesc": "<p>This is an easy way to send a simple POST request to a server without having to use the more complex $.ajax function. It allows a single callback function to be specified that will be executed when the request is complete (and only if the response has a successful response code).\nThe returned data format can be specified by the fourth paramater.\nIf you need to have both error and success callbacks, you may want to use $.ajax. $.post is a (simplified) wrapper function for $.ajax.</p>", "params": [{"optional": false, "name": "url", "type": "String", "desc": "The URL of the page to load."}, {"optional": true, "name": "data", "type": "Map", "desc": "Key/value pairs that will be sent to the server."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the data is loaded successfully.\n<pre>function (data, textStatus) {\n  // data could be xmlDoc, jsonObj, html, text, etc...\n  this; // the options for this ajax request\n}\n</pre>"}, {"optional": true, "name": "type", "type": "String", "desc": "Type of data to be returned to callback function (JSON, XML, etc.)\n<pre>$.postJSON = function(url, data, callback) {\n\t$.post(url, data, callback, \"json\");\n};\n</pre>"}], "examples": [{"code": " $.post(\"test.php\");", "htmlCode": " $.post(\"test.php\");", "desc": "Request the test.php page, but ignore the return results.", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample0", "runCode": ""}, {"code": " $.post(\"test.php\", { name: \"John\", time: \"2pm\" } );", "htmlCode": " $.post(\"test.php\", { name: \"John\", time: \"2pm\" } );", "desc": "Request the test.php page and send some additional data along (while still ignoring the return results).", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample1", "runCode": ""}, {"code": " $.post(\"test.php\", function(data){\n   alert(\"Data Loaded: \" + data);\n });", "htmlCode": " $.post(\"test.php\", function(data){\n   alert(\"Data Loaded: \" + data);\n });", "desc": "Alert out the results from requesting test.php (HTML or XML, depending on what was returned).", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample2", "runCode": ""}, {"code": " $.post(\"test.cgi\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     alert(\"Data Loaded: \" + data);\n   });", "htmlCode": " $.post(\"test.cgi\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     alert(\"Data Loaded: \" + data);\n   });", "desc": "Alert out the results from requesting test.php with an additional payload of data (HTML or XML, depending on what was returned).", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample3", "runCode": ""}, {"code": " $.post(\"test.php\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     process(data);\n   }, \"xml\");", "htmlCode": " $.post(\"test.php\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     process(data);\n   }, \"xml\");", "desc": "Gets the test.php page content, store it in a XMLHttpResponse object and applies the process() JavaScript function.", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample4", "runCode": ""}, {"code": " $.post(\"test.php\", { func: \"getNameAndTime\" },\n   function(data){\n     alert(data.name); // John\n     console.log(data.time); //  2pm\n   }, \"json\");", "htmlCode": " $.post(\"test.php\", { func: \"getNameAndTime\" },\n   function(data){\n     alert(data.name); // John\n     console.log(data.time); //  2pm\n   }, \"json\");", "desc": "Gets the test.php page contents which has been returned in json format (&lt;?php echo json_encode(array(\"name\"=&gt;\"John\",\"time\"=&gt;\"2pm\")); ?&gt;)\n", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample5", "runCode": ""}]}, "ajaxcomplete201": {"id": 201, "searchname": "ajaxcomplete", "name": "ajaxComplete", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed whenever an AJAX request completes. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "<p>The XMLHttpRequest and settings used for that request are passed as arguments to the callback.</p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function (event, XMLHttpRequest, ajaxOptions) {\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#msg\").ajaxComplete(function(request, settings){\n   $(this).append(\"<li>Request Complete.</li>\");\n });", "htmlCode": " $(\"#msg\").ajaxComplete(function(request, settings){\n   $(this).append(\"&lt;li&gt;Request Complete.&lt;/li&gt;\");\n });", "desc": "Show a message when an AJAX request completes.", "css": "", "inhead": "", "html": "", "exampleId": "201iframeExample0", "runCode": ""}]}, "ajaxerror202": {"id": 202, "searchname": "ajaxerror", "name": "ajaxError", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed whenever an AJAX request fails. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "<p>The XMLHttpRequest and settings used for that request are passed as arguments to the callback. A third argument, an exception object, is passed if an exception occured while processing the request.</p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function (event, XMLHttpRequest, ajaxOptions, thrownError) {\n  // thrownError only passed if an error was caught\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#msg\").ajaxError(function(event, request, settings){\n   $(this).append(\"<li>Error requesting page \" + settings.url + \"</li>\");\n });", "htmlCode": " $(\"#msg\").ajaxError(function(event, request, settings){\n   $(this).append(\"&lt;li&gt;Error requesting page \" + settings.url + \"&lt;/li&gt;\");\n });", "desc": "Show a message when an AJAX request fails.", "css": "", "inhead": "", "html": "", "exampleId": "202iframeExample0", "runCode": ""}]}, "ajaxsend203": {"id": 203, "searchname": "ajaxsend", "name": "ajaxSend", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed before an AJAX request is sent. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "<p>The XMLHttpRequest and settings used for that request are passed as arguments to the callback.</p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function (event, XMLHttpRequest, ajaxOptions) {\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#msg\").ajaxSend(function(evt, request, settings){\n   $(this).append(\"<li>Starting request at \" + settings.url + \"</li>\");\n });", "htmlCode": " $(\"#msg\").ajaxSend(function(evt, request, settings){\n   $(this).append(\"&lt;li&gt;Starting request at \" + settings.url + \"&lt;/li&gt;\");\n });", "desc": "Show a message before an AJAX request is sent.", "css": "", "inhead": "", "html": "", "exampleId": "203iframeExample0", "runCode": ""}]}, "ajaxstart204": {"id": 204, "searchname": "ajaxstart", "name": "ajaxStart", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed whenever an AJAX request begins and there is none already active. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function () {\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#loading\").ajaxStart(function(){\n   $(this).show();\n });", "htmlCode": " $(\"#loading\").ajaxStart(function(){\n   $(this).show();\n });", "desc": "Show a loading message whenever an AJAX request starts (and none is already active).", "css": "", "inhead": "", "html": "", "exampleId": "204iframeExample0", "runCode": ""}]}, "ajaxstop205": {"id": 205, "searchname": "ajaxstop", "name": "ajaxStop", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed whenever all AJAX requests have ended. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function () {\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#loading\").ajaxStop(function(){\n   $(this).hide();\n });", "htmlCode": " $(\"#loading\").ajaxStop(function(){\n   $(this).hide();\n });", "desc": "Hide a loading message after all the AJAX requests have stopped.", "css": "", "inhead": "", "html": "", "exampleId": "205iframeExample0", "runCode": ""}]}, "ajaxsuccess206": {"id": 206, "searchname": "ajaxsuccess", "name": "ajaxSuccess", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed whenever an AJAX request completes successfully. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "<p>The event object, XMLHttpRequest, and settings used for that request are passed as arguments to the callback.</p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function (event, XMLHttpRequest, ajaxOptions) {\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#msg\").ajaxSuccess(function(evt, request, settings){\n   $(this).append(\"<li>Successful Request!</li>\");\n });", "htmlCode": " $(\"#msg\").ajaxSuccess(function(evt, request, settings){\n   $(this).append(\"&lt;li&gt;Successful Request!&lt;/li&gt;\");\n });", "desc": "Show a message when an AJAX request completes successfully.", "css": "", "inhead": "", "html": "", "exampleId": "206iframeExample0", "runCode": ""}]}, "ajaxsetup207": {"id": 207, "searchname": "ajaxsetup", "name": "$.ajaxSetup", "type": "function", "category": "Ajax", "subcategory": "Misc", "return": "", "added": "1.1", "sample": "", "desc": "Setup global settings for AJAX requests.", "longdesc": "<p>See <a href='Ajax/jQuery.ajax'>$.ajax</a> for a description of all available options.</p>", "params": [{"optional": false, "name": "options", "type": "Options", "desc": "A set of key/value pairs that configure the default Ajax request. All options are optional."}], "options": [], "examples": [{"code": " $.ajaxSetup({\n   url: \"/xmlhttp/\",\n   global: false,\n   type: \"POST\"\n });\n $.ajax({ data: myData });", "htmlCode": " $.ajaxSetup({\n   url: \"/xmlhttp/\",\n   global: false,\n   type: \"POST\"\n });\n $.ajax({ data: myData });", "desc": "Sets the defaults for AJAX requests to the url \"/xmlhttp/\", disables global handlers and uses POST instead of GET. The following AJAX requests then sends some data without having to set anything else.", "css": "", "inhead": "", "html": "", "exampleId": "207iframeExample0", "runCode": ""}]}, "serialize208": {"id": 208, "searchname": "serialize", "name": "serialize", "type": "function", "category": "Ajax", "subcategory": "Misc", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Serializes a set of input elements into a string of data. This will serialize all given elements.", "longdesc": "<p>As of jQuery 1.2 the serialize method correctly serializes forms. For older versions of jQuery, the <a href=\"http://www.malsup.com/jquery/form/\">http://www.malsup.com/jquery/form/</a> fieldSerialize method should be used.</p>", "params": [], "examples": [{"code": "\n    function showValues() {\n      var str = $(\"form\").serialize();\n      $(\"#results\").text(str);\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n", "htmlCode": "\n    function showValues() {\n      var str = $(\"form\").serialize();\n      $(\"#results\").text(str);\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n", "desc": "Serialize a form to a query string, that could be sent to a server in an Ajax request.", "css": "\n  body, select { font-size:12px; }\n  form { margin:5px; }\n  p { color:red; margin:5px; font-size:14px; }\n  b { color:blue; }\n  ", "inhead": "", "html": "<form>\n    <select name=\"single\">\n      <option>Single</option>\n      <option>Single2</option>\n    </select>\n    <select name=\"multiple\" multiple=\"multiple\">\n      <option selected=\"selected\">Multiple</option>\n      <option>Multiple2</option>\n      <option selected=\"selected\">Multiple3</option>\n    </select><br/>\n    <input type=\"checkbox\" name=\"check\" value=\"check1\"/> check1\n    <input type=\"checkbox\" name=\"check\" value=\"check2\" checked=\"checked\"/> check2\n    <input type=\"radio\" name=\"radio\" value=\"radio1\" checked=\"checked\"/> radio1\n    <input type=\"radio\" name=\"radio\" value=\"radio2\"/> radio2\n  </form>\n  <p><tt id=\"results\"></tt></p>", "exampleId": "208iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function showValues() {\n      var str = $(\"form\").serialize();\n      $(\"#results\").text(str);\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n\n  });\n</script>\n<style>\n\n  body, select { font-size:12px; }\n  form { margin:5px; }\n  p { color:red; margin:5px; font-size:14px; }\n  b { color:blue; }\n  \n</style>\n</head>\n<body>\n<form>\n    <select name=\"single\">\n      <option>Single</option>\n      <option>Single2</option>\n    </select>\n    <select name=\"multiple\" multiple=\"multiple\">\n      <option selected=\"selected\">Multiple</option>\n      <option>Multiple2</option>\n      <option selected=\"selected\">Multiple3</option>\n    </select><br/>\n    <input type=\"checkbox\" name=\"check\" value=\"check1\"/> check1\n    <input type=\"checkbox\" name=\"check\" value=\"check2\" checked=\"checked\"/> check2\n    <input type=\"radio\" name=\"radio\" value=\"radio1\" checked=\"checked\"/> radio1\n    <input type=\"radio\" name=\"radio\" value=\"radio2\"/> radio2\n  </form>\n  <p><tt id=\"results\"></tt></p>\n</body>\n</html>"}]}, "serializearray209": {"id": 209, "searchname": "serializearray", "name": "serializeArray", "type": "function", "category": "Ajax", "subcategory": "Misc", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Serializes all forms and form elements (like the <a href='Ajax/serialize'>.serialize()</a> method) but returns a JSON data structure for you to work with.", "longdesc": "", "params": [], "examples": [{"code": "\n    function showValues() {\n      var fields = $(\":input\").serializeArray();\n      $(\"#results\").empty();\n      jQuery.each(fields, function(i, field){\n        $(\"#results\").append(field.value + \" \");\n      });\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n", "htmlCode": "\n    function showValues() {\n      var fields = $(\":input\").serializeArray();\n      $(\"#results\").empty();\n      jQuery.each(fields, function(i, field){\n        $(\"#results\").append(field.value + \" \");\n      });\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n", "desc": "Get the values from a form, iterate through them, and append them to a results display.", "css": "\n  body, select { font-size:14px; }\n  form { margin:5px; }\n  p { color:red; margin:5px; }\n  b { color:blue; }\n  ", "inhead": "", "html": "<p><b>Results:</b> <span id=\"results\"></span></p>\n  <form>\n    <select name=\"single\">\n      <option>Single</option>\n      <option>Single2</option>\n    </select>\n    <select name=\"multiple\" multiple=\"multiple\">\n      <option selected=\"selected\">Multiple</option>\n      <option>Multiple2</option>\n      <option selected=\"selected\">Multiple3</option>\n    </select><br/>\n    <input type=\"checkbox\" name=\"check\" value=\"check1\"/> check1\n    <input type=\"checkbox\" name=\"check\" value=\"check2\" checked=\"checked\"/> check2\n    <input type=\"radio\" name=\"radio\" value=\"radio1\" checked=\"checked\"/> radio1\n    <input type=\"radio\" name=\"radio\" value=\"radio2\"/> radio2\n  </form>", "exampleId": "209iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function showValues() {\n      var fields = $(\":input\").serializeArray();\n      $(\"#results\").empty();\n      jQuery.each(fields, function(i, field){\n        $(\"#results\").append(field.value + \" \");\n      });\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n\n  });\n</script>\n<style>\n\n  body, select { font-size:14px; }\n  form { margin:5px; }\n  p { color:red; margin:5px; }\n  b { color:blue; }\n  \n</style>\n</head>\n<body>\n<p><b>Results:</b> <span id=\"results\"></span></p>\n  <form>\n    <select name=\"single\">\n      <option>Single</option>\n      <option>Single2</option>\n    </select>\n    <select name=\"multiple\" multiple=\"multiple\">\n      <option selected=\"selected\">Multiple</option>\n      <option>Multiple2</option>\n      <option selected=\"selected\">Multiple3</option>\n    </select><br/>\n    <input type=\"checkbox\" name=\"check\" value=\"check1\"/> check1\n    <input type=\"checkbox\" name=\"check\" value=\"check2\" checked=\"checked\"/> check2\n    <input type=\"radio\" name=\"radio\" value=\"radio1\" checked=\"checked\"/> radio1\n    <input type=\"radio\" name=\"radio\" value=\"radio2\"/> radio2\n  </form>\n</body>\n</html>"}]}, "browser210": {"id": 210, "searchname": "browser", "name": "$.browser", "type": "property", "category": "Utilities", "subcategory": "User Agent", "return": "Map", "added": "1.0", "sample": "", "desc": "Contains flags for the useragent, read from navigator.userAgent.", "longdesc": "<p>Available flags are:<ul><li> safari</li><li> opera</li><li> msie</li><li> mozilla</li></ul></p><p>This property is available before the DOM is ready, therefore you can use it to add ready events only for certain browsers.</p><p>There are situations where object detection is not reliable enough, in such cases it makes sense to use browser detection.</p><p>A combination of browser and object detection yields quite reliable results. </p>", "params": [], "examples": [{"code": "\n    jQuery.each(jQuery.browser, function(i, val) {\n      $(\"<div>\" + i + \" : <span>\" + val + \"</span>\")\n                .appendTo(document.body);\n    });\n", "htmlCode": "\n    jQuery.each(jQuery.browser, function(i, val) {\n      $(\"&lt;div&gt;\" + i + \" : &lt;span&gt;\" + val + \"&lt;/span&gt;\")\n                .appendTo(document.body);\n    });\n", "desc": "Show the browser info.", "css": "\n  p { color:green; font-weight:bolder; margin:3px 0 0 10px; }\n  div { color:blue; margin-left:20px; font-size:14px; }\n  span { color:red; }\n  ", "inhead": "", "html": "<p>Browser info:</p>", "exampleId": "210iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    jQuery.each(jQuery.browser, function(i, val) {\n      $(\"<div>\" + i + \" : <span>\" + val + \"</span>\")\n                .appendTo(document.body);\n    });\n\n  });\n</script>\n<style>\n\n  p { color:green; font-weight:bolder; margin:3px 0 0 10px; }\n  div { color:blue; margin-left:20px; font-size:14px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<p>Browser info:</p>\n</body>\n</html>"}, {"code": "$.browser.msie", "htmlCode": "$.browser.msie", "desc": "Returns true if the current useragent is some version of Microsoft's Internet Explorer", "css": "", "inhead": "", "html": "", "exampleId": "210iframeExample1", "runCode": ""}, {"code": "if ($.browser.safari) {\n    alert(\"this is safari!\");\n }", "htmlCode": "if ($.browser.safari) {\n    alert(\"this is safari!\");\n }", "desc": "Alerts \"this is safari!\" only for safari browsers", "css": "", "inhead": "", "html": "", "exampleId": "210iframeExample2", "runCode": ""}]}, "browser.version211": {"id": 211, "searchname": "browser.version", "name": "$.browser.version", "type": "property", "category": "Utilities", "subcategory": "User Agent", "return": "String", "added": "1.1.3", "sample": "", "desc": "The version number of the rendering engine for the user's browser.", "longdesc": "<p>Here are some typical results:<ul><li> Internet Explorer: 6.0, 7.0</li><li> Mozilla/Firefox/Flock/Camino: 1.7.12, 1.8.1.3</li><li> Opera: 9.20</li><li> Safari/Webkit: 312.8, 418.9</li></ul></p>", "params": [], "examples": [{"code": "\n\n    $(\"p\").html(\"The browser version is: <span>\" +\n                jQuery.browser.version + \"</span>\");\n", "htmlCode": "\n\n    $(\"p\").html(\"The browser version is: &lt;span&gt;\" +\n                jQuery.browser.version + \"&lt;/span&gt;\");\n", "desc": "Returns the browser version.", "css": "\n  p { color:blue; margin:20px; }\n  span { color:red; }\n  ", "inhead": "", "html": "<p>\n  </p>", "exampleId": "211iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n\n    $(\"p\").html(\"The browser version is: <span>\" +\n                jQuery.browser.version + \"</span>\");\n\n  });\n</script>\n<style>\n\n  p { color:blue; margin:20px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<p>\n  </p>\n</body>\n</html>"}, {"code": "if ( $.browser.msie )\n  alert( $.browser.version );\n}", "htmlCode": "if ( $.browser.msie )\n  alert( $.browser.version );\n}", "desc": "Alerts the version of IE that is being used", "css": "", "inhead": "", "html": "", "exampleId": "211iframeExample1", "runCode": ""}, {"code": "\nif (jQuery.browser.msie) {\n  alert(parseInt(jQuery.browser.version));\n}\n", "htmlCode": "\nif (jQuery.browser.msie) {\n  alert(parseInt(jQuery.browser.version));\n}\n", "desc": "Often you only care about the \"major number,\" the whole number. This can be accomplished with JavaScript's built-in parseInt() function:", "css": "", "inhead": "", "html": "", "exampleId": "211iframeExample2", "runCode": ""}]}, "boxmodel212": {"id": 212, "searchname": "boxmodel", "name": "$.boxModel", "type": "property", "category": "Utilities", "subcategory": "User Agent", "return": "Boolean", "added": "1.0", "sample": "", "desc": "States if the current page, in the user's browser, is being rendered using the [http://www.w3.org/TR/REC-CSS2/box.html W3C CSS Box Model].", "longdesc": "", "params": [], "examples": [{"code": "\n\n    $(\"p\").html(\"The box model for this iframe is: <span>\" +\n                jQuery.boxModel + \"</span>\");\n", "htmlCode": "\n\n    $(\"p\").html(\"The box model for this iframe is: &lt;span&gt;\" +\n                jQuery.boxModel + \"&lt;/span&gt;\");\n", "desc": "Returns the box model for the iframe.", "css": "\n  p { color:blue; margin:20px; }\n  span { color:red; }\n  ", "inhead": "", "html": "<p>\n  </p>", "exampleId": "212iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n\n    $(\"p\").html(\"The box model for this iframe is: <span>\" +\n                jQuery.boxModel + \"</span>\");\n\n  });\n</script>\n<style>\n\n  p { color:blue; margin:20px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<p>\n  </p>\n</body>\n</html>"}, {"code": "$.boxModel", "htmlCode": "$.boxModel", "desc": "Returns false if the page is in QuirksMode in Internet Explorer", "css": "", "inhead": "", "html": "", "exampleId": "212iframeExample1", "runCode": ""}]}, "each213": {"id": 213, "searchname": "each", "name": "$.each", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Object", "added": "1.0", "sample": "", "desc": "A generic iterator function, which can be used to seamlessly iterate over both objects and arrays.", "longdesc": "<p>This function is not the same as $().each() - which is used to iterate, exclusively, over a jQuery object. This function can be used to iterate over anything.</p><p>The callback has two arguments:the key (objects) or index (arrays) as the first, and the value as the second.</p><p>If you wish to break the each() loop at a particular iteration you can do so by making your function return false. Other return values are ignored.</p>", "params": [{"optional": false, "name": "object", "type": "Object", "desc": "The object or array to iterate over."}, {"optional": false, "name": "callback", "type": "Function", "desc": "The function that will be executed on every object.\n<pre>function callback(indexInArray, valueOfElement) {\n  var booleanKeepGoing;\n\n  this; // == valueOfElement\n\n  return booleanKeepGoing; // optional, unless false \n                           // and want to stop looping\n}\n</pre>"}], "examples": [{"code": "\n    var arr = [ \"one\", \"two\", \"three\", \"four\", \"five\" ];\n    var obj = { one:1, two:2, three:3, four:4, five:5 };\n\n    jQuery.each(arr, function() {\n      $(\"#\" + this).text(\"My id is \" + this + \".\");\n      return (this != \"four\"); // will stop running to skip \"five\"\n    });\n\n    jQuery.each(obj, function(i, val) {\n      $(\"#\" + i).append(document.createTextNode(\" - \" + val));\n    });\n", "htmlCode": "\n    var arr = [ \"one\", \"two\", \"three\", \"four\", \"five\" ];\n    var obj = { one:1, two:2, three:3, four:4, five:5 };\n\n    jQuery.each(arr, function() {\n      $(\"#\" + this).text(\"My id is \" + this + \".\");\n      return (this != \"four\"); // will stop running to skip \"five\"\n    });\n\n    jQuery.each(obj, function(i, val) {\n      $(\"#\" + i).append(document.createTextNode(\" - \" + val));\n    });\n", "desc": "Iterates through the array displaying each number as both a word and numeral", "css": "\n  div { color:blue; }\n  div#five { color:red; }\n  ", "inhead": "", "html": "<div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>\n  <div id=\"four\"></div>\n  <div id=\"five\"></div>", "exampleId": "213iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var arr = [ \"one\", \"two\", \"three\", \"four\", \"five\" ];\n    var obj = { one:1, two:2, three:3, four:4, five:5 };\n\n    jQuery.each(arr, function() {\n      $(\"#\" + this).text(\"My id is \" + this + \".\");\n      return (this != \"four\"); // will stop running to skip \"five\"\n    });\n\n    jQuery.each(obj, function(i, val) {\n      $(\"#\" + i).append(document.createTextNode(\" - \" + val));\n    });\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  div#five { color:red; }\n  \n</style>\n</head>\n<body>\n<div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>\n  <div id=\"four\"></div>\n  <div id=\"five\"></div>\n</body>\n</html>"}, {"code": " $.each( [0,1,2], function(i, n){\n   alert( \"Item #\" + i + \": \" + n );\n });", "htmlCode": " $.each( [0,1,2], function(i, n){\n   alert( \"Item #\" + i + \": \" + n );\n });", "desc": "Iterates over items in an array, accessing both the current item and its index.", "css": "", "inhead": "", "html": "", "exampleId": "213iframeExample1", "runCode": ""}, {"code": "$.each( { name: \"John\", lang: \"JS\" }, function(i, n){\n   alert( \"Name: \" + i + \", Value: \" + n );\n });", "htmlCode": "$.each( { name: \"John\", lang: \"JS\" }, function(i, n){\n   alert( \"Name: \" + i + \", Value: \" + n );\n });", "desc": "Iterates over the properties in an object, accessing both the current item and its key.", "css": "", "inhead": "", "html": "", "exampleId": "213iframeExample2", "runCode": ""}]}, "extend214": {"id": 214, "searchname": "extend", "name": "$.extend", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Object", "added": "1.0", "sample": "", "desc": "Extend one object with one or more others, returning the original, modified, object.", "longdesc": "<p>If no target is specified, the JQuery namespace itself is extended.  This can be useful for plugin authors wishing to add new methods to JQuery.</p><p>If a boolean false is specified as the first argument, JQuery performs a deep copy, recursively copying any objects it finds.  Otherwise, the copy will share structure with the original object(s).</p><p>Undefined properties are not copied.  However, properties inherited from the object's prototype <em>will</em> be copied over.</p>", "params": [{"optional": false, "name": "target", "type": "Object", "desc": "The object to extend."}, {"optional": false, "name": "object1", "type": "Object", "desc": "The object that will be merged into the first."}, {"optional": true, "name": "objectN", "type": "Object", "desc": "More objects to merge into the first."}], "examples": [{"code": "var settings = { validate: false, limit: 5, name: \"foo\" };\nvar options = { validate: true, name: \"bar\" };\njQuery.extend(settings, options);", "htmlCode": "var settings = { validate: false, limit: 5, name: \"foo\" };\nvar options = { validate: true, name: \"bar\" };\njQuery.extend(settings, options);", "desc": "Merge settings and options, modifying settings.", "css": "", "inhead": "", "html": "", "exampleId": "214iframeExample0", "runCode": ""}, {"code": "var empty = {}\nvar defaults = { validate: false, limit: 5, name: \"foo\" };\nvar options = { validate: true, name: \"bar\" };\nvar settings = $.extend(empty, defaults, options);", "htmlCode": "var empty = {}\nvar defaults = { validate: false, limit: 5, name: \"foo\" };\nvar options = { validate: true, name: \"bar\" };\nvar settings = $.extend(empty, defaults, options);", "desc": "Merge defaults and options, without modifying the defaults.", "css": "", "inhead": "", "html": "", "exampleId": "214iframeExample1", "runCode": ""}]}, "grep215": {"id": 215, "searchname": "grep", "name": "$.grep", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Array", "added": "1.0", "sample": "", "desc": "Filter items out of an array, by using a filter function.", "longdesc": "<p>The specified function will be passed two arguments: The current array item and the filter function. The function must return 'true' to keep the item in the array, false to remove it.</p>", "params": [{"optional": false, "name": "array", "type": "Array", "desc": "The Array to find items in."}, {"optional": false, "name": "callback", "type": "Function", "desc": "The function to process each item against.  The first argument to the function is the list item, and the second argument is the list index.  The function should return a Boolean value.  The \"lambda-form\" function feature was removed in jQuery 1.2.3 to help compatibility with other frameworks.\n<pre>function callback(elementOfArray, indexInArray) {\n  var shouldKeepIt;\n\n  this; // unmapped\n\n  return shouldKeepIt;\n}\n</pre>"}, {"optional": true, "name": "invert", "type": "Boolean", "desc": "If \"invert\" is false, or not provided, then the function returns an array consisting of all elements for which \"callback\" returns true.  If \"invert\" is true, then the function returns an array consisting of all elements for which \"callback\" returns false."}], "examples": [{"code": "\n    var arr = [ 1, 9, 3, 8, 6, 1, 5, 9, 4, 7, 3, 8, 6, 9, 1 ];\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function(n, i){\n      return (n != 5 && i > 4);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function (a) { return a != 9; });\n    $(\"span\").text(arr.join(\", \"));\n", "htmlCode": "\n    var arr = [ 1, 9, 3, 8, 6, 1, 5, 9, 4, 7, 3, 8, 6, 9, 1 ];\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function(n, i){\n      return (n != 5 && i &gt; 4);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function (a) { return a != 9; });\n    $(\"span\").text(arr.join(\", \"));\n", "desc": "Filters the original array of numbers leaving that are not 5 and have an index greater than 3.  Then it removes all 9s while inverting it.", "css": "\n  div { color:blue; }\n  p { color:green; margin:0; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div></div>\n  <p></p>\n  <span></span>\n  ", "exampleId": "215iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var arr = [ 1, 9, 3, 8, 6, 1, 5, 9, 4, 7, 3, 8, 6, 9, 1 ];\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function(n, i){\n      return (n != 5 && i > 4);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function (a) { return a != 9; });\n    $(\"span\").text(arr.join(\", \"));\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  p { color:green; margin:0; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <p></p>\n  <span></span>\n  \n</body>\n</html>"}, {"code": "$.grep( [0,1,2], function(n,i){\n   return n > 0;\n });", "htmlCode": "$.grep( [0,1,2], function(n,i){\n   return n &gt; 0;\n });", "desc": "Filter an array of numbers to include only numbers bigger then zero.", "css": "", "inhead": "", "html": "", "exampleId": "215iframeExample1", "runCode": ""}]}, "makearray216": {"id": 216, "searchname": "makearray", "name": "$.makeArray", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Array", "added": "1.2", "sample": "", "desc": "Turns an array-like object into a true array.", "longdesc": "<p>Array-like objects have a length property and its properties are numbered from 0 to length - 1.  Typically it will be unnecessary to use this function if you are using jQuery which uses this function internally.</p>", "params": [{"optional": false, "name": "obj", "type": "Object", "desc": "Array-like object to turn in to an actual Array."}], "examples": [{"code": "\n    var arr = jQuery.makeArray(document.getElementsByTagName(\"div\"));\n    arr.reverse(); // use an Array method on list of dom elements\n    $(arr).appendTo(document.body);\n", "htmlCode": "\n    var arr = jQuery.makeArray(document.getElementsByTagName(\"div\"));\n    arr.reverse(); // use an Array method on list of dom elements\n    $(arr).appendTo(document.body);\n", "desc": "Turn a collection of HTMLElements into an Array of them.", "css": "\n  div { color:red; }\n  ", "inhead": "", "html": "<div>First</div>\n  <div>Second</div>  \n  <div>Third</div>\n  <div>Fourth</div>", "exampleId": "216iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var arr = jQuery.makeArray(document.getElementsByTagName(\"div\"));\n    arr.reverse(); // use an Array method on list of dom elements\n    $(arr).appendTo(document.body);\n\n  });\n</script>\n<style>\n\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<div>First</div>\n  <div>Second</div>  \n  <div>Third</div>\n  <div>Fourth</div>\n</body>\n</html>"}]}, "map217": {"id": 217, "searchname": "map", "name": "$.map", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Array", "added": "1.0", "sample": "", "desc": "Translate all items in an array to another array of items.", "longdesc": "<p>The translation function that is provided to this method is called for each item in the array and is passed two arguments: The item to be translated, and its index within the array.</p><p>The function can then return the translated value, 'null' (to remove the item), or an array of values - which will be flattened into the full array. </p>", "params": [{"optional": false, "name": "array", "type": "Array", "desc": "The Array to translate."}, {"optional": false, "name": "callback", "type": "Function", "desc": "The function to process each item against.  The argument to the function is the list item. The function can return any value.  The \"lambda-form\" function represented as a string no longer works.  It was removed in version 1.2.3 to increase compatibility with Adobe AIR.   \n<pre>function callback(elementOfArray, indexInArray) {\n  var replacementValue;\n\n  this; // unmapped\n\n  return replacementValue;\n}\n</pre>"}], "examples": [{"code": "\n    var arr = [ \"a\", \"b\", \"c\", \"d\", \"e\" ]\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function(n, i){\n      return (n.toUpperCase() + i);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function (a) { return a + a; });\n    $(\"span\").text(arr.join(\", \"));\n", "htmlCode": "\n    var arr = [ \"a\", \"b\", \"c\", \"d\", \"e\" ]\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function(n, i){\n      return (n.toUpperCase() + i);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function (a) { return a + a; });\n    $(\"span\").text(arr.join(\", \"));\n", "desc": "A couple examples of using .map()", "css": "\n  div { color:blue; }\n  p { color:green; margin:0; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div></div>\n  <p></p>\n  <span></span>\n  ", "exampleId": "217iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var arr = [ \"a\", \"b\", \"c\", \"d\", \"e\" ]\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function(n, i){\n      return (n.toUpperCase() + i);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function (a) { return a + a; });\n    $(\"span\").text(arr.join(\", \"));\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  p { color:green; margin:0; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <p></p>\n  <span></span>\n  \n</body>\n</html>"}, {"code": "$.map( [0,1,2], function(n){\n   return n + 4;\n });", "htmlCode": "$.map( [0,1,2], function(n){\n   return n + 4;\n });", "desc": "Maps the original array to a new one and adds 4 to each value.", "css": "", "inhead": "", "html": "", "exampleId": "217iframeExample1", "runCode": ""}, {"code": "$.map( [0,1,2], function(n){\n   return n > 0 ? n + 1 : null;\n });", "htmlCode": "$.map( [0,1,2], function(n){\n   return n &gt; 0 ? n + 1 : null;\n });", "desc": "Maps the original array to a new one and adds 1 to each value if it is bigger then zero, otherwise it's removed.", "css": "", "inhead": "", "html": "", "exampleId": "217iframeExample2", "runCode": ""}, {"code": "$.map( [0,1,2], function(n){\n   return [ n, n + 1 ];\n });", "htmlCode": "$.map( [0,1,2], function(n){\n   return [ n, n + 1 ];\n });", "desc": "Maps the original array to a new one, each element is added with it's original value and the value plus one.", "css": "", "inhead": "", "html": "", "exampleId": "217iframeExample3", "runCode": ""}, {"code": "$.map( [0,1,2,3], function (a) { return a * a; } );", "htmlCode": "$.map( [0,1,2,3], function (a) { return a * a; } );", "desc": "Maps the original array to a new one, each element is squared.", "css": "", "inhead": "", "html": "", "exampleId": "217iframeExample4", "runCode": ""}]}, "inarray218": {"id": 218, "searchname": "inarray", "name": "$.inArray", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Number", "added": "1.2", "sample": "", "desc": "Determine the index of the first parameter in the Array (-1 if not found).", "longdesc": "", "params": [{"optional": false, "name": "value", "type": "Any", "desc": "Value to see if it exists in the array."}, {"optional": false, "name": "array", "type": "Array", "desc": "Array to look through for the value."}], "examples": [{"code": "\n    var arr = [ 4, \"Pete\", 8, \"John\" ];\n\n    $(\"span:eq(0)\").text(jQuery.inArray(\"John\", arr));\n    $(\"span:eq(1)\").text(jQuery.inArray(4, arr));\n    $(\"span:eq(2)\").text(jQuery.inArray(\"David\", arr));\n", "htmlCode": "\n    var arr = [ 4, \"Pete\", 8, \"John\" ];\n\n    $(\"span:eq(0)\").text(jQuery.inArray(\"John\", arr));\n    $(\"span:eq(1)\").text(jQuery.inArray(4, arr));\n    $(\"span:eq(2)\").text(jQuery.inArray(\"David\", arr));\n", "desc": "", "css": "\n  div { color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>\"John\" found at <span></span></div>\n  <div>4 found at <span></span></div>\n  <div>\"David\" found at <span></span></div>", "exampleId": "218iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var arr = [ 4, \"Pete\", 8, \"John\" ];\n\n    $(\"span:eq(0)\").text(jQuery.inArray(\"John\", arr));\n    $(\"span:eq(1)\").text(jQuery.inArray(4, arr));\n    $(\"span:eq(2)\").text(jQuery.inArray(\"David\", arr));\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>\"John\" found at <span></span></div>\n  <div>4 found at <span></span></div>\n  <div>\"David\" found at <span></span></div>\n</body>\n</html>"}]}, "unique219": {"id": 219, "searchname": "unique", "name": "$.unique", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Array", "added": "1.1.3", "sample": "", "desc": "Remove all duplicate elements from an array of elements.", "longdesc": "", "params": [{"optional": false, "name": "array", "type": "Array", "desc": "The Array to translate."}], "examples": [{"code": "\n    var divs = $(\"div\").get();\n\n    // add 3 elements of class dup too (they are divs)\n    divs = divs.concat($(\".dup\").get());\n    $(\"div:eq(1)\").text(\"Pre-unique there are \" + divs.length + \" elements.\");\n\n    divs = jQuery.unique(divs);\n    $(\"div:eq(2)\").text(\"Post-unique there are \" + divs.length + \" elements.\")\n                  .css(\"color\", \"red\");\n", "htmlCode": "\n    var divs = $(\"div\").get();\n\n    // add 3 elements of class dup too (they are divs)\n    divs = divs.concat($(\".dup\").get());\n    $(\"div:eq(1)\").text(\"Pre-unique there are \" + divs.length + \" elements.\");\n\n    divs = jQuery.unique(divs);\n    $(\"div:eq(2)\").text(\"Post-unique there are \" + divs.length + \" elements.\")\n                  .css(\"color\", \"red\");\n", "desc": "Removes any duplicate elements from the array of divs.", "css": "\n  div { color:blue; }\n  ", "inhead": "", "html": "<div>There are 6 divs in this document.</div>\n  <div></div>\n  <div class=\"dup\"></div>\n  <div class=\"dup\"></div>\n  <div class=\"dup\"></div>\n  <div></div>", "exampleId": "219iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var divs = $(\"div\").get();\n\n    // add 3 elements of class dup too (they are divs)\n    divs = divs.concat($(\".dup\").get());\n    $(\"div:eq(1)\").text(\"Pre-unique there are \" + divs.length + \" elements.\");\n\n    divs = jQuery.unique(divs);\n    $(\"div:eq(2)\").text(\"Post-unique there are \" + divs.length + \" elements.\")\n                  .css(\"color\", \"red\");\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  \n</style>\n</head>\n<body>\n<div>There are 6 divs in this document.</div>\n  <div></div>\n  <div class=\"dup\"></div>\n  <div class=\"dup\"></div>\n  <div class=\"dup\"></div>\n  <div></div>\n</body>\n</html>"}, {"code": "$.unique(document.getElementsByTagName(\"div\"));", "htmlCode": "$.unique(document.getElementsByTagName(\"div\"));", "desc": "Removes any duplicate elements from the array of divs.", "css": "", "inhead": "", "html": "", "exampleId": "219iframeExample1", "runCode": ""}]}, "isfunction220": {"id": 220, "searchname": "isfunction", "name": "$.isFunction", "type": "function", "category": "Utilities", "subcategory": "Test operations", "return": "boolean", "added": "1.2", "sample": "", "desc": "Determine if the parameter passed is a function.", "longdesc": "", "params": [{"optional": false, "name": "obj", "type": "Object", "desc": "Object to test whether or not it is a function."}], "examples": [{"code": "\n    function stub() {\n    }\n    var objs = [\n          function () {},\n          { x:15, y:20 },\n          null,\n          stub,\n          \"function\"\n        ];\n\n    jQuery.each(objs, function (i) {\n      var isFunc = jQuery.isFunction(objs[i]);\n      $(\"span:eq( \" + i + \")\").text(isFunc);\n    });\n", "htmlCode": "\n    function stub() {\n    }\n    var objs = [\n          function () {},\n          { x:15, y:20 },\n          null,\n          stub,\n          \"function\"\n        ];\n\n    jQuery.each(objs, function (i) {\n      var isFunc = jQuery.isFunction(objs[i]);\n      $(\"span:eq( \" + i + \")\").text(isFunc);\n    });\n", "desc": "Test a few parameter examples.", "css": "\n  div { color:blue; margin:2px; font-size:14px; }\n  span { color:red; }\n  ", "inhead": "", "html": "\n  <div>jQuery.isFunction(objs[0]) = <span></span></div>\n  <div>jQuery.isFunction(objs[1]) = <span></span></div>\n  <div>jQuery.isFunction(objs[2]) = <span></span></div>\n  <div>jQuery.isFunction(objs[3]) = <span></span></div>\n  <div>jQuery.isFunction(objs[4]) = <span></span></div>\n  ", "exampleId": "220iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function stub() {\n    }\n    var objs = [\n          function () {},\n          { x:15, y:20 },\n          null,\n          stub,\n          \"function\"\n        ];\n\n    jQuery.each(objs, function (i) {\n      var isFunc = jQuery.isFunction(objs[i]);\n      $(\"span:eq( \" + i + \")\").text(isFunc);\n    });\n\n  });\n</script>\n<style>\n\n  div { color:blue; margin:2px; font-size:14px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n\n  <div>jQuery.isFunction(objs[0]) = <span></span></div>\n  <div>jQuery.isFunction(objs[1]) = <span></span></div>\n  <div>jQuery.isFunction(objs[2]) = <span></span></div>\n  <div>jQuery.isFunction(objs[3]) = <span></span></div>\n  <div>jQuery.isFunction(objs[4]) = <span></span></div>\n  \n</body>\n</html>"}, {"code": "$.isFunction(function(){});", "htmlCode": "$.isFunction(function(){});", "desc": "Finds out if the parameter is a funcion.", "css": "", "inhead": "", "html": "", "exampleId": "220iframeExample1", "runCode": ""}]}, "trim221": {"id": 221, "searchname": "trim", "name": "$.trim", "type": "function", "category": "Utilities", "subcategory": "String operations", "return": "String", "added": "1.0", "sample": "", "desc": "Remove the whitespace from the beginning and end of a string.", "longdesc": "<p>Uses a regular expression to remove whitespace from the given string.</p>", "params": [{"optional": false, "name": "str", "type": "String", "desc": "The string to trim."}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      var str = \"     lots of spaces before and after     \";\n      alert(\"'\" + str + \"'\");\n\n      str = jQuery.trim(str);\n      alert(\"'\" + str + \"' - no longer\");\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      var str = \"     lots of spaces before and after     \";\n      alert(\"'\" + str + \"'\");\n\n      str = jQuery.trim(str);\n      alert(\"'\" + str + \"' - no longer\");\n    });\n", "desc": "Removes the two whitespaces at the start and at the end of the string.", "css": "", "inhead": "", "html": "<button>Show Trim Example</button>", "exampleId": "221iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      var str = \"     lots of spaces before and after     \";\n      alert(\"'\" + str + \"'\");\n\n      str = jQuery.trim(str);\n      alert(\"'\" + str + \"' - no longer\");\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<button>Show Trim Example</button>\n</body>\n</html>"}, {"code": " $.trim(\"  hello, how are you?  \");", "htmlCode": " $.trim(\"  hello, how are you?  \");", "desc": "Removes the two whitespaces at the start and at the end of the string.", "css": "", "inhead": "", "html": "", "exampleId": "221iframeExample1", "runCode": ""}]}, "data222": {"id": 222, "searchname": "data", "name": "$.data", "type": "function", "category": "Internals", "subcategory": "Data Cache", "return": "Number", "added": "1.2", "sample": "", "desc": "Returns a unique ID for the element.", "longdesc": "<p>Typically this function will only be used internally.  It is called automatically when necessary when using the other data() functionality.</p>", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "DOM element of interest."}], "examples": [{"code": "\n    $(document.body).click(function(e) {\n      var id = jQuery.data(e.target);\n      $(\"span\").text(id);\n    });\n", "htmlCode": "\n    $(document.body).click(function(e) {\n      var id = jQuery.data(e.target);\n      $(\"span\").text(id);\n    });\n", "desc": "Get the store id of an element.  It is assigned on the data() function call if one hasn't been assigned yet.", "css": "\n  div { margin:5px; background:yellow; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>A div</div>\n  <div>Another</div>\n  <p>The id of this div is <span>?</span></p>", "exampleId": "222iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function(e) {\n      var id = jQuery.data(e.target);\n      $(\"span\").text(id);\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:5px; background:yellow; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>A div</div>\n  <div>Another</div>\n  <p>The id of this div is <span>?</span></p>\n</body>\n</html>"}]}, "data223": {"id": 223, "searchname": "data", "name": "$.data", "type": "function", "category": "Internals", "subcategory": "Data Cache", "return": "Any", "added": "1.2", "sample": "", "desc": "Returns value at named data store for the element.", "longdesc": "", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "DOM element of interest."}, {"optional": false, "name": "name", "type": "String", "desc": "Name of the data stored."}], "examples": [{"code": "\n    $(\"button\").click(function(e) {\n      var adiv = $(\"div\").get(0);\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = jQuery.data(adiv, \"blah\");\n          break;\n        case 1 :\n          jQuery.data(adiv, \"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          jQuery.data(adiv, \"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          jQuery.removeData(adiv);\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n", "htmlCode": "\n    $(\"button\").click(function(e) {\n      var adiv = $(\"div\").get(0);\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = jQuery.data(adiv, \"blah\");\n          break;\n        case 1 :\n          jQuery.data(adiv, \"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          jQuery.data(adiv, \"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          jQuery.removeData(adiv);\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n", "desc": "Get the data named \"blah\" stored at for an element.", "css": "\n  div { margin:5px; background:yellow; }\n  button { margin:5px; font-size:14px; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>A div</div>\n  <button>Get \"blah\" from the div</button>\n  <button>Set \"blah\" to \"hello\"</button>\n  <button>Set \"blah\" to 86</button>\n  <button>Remove \"blah\" from the div</button>\n  <p>The \"blah\" value of this div is <span>?</span></p>", "exampleId": "223iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function(e) {\n      var adiv = $(\"div\").get(0);\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = jQuery.data(adiv, \"blah\");\n          break;\n        case 1 :\n          jQuery.data(adiv, \"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          jQuery.data(adiv, \"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          jQuery.removeData(adiv);\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:5px; background:yellow; }\n  button { margin:5px; font-size:14px; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>A div</div>\n  <button>Get \"blah\" from the div</button>\n  <button>Set \"blah\" to \"hello\"</button>\n  <button>Set \"blah\" to 86</button>\n  <button>Remove \"blah\" from the div</button>\n  <p>The \"blah\" value of this div is <span>?</span></p>\n</body>\n</html>"}]}, "data224": {"id": 224, "searchname": "data", "name": "$.data", "type": "function", "category": "Internals", "subcategory": "Data Cache", "return": "Any", "added": "1.2", "sample": "", "desc": "Stores the value in the named spot and also returns the value.", "longdesc": "<p>This function can be useful for attaching data to elements without having to create a new expando.  It also isn't limited to a string.  The value can be any format.</p><p>To avoid conflicts in plugins, it is usually effective to store one object using the plugin name and put all the necessary information in that object.</p><p><code>\n  var obj = jQuery.data($(\"#target\").get(0), \"pluginname\", {});\n  obj[...] = ...\n</code></p>", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "DOM element of interest."}, {"optional": false, "name": "name", "type": "String", "desc": "Name of the data to store."}, {"optional": false, "name": "value", "type": "Any", "desc": "Value to be stored."}], "examples": [{"code": "\n    var adiv = $(\"div\").get(0);\n    jQuery.data(adiv, \"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text(jQuery.data(adiv, \"test\").first);\n    $(\"span:last\").text(jQuery.data(adiv, \"test\").last);\n", "htmlCode": "\n    var adiv = $(\"div\").get(0);\n    jQuery.data(adiv, \"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text(jQuery.data(adiv, \"test\").first);\n    $(\"span:last\").text(jQuery.data(adiv, \"test\").last);\n", "desc": "Store then retrieve a value from the div element.", "css": "\n  div { color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>\n    The values stored were \n    <span></span>\n    and\n    <span></span>\n  </div>", "exampleId": "224iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var adiv = $(\"div\").get(0);\n    jQuery.data(adiv, \"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text(jQuery.data(adiv, \"test\").first);\n    $(\"span:last\").text(jQuery.data(adiv, \"test\").last);\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>\n    The values stored were \n    <span></span>\n    and\n    <span></span>\n  </div>\n</body>\n</html>"}]}, "removedata225": {"id": 225, "searchname": "removedata", "name": "$.removeData", "type": "function", "category": "Internals", "subcategory": "Data Cache", "return": "", "added": "1.2", "sample": "", "desc": "Remove the expando attribute that allows data storage on an element.", "longdesc": "<p>This is the complement function to jQuery.data(elem) which is called as necessary by jQuery.data(elem, name, value).</p>", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "Element to delete the data store from."}], "examples": [{"code": "\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv);\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n", "htmlCode": "\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv);\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n", "desc": "Set a data store then remove it.", "css": "\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>", "exampleId": "225iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv);\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n\n  });\n</script>\n<style>\n\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>\n</body>\n</html>"}]}, "removedata226": {"id": 226, "searchname": "removedata", "name": "$.removeData", "type": "function", "category": "Internals", "subcategory": "Data Cache", "return": "", "added": "1.2", "sample": "", "desc": "Removes just this one named data store.", "longdesc": "<p>This is the complement function to jQuery.data(elem, name, value).</p>", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "Element to delete the named data store property from."}, {"optional": false, "name": "name", "type": "String", "desc": "The name of the data store property to remove."}], "examples": [{"code": "\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv, \"test1\");\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n", "htmlCode": "\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv, \"test1\");\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n", "desc": "Set a data store for 2 names then remove one of them.", "css": "\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>", "exampleId": "226iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv, \"test1\");\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n\n  });\n</script>\n<style>\n\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>\n</body>\n</html>"}]}, "param227": {"id": 227, "searchname": "param", "name": "$.param", "type": "function", "category": "Internals", "subcategory": "Ajax", "return": "String", "added": "1.2", "sample": "", "desc": "Serializes an array of form elements or an object (core of <a href='Ajax/serialize'>.serialize()</a> method).", "longdesc": "", "params": [{"optional": false, "name": "obj", "type": "Array&lt;Elements&gt;, jQuery, Object", "desc": "An Array or jQuery object is serialized by name/value pairs.  An object by key/value pairs."}], "examples": [{"code": "\n    var params = { width:1680, height:1050 };\n    var str = jQuery.param(params);\n    $(\"#results\").text(str);\n", "htmlCode": "\n    var params = { width:1680, height:1050 };\n    var str = jQuery.param(params);\n    $(\"#results\").text(str);\n", "desc": "Serialize a key/value object.", "css": "div { color:red; }", "inhead": "", "html": "<div id=\"results\"></div>", "exampleId": "227iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var params = { width:1680, height:1050 };\n    var str = jQuery.param(params);\n    $(\"#results\").text(str);\n\n  });\n</script>\n<style>\ndiv { color:red; }\n</style>\n</head>\n<body>\n<div id=\"results\"></div>\n</body>\n</html>"}]}}, "searchNames": ["jquery1", "jquery2", "jquery3", "jquery4", "each5", "eq6", "get7", "get8", "index9", "length10", "data11", "data12", "removedata13", "fn.extend14", "extend15", "noconflict16", "noconflict17", "id18", "element19", "class20", "all21", "multiple22", "descendant23", "child24", "next25", "siblings26", "first27", "last28", "not29", "even30", "odd31", "eq32", "gt33", "lt34", "header35", "animated36", "contains37", "empty38", "has39", "parent40", "hidden41", "visible42", "attributehas43", "attributeequals44", "attributenotequal45", "attributestartswith46", "attributeendswith47", "attributecontains48", "attributemultiple49", "nthchild50", "firstchild51", "lastchild52", "onlychild53", "input54", "text55", "password56", "radio57", "checkbox58", "submit59", "image60", "reset61", "button62", "file63", "hidden64", "enabled65", "disabled66", "checked67", "selected68", "attr69", "attr70", "attr71", "attr72", "removeattr73", "addclass74", "hasclass75", "removeclass76", "toggleclass77", "html78", "html79", "text80", "text81", "val82", "val83", "val84", "eq85", "hasclass86", "filter87", "filter88", "is89", "map90", "not91", "slice92", "add93", "children94", "contents95", "find96", "next97", "nextall98", "parent99", "parents100", "prev101", "prevall102", "siblings103", "andself104", "end105", "html106", "html107", "text108", "text109", "append110", "appendto111", "prepend112", "prependto113", "after114", "before115", "insertafter116", "insertbefore117", "wrap118", "wrap119", "wrapall120", "wrapall121", "wrapinner122", "wrapinner123", "replacewith124", "replaceall125", "empty126", "remove127", "clone128", "clone129", "css130", "css131", "css132", "offset133", "height134", "height135", "width136", "width137", "ready138", "bind139", "one140", "trigger141", "triggerhandler142", "unbind143", "hover144", "toggle145", "blur146", "blur147", "change148", "change149", "click150", "click151", "dblclick152", "dblclick153", "error154", "error155", "focus156", "focus157", "keydown158", "keydown159", "keypress160", "keypress161", "keyup162", "keyup163", "load164", "mousedown165", "mousemove166", "mouseout167", "mouseover168", "mouseup169", "resize170", "scroll171", "select172", "select173", "submit174", "submit175", "unload176", "show177", "show178", "hide179", "hide180", "toggle181", "slidedown182", "slideup183", "slidetoggle184", "fadein185", "fadeout186", "fadeto187", "animate188", "animate189", "stop190", "queue191", "queue192", "queue193", "dequeue194", "ajax195", "load196", "get197", "getjson198", "getscript199", "post200", "ajaxcomplete201", "ajaxerror202", "ajaxsend203", "ajaxstart204", "ajaxstop205", "ajaxsuccess206", "ajaxsetup207", "serialize208", "serializearray209", "browser210", "browser.version211", "boxmodel212", "each213", "extend214", "grep215", "makearray216", "map217", "inarray218", "unique219", "isfunction220", "trim221", "data222", "data223", "data224", "removedata225", "removedata226", "param227"], "categories": [{"name": "Core", "subcategories": ["$(...) The jQuery Function", "jQuery Object Accessors", "Data Cache", "Plugins", "Interoperability"]}, {"name": "Selectors", "subcategories": ["Basics", "Hierarchy", "Basic Filters", "Content Filters", "Visibility Filters", "Attribute Filters", "Child Filters", "Forms", "Form Filters"]}, {"name": "Attributes", "subcategories": ["Attr", "Class", "HTML", "Text", "Value"]}, {"name": "Traversing", "subcategories": ["Filtering", "Finding", "Chaining"]}, {"name": "Manipulation", "subcategories": ["Changing Contents", "Inserting Inside", "Inserting Outside", "Inserting Around", "Replacing", "Removing", "Copying"]}, {"name": "CSS", "subcategories": ["CSS", "Positioning", "Height and Width"]}, {"name": "Events", "subcategories": ["Page Load", "Event Handling", "Interaction Helpers", "Event Helpers"]}, {"name": "Effects", "subcategories": ["Basics", "Sliding", "Fading", "Custom"]}, {"name": "Ajax", "subcategories": ["Ajax Requests", "Ajax Events", "Misc"]}, {"name": "Utilities", "subcategories": ["User Agent", "Array and Object operations", "Test operations", "String operations"]}, {"name": "Internals", "subcategories": ["Data Cache", "Ajax"]}]});
0
\ No newline at end of file
0
lib/docs/.svn/text-base/api-docs.xml.svn-base
4241 additions, 0 deletions not shown
0
lib/docs/.svn/text-base/plugins.xml.svn-base
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
0
@@ -0,0 +1,265 @@
0
+<?xml version="1.0" ?><docs startdoc="UI" timestamp="2009-01-11T17:18:15Z"><cat value="UI/Draggable"><subcat value="Plugin methods"><function cat="UI/Draggable" name="draggable" return="jQuery" timestamp="2009-01-05T17:55:30Z"><desc>Creates new draggables on the nodeset supplied by the query.</desc><longdesc>This jQuery plugin makes DOM nodes draggable by mouse. You can additionally supply a great range of options to make them fit your needs.
0
+
0
+All callbacks (start,stop,drag) receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):
0
+
0
+* '''ui.options''' - options used to initialize the draggable
0
+* '''ui.helper''' - the JQuery object representing the helper that's being dragged
0
+* '''ui.position''' - current position of the helper as { top, left } object, relative to the offset element
0
+* '''ui.absolutePosition''' - current absolute position of the helper as { top, left } object, relative to page
0
+</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the draggable. All options are optional.</desc></params><option default="parent" name="appendTo" type="Element, Selector"><desc>For a draggable with a ''helper'' specified, the matched element passed to ''appendTo'' will be used as the helper's container. If not specified, the helper is appended to the same container as the draggable.</desc></option><option default="false" name="axis" type="String"><desc>Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: 'x', 'y'.</desc></option><option default="':input'" name="cancel" type="Selector"><desc>Prevents dragging if you start on elements matching the selector. </desc></option><option name="containment" type="Element, Selector"><desc>Constrains dragging to within the bounds of the specified element - can be a DOM element, 'parent', 'document', 'window', or a jQuery selector.</desc></option><option default=" 'default'" name="cursor" type="String"><desc>The css cursor for the helper during the drag operation. </desc></option><option default=" false" name="connectToSortable" type="Array, Selector"><desc>An Array with comma seperated selector strings that match sortable lists, for example [&quot;div ul&quot;, &quot;ul.myclass&quot;], or alternatively a jQuery selector. The better choice is the Array, if the selection needs to be dynamic (i.e. at a later point, more/less lists match the selector). If this option is used (helper must be set to clone in order to work flawlessly), a draggable can be dragged onto a sortable list and then becomes part of it. </desc></option><option name="cursorAt" type="Object, Array"><desc>Moves the dragging element/helper so the cursor always appears to drag from the same position. Coordinates can be given as a hash using a combination of the keys ''top'', ''left'', ''right'', ''bottom''.</desc></option><option default="0" name="delay" type="Integer"><desc>Time in milliseconds to define when the dragging should start. It helps preventing unwanted drags when clicking on an element. </desc></option><option default="1" name="distance" type="Integer"><desc>Tolerance, in pixels, for when dragging should start. If specified, dragging will not start until after mouse is dragged beyond distance.</desc></option><option name="grid" type="[Integer x, Integer y]"><desc>Snaps the dragging element/helper to a grid, every x and y pixels. </desc></option><option name="handle" type="Element, Selector"><desc>Restricts drag start click to the specified element. Default value: draggable element.</desc></option><option default=" 'original'" name="helper" type="String, Function"><desc>Allows for a helper element to be used for dragging display. The 'clone' option will produce the 'ghosting' effect. Possible values: 'original', 'clone', Function. If you supply a function, it must return a valid DOM node. </desc></option><option default=" false" name="iframeFix" type="String, Boolean"><desc>Only useful in combination with cursorAt, or in any case, if the mouse cursor is not over the helper. It creates transparent overlays for all iframes on the page (if set to true, can be used to match certain iframes only if a selector is used) that are overlayed during the drag, so you can safely mouseover them without releasing the event. </desc></option><option default=" 1.0" name="opacity" type="Float"><desc>Opacity for the helper while being dragged. </desc></option><option default=" false" name="refreshPositions" type="Boolean"><desc> If set to true, all droppable positions are calculated on every mousemove. Caution: This solves issues on highly dynamic pages, but dramatically decreases performance. </desc></option><option default=" false " name="revert" type="Boolean"><desc>If set to true, the element will return to its start position when dragging stops. Also accepts the strings &quot;valid&quot; and &quot;invalid&quot;: If set to invalid, revert will only occur if the draggable has not been dropped on a droppable. For valid, it's the other way around. </desc></option><option default="500" name="revertDuration" type="Integer"><desc>The duration of the revert animation. Since version 1.6 stable.</desc></option><option default="false" name="scroll" type="Boolean"><desc>If true, container auto-scrolls while dragging. </desc></option><option default="20" name="scrollSensitivity" type="Integer"><desc>Distance in pixels from the edge of the view port after which the view port should scroll. Distance is relative to pointer, not the draggable. </desc></option><option default="20" name="scrollSpeed" type="Integer"><desc>The speed at which the window should scroll once the mouse pointer gets within the ''scrollSensitivity'' distance. </desc></option><option default="'default'" name="scope" type="String"><desc>Only useful if you have large collections of droppables. It's like an identifier that says what droppables a draggable can be dropped on. Must be set for both the draggable and the related droppables, works as addition to the droppable's accept option.  </desc></option><option default=" false" name="snap" type="Boolean,Selector"><desc> If set to a selector or to true (same as selector &quot;.ui-draggable&quot;), the new draggable will snap to the edges of the selected elements when coming to an edge of the element. </desc></option><option default=" 'both' " name="snapMode" type="&quot;inner&quot;,&quot;outer&quot;,&quot;both&quot;"><desc> If set, the dragged element will only snap to the outer edges or to the inner edges of the element. </desc></option><option default="20" name="snapTolerance" type="Integer"><desc> The distance in pixels from the snapping elements before the snapping should occur.</desc></option><option default="false" name="stack" type="Hash"><desc>Controls the z-Index of the defined group (key 'group' in the hash, accepts jQuery selector) automatically, always brings to front the dragged item. Very useful in things like window managers. Optionally, a 'min' key can be set, so the zIndex cannot go below that value.</desc></option><option name="zIndex" type="Integer"><desc>z-index for the helper while being dragged.</desc></option><option name="start" type="function(event, ui)"><desc>Function that gets called when dragging starts.</desc></option><option name="drag" type="function(event, ui)"><desc>Function that gets called when the mouse is moved during the dragging.</desc></option><option name="stop" type="function(event, ui)"><desc>Function that gets called when dragging stops.</desc></option><example><desc>Makes the div draggable.</desc><code>$(&quot;.block&quot;).draggable();</code><inhead>
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.draggable.js&quot;&gt;&lt;/script&gt;
0
+</inhead><html>&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;</html><css>
0
+  .block { 
0
+    border: 2px solid #0090DF;
0
+    background-color: #68BFEF;
0
+    width: 150px; 
0
+    height: 70px;
0
+    margin: 10px; 
0
+  }
0
+  </css></example><example><desc>Makes the div draggable.</desc><code>$(&quot;.block&quot;).draggable();</code><inhead>
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.draggable.js&quot;&gt;&lt;/script&gt;
0
+</inhead><html>&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;</html><css>
0
+  .block { 
0
+    border: 2px solid #0090DF;
0
+    background-color: #68BFEF;
0
+    width: 150px; 
0
+    height: 70px;
0
+    margin: 10px; 
0
+  }
0
+  </css></example><example><desc>Makes the div move to the top when dragged.</desc><code>$(&quot;.block&quot;).draggable({ stack: { group: '.block', min: 1 } });</code><inhead>
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.draggable.js&quot;&gt;&lt;/script&gt;
0
+</inhead><html>&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;</html><css>
0
+  .block { 
0
+    border: 2px solid #0090DF;
0
+    background-color: #68BFEF;
0
+    width: 50px; 
0
+    height: 20px;
0
+    margin: 10px; 
0
+  }
0
+  </css></example></function><function cat="UI/Draggable" name="draggable" return="jQuery" timestamp="2009-01-05T17:55:30Z"><desc>Temporarily disable the draggable functionality.</desc><longdesc>This method temporarily disables draggable functionality. It can later be reenabled by calling $(..).draggable(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params><example><desc>Makes the div draggable.</desc><code>$(&quot;.block&quot;).draggable();</code><inhead>
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.draggable.js&quot;&gt;&lt;/script&gt;
0
+</inhead><html>&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;</html><css>
0
+  .block { 
0
+    border: 2px solid #0090DF;
0
+    background-color: #68BFEF;
0
+    width: 150px; 
0
+    height: 70px;
0
+    margin: 10px; 
0
+  }
0
+  </css></example></function><function cat="UI/Draggable" name="draggable" return="jQuery" timestamp="2009-01-05T17:55:30Z"><desc> Enable the draggable functionality.</desc><longdesc>This method re-enables a previously disabled draggable.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Draggable" name="draggable" return="jQuery" timestamp="2009-01-05T17:55:30Z"><desc> Completely remove the draggable functionality.</desc><longdesc>This method removes the draggable functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Droppable"><subcat value="Plugin methods"><function cat="UI/Droppable" name="droppable" return="Dropset" timestamp="2008-11-24T13:53:10Z"><desc>Creates new droppables on the nodeset supplied by the query.</desc><longdesc>This jQuery plugin makes DOM nodes droppable (meaning they accept being dropped on by draggables). You can specify which (individually) or which kind of draggables each will accept.
0
+
0
+All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):
0
+
0
+* '''ui.options''' - options used to initialize the droppable
0
+* '''ui.position''' - current position of the draggable helper
0
+* '''ui.absolutePosition''' - current absolute position of the draggable helper
0
+* '''ui.draggable''' - current draggable element
0
+* '''ui.helper''' - current draggable helper
0
+</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the droppable. All options are optional.</desc></params><option name="accept" type="Boolean function(draggable)"><desc>This function is called for each draggable on the page, to provide a custom filter. Return true if draggable should be accepted.</desc></option><option name="accept" type="String"><desc>The string should be a jQuery selector. All draggables that match the selector will be accepted.</desc></option><option name="activeClass" type="String"><desc>The class that should be added to the droppable while an acceptable draggable is being dragged.</desc></option><option name="greedy" type="Boolean"><desc>If true, will prevent event propagation on nested droppables. Default value: false.</desc></option><option name="hoverClass" type="String"><desc>The class that should be added to the droppable while being hovered by an acceptable draggable.</desc></option><option name="tolerance" type="String"><desc>Specifies which mode to use for testing whether a draggable is 'over' a droppable. Possible values: 'fit', 'intersect', 'pointer', 'touch'. Default value: 'intersect'.</desc></option><option name="activate" type="function(event, ui)"><desc>This function is called any time an accepted draggable starts dragging.</desc></option><option name="deactivate" type="function(event, ui)"><desc>This function is called any time an accepted draggable stops dragging.</desc></option><option name="over" type="function(event, ui)"><desc>This function is called as an accepted draggable is dragged 'over' (within the tolerance of) this droppable.</desc></option><option name="out" type="function(event, ui)"><desc>This function is called when an accepted draggable is dragged out (within the tolerance of) this droppable.</desc></option><option name="drop" type="function(event, ui)"><desc>This function is called when an accepted draggable is dropped 'over' (within the tolerance of) this droppable.
0
+In the callback, $(this) represents the droppable the draggable is dropped on.
0
+$(ui.draggable) represents the draggable.</desc></option></function><function cat="UI/Droppable" name="droppable" return="jQuery" timestamp="2008-11-24T13:53:10Z"><desc>Temporarily disable the droppable functionality.</desc><longdesc>This method temporarily disables droppable functionality. It can later be reenabled by calling $(..).droppable(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Droppable" name="droppable" return="jQuery" timestamp="2008-11-24T13:53:10Z"><desc> Enable the droppable functionality.</desc><longdesc>This method re-enables a previously disabled droppable.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Droppable" name="droppable" return="jQuery" timestamp="2008-11-24T13:53:10Z"><desc> Completely remove the droppable functionality.</desc><longdesc>This method removes the droppable functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Sortable"><subcat value="Plugin methods"><function cat="UI/Sortable" name="sortable" return="" timestamp="2008-12-23T14:51:18Z"><desc>Creates new sortable on the nodeset supplied by the query.</desc><longdesc>This jQuery plugin makes DOM nodes sortable by mouse. You can additionally supply a great range of options to make them fit your needs.
0
+
0
+All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):
0
+
0
+* '''ui.position''' - current position of the helper
0
+* '''ui.absolutePosition''' - current absolute position of the helper
0
+* '''ui.helper''' - the current helper element (most often a clone of the item)
0
+* '''ui.placeholder''' - the placeholder (if you defined one)
0
+* '''ui.item''' - the current dragged element
0
+* '''ui.sender''' - the sortable where the item comes from (only exists if you move from one connected list to another)
0
+</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the sortable. All options are optional.</desc></params><option name="appendTo" type="String"><desc>Defaults to the parent, defines where the helper that moves with the mouse is being appended to during the drag (for example, to resolve overlap/zIndex issues).</desc></option><option name="axis" type="String"><desc>If defined, the items can be dragged only horizontally or vertically. Possible values:'x', 'y'</desc></option><option default="':input, button'." name="cancel" type="Selector"><desc>Prevents sorting if you start on elements matching the selector.</desc></option><option name="connectWith" type="Array"><desc>Takes an array of jQuery selectors that also have sortables applied. If used, the sortable is now connected to the other one-way, so you can drag from this sortable to the other. </desc></option><option name="containment" type="String"><desc>Constrains dragging to within the bounds of the specified element. Possible values: 'parent', 'document', jQuery String.</desc></option><option name="cursor" type="String"><desc>Defines the cursor that is being shown while sorting.</desc></option><option default="0" name="delay" type="Integer"><desc>Time in milliseconds to define when the sorting should start. It helps preventing unwanted drags when clicking on an element.</desc></option><option default="1" name="distance" type="Integer"><desc>Tolerance, in pixels, for when sorting should start. If specified, sorting will not start until after mouse is dragged beyond distance. Can be used to allow for clicks on elements within a handle.</desc></option><option default="true" name="dropOnEmpty" type="Boolean"><desc> If empty allows for an item to be dropped from a linked selectable.</desc></option><option name="handle" type="Selector, Element"><desc> See draggable options for an explanation. </desc></option><option default="false" name="forcePlaceholderSize" type="Boolean"><desc> It forces the placeholder to have a size. </desc></option><option name="grid" type="[Integer x, Integer y]"><desc>Snaps the dragging element/helper to a grid, every x and y pixels. </desc></option><option name="helper" type="Element function(event, element)"><desc>Allows for a helper element to be used for dragging display. The supplied function receives the event and the element being sorted, and should return a valid DOM node to be used as a custom proxy helper.</desc></option><option default=" '&gt; *' " name="items" type="Selector"><desc>Items to apply sorting to. </desc></option><option name="opacity" type="Float"><desc>Defines the opacity of the helper while 
0
+sorting. From 0.01 to 1</desc></option><option name="placeholder" type="String"><desc>Class that gets applied to the otherwise white space.</desc></option><option default="true " name="revert" type="Boolean"><desc>If set to true, the item will be reverted to its new DOM position with a smooth animation.</desc></option><option default="true " name="scroll" type="Boolean"><desc>If set to true, the page scrolls when coming to an edge. </desc></option><option default="20 " name="scrollSensitivity" type="Integer"><desc> Defines how near the mouse must be to an edge to start scrolling. </desc></option><option default="20 " name="scrollSpeed" type="Integer"><desc> The speed at which the window should scroll once the mouse pointer gets within the scrollSensitivity distance. </desc></option><option default="&quot;guess&quot;" name="tolerance" type="String"><desc>This is the way the reordering behaves during drag. Default is &quot;guess&quot;, which guesses what mode to use (&quot;intersect&quot; or &quot;tolerance&quot;), in some setups, &quot;pointer&quot; is more natural.</desc></option><option name="zIndex" type="Integer"><desc>z-index for element/helper while being sorted.</desc></option><option name="start" type="function(event, ui)"><desc>Function that gets called when sorting starts.</desc></option><option name="sort" type="function(event, ui)"><desc>Function that gets called during sorting.</desc></option><option name="change" type="function(event, ui)"><desc>Function that gets called during sorting, but only when the DOM position has changed.</desc></option><option name="beforeStop" type="function(event, ui)"><desc>Function that gets called when sorting stops, but when the placeholder/helper is still available.</desc></option><option name="stop" type="function(event, ui)"><desc>Function that gets called when sorting has stopped.</desc></option><option name="update" type="function(event, ui)"><desc>Function that gets called when the user stopped sorting and the DOM position has changed.</desc></option><option name="receive" type="function(event, ui)"><desc>Function that gets called when a connected sortable list has received an item from another list.</desc></option><option name="remove" type="function(event, ui)"><desc>Function that gets called when a sortable item has been dragged out from the list and into another.</desc></option><option name="over" type="function(event, ui)"><desc>Function that gets called when a sortable item is moved into a connected list.</desc></option><option name="out" type="function(event, ui)"><desc>Function that gets called when a sortable item is moved away from a connected list.</desc></option><option name="activate" type="function(event, ui)"><desc>Function that gets called when using connected lists, every connected list on drag start receives it.</desc></option><option name="deactivate" type="function(event, ui)"><desc>Function that gets called when sorting was stopped, is propagated to all possible connected lists.</desc></option></function><function cat="UI/Sortable" name="sortable" return="jQuery" timestamp="2008-12-23T14:51:18Z"><desc>Temporarily disable the sortable functionality.</desc><longdesc>This method temporarily disables sortable functionality. It can later be reenabled by calling $(..).sortable(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Sortable" name="sortable" return="jQuery" timestamp="2008-12-23T14:51:18Z"><desc> Enable the sortable functionality.</desc><longdesc>This method re-enables a previously disabled sortable.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Sortables" name="sortable" return="jQuery" timestamp="2008-12-23T14:51:18Z"><desc> Completely remove the sortable functionality.</desc><longdesc>This method removes the sortable functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function><function cat="UI/Sortable" name="sortable" return="String" timestamp="2008-12-23T14:51:18Z"><desc> Serializes the sortable's item id's into a form/ajax submittable string.</desc><longdesc>Calling this method produces a hash that can be appended to any url to easily submit a new item order back to the server.
0
+
0
+It works by default by looking at the id of each item in the format 'setname_number', and it spits out a hash like &quot;setname[]=number&amp;setname[]=number&quot;.
0
+
0
+You can also give in a option hash as second argument to custom define how the function works. The possible options are: 'key' (replaces part1[] with whatever you want), 'attribute' (test another attribute than 'id') and 'expression' (use your own regexp).
0
+
0
+If serialize returns an empty string, make sure the id attributes include an underscore.  They must be in the form: &quot;set_number&quot; For example, a 3 element list with id attributes foo_1, foo_5, foo_2 will serialize to foo[]=1&amp;foo[]=5&amp;foo[]=2. You can use an underscore, equal sign or hyphen to separate the set and number.  For example foo=1 or foo-1 or foo_1 all serialize to foo[]=1.
0
+</longdesc><params name="&quot;serialize&quot;" type="String"><desc></desc></params><params name="options" type="Hash"><desc>a key/value hash defining how serialize works.</desc></params><option name="attribute" type="String"><desc>the attribute that is parsed. Default: 'id'.</desc></option><option name="expression" type="Regexp"><desc>the expression used to parse the attribute. The default expression used is &quot;(.+)[-=_](.+)&quot;.</desc></option><option name="key" type="String"><desc>The key in the url hash. If not specified, it will take the first result of the expression.</desc></option></function><function cat="UI/Sortable" name="sortable" return="String[]" timestamp="2008-12-23T14:51:18Z"><desc> Serializes the sortable's item id's into an array of string.</desc><longdesc>
0
+
0
+If you have
0
+
0
+&amp;lt;ul id=&quot;a_sortable&quot;&amp;gt;&lt;br&gt;
0
+&amp;lt;li id=&quot;hello&quot;&amp;gt;Hello&amp;lt;/li&amp;gt;&lt;br&gt;
0
+&amp;lt;li id=&quot;goodbye&quot;&amp;gt;Good bye&amp;lt;/li&amp;gt;&lt;br&gt;
0
+&amp;lt;/ul&amp;gt;
0
+
0
+and do
0
+
0
+var result = $('#a_sortable').sortable('toArray');
0
+
0
+then
0
+
0
+result[0] will contain &quot;hello&quot; and result[1] will contain &quot;goodbye&quot;.
0
+</longdesc><params name="&quot;toArray&quot;" type="String"><desc></desc></params></function><function cat="UI/Sortable" name="sortable" return="jQuery" timestamp="2008-12-23T14:51:18Z"><desc> Refresh the sortable items.</desc><longdesc>Custom trigger the reloading of all sortable items, causing new items to be recognized.</longdesc><params name="&quot;refresh&quot;" type="String"><desc></desc></params></function><function cat="UI/Sortable" name="sortable" return="jQuery" timestamp="2008-12-23T14:51:18Z"><desc> Refresh the cached positions of the sortables' items.</desc><longdesc>Calling this method refreshes the cached item positions of all sortables. This is usually done automatically by the script and slows down performance. Use wisely.</longdesc><params name="&quot;refreshPositions&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Selectable"><subcat value="Plugin methods"><function cat="UI/Selectable" name="selectable" return="" timestamp="2008-11-24T13:56:03Z"><desc>Creates new selectable on the nodeset supplied by the query.</desc><longdesc></longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the selectable. All options are optional.</desc></params><option name="autoRefresh" type="Boolean"><desc>This determines whether to refresh (recalculate) the position and size of each selectee at the beginning of each select operation. If you have many many items, you may want to set this to false and call the refresh method manually. Default value: true</desc></option><option name="filter" type="Selector"><desc>The matching child elements will be made selectees (able to be selected). Default value: '*'</desc></option><option name="selected" type="function(event, ui)"><desc>This callback is fired at the end of the select operation, on each element added to the selection.</desc></option><option name="selecting" type="function(event, ui)"><desc>This callback is fired during the select operation, on each element added to the selection.</desc></option><option name="start" type="function(event, ui)"><desc>This callback is fired at the beginning of the select operation.</desc></option><option name="stop" type="function(event, ui)"><desc>This callback is fired at the end of the select operation.</desc></option><option name="unselected" type="function(event, ui)"><desc>This callback is fired at the end of the select operation, on each element removed from the selection.</desc></option><option name="unselecting" type="function(event, ui)"><desc>This callback is fired during the select operation, on each element removed from the selection.</desc></option></function><function cat="UI/Selectable" name="selectable" return="jQuery" timestamp="2008-11-24T13:56:03Z"><desc>Temporarily disable the selectable functionality.</desc><longdesc>This method temporarily disables selectable functionality. It can later be reenabled by calling $(..).selectable(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Selectable" name="selectable" return="jQuery" timestamp="2008-11-24T13:56:03Z"><desc> Enable the selectable functionality.</desc><longdesc>This method re-enables a previously disabled selectable.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Selectable" name="selectable" return="jQuery" timestamp="2008-11-24T13:56:03Z"><desc> Refresh the position and size of each selectee element</desc><longdesc>This method can be used to manually recalculate the position and size of each selectee element. Very useful if autoRefresh is set to false.</longdesc><params name="&quot;refresh&quot;" type="String"><desc></desc></params></function><function cat="UI/Selectable" name="selectable" return="jQuery" timestamp="2008-11-24T13:56:03Z"><desc> Toggles the state of selectable functionality.</desc><longdesc>This method either enables or disables selecting based on the current state.</longdesc><params name="&quot;toggle&quot;" type="String"><desc></desc></params></function><function cat="UI/Selectable" name="selectable" return="jQuery" timestamp="2008-11-24T13:56:03Z"><desc> Completely remove the selectable functionality.</desc><longdesc>This method removes the selectable functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Resizable"><subcat value="Plugin methods"><function cat="UI/Resizable" name="resizable" timestamp="2008-11-24T13:57:18Z"><desc>Creates new resizables on the nodeset supplied by the query.</desc><longdesc>This jQuery plugin makes DOM nodes resizable (meaning they have draggable resize handles). You can specify one or more handles as well as min and max width and height.
0
+
0
+All callbacks (start,stop,resize) receive two arguments: The original browser event and a prepared ui object.  The ui object has the following fields:
0
+
0
+* '''ui.helper''' - a jQuery object containing the helper element
0
+* '''ui.originalPosition''' - {top, left} before resizing started
0
+* '''ui.originalSize''' - {width, height} before resizing started
0
+* '''ui.position''' - {top, left} current position
0
+* '''ui.size''' - {width, height} current size
0
+</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the resizable. All options are optional, but a resizable will not be useful without at least one handle.</desc></params><option default="false" name="animate" type="Boolean"><desc>Animates to the final size after resizing.</desc></option><option default="&quot;slow&quot;" name="animateDuration" type="Integer"><desc>Duration time for animating. Time in milliseconds or &quot;slow&quot;/&quot;normal&quot;/&quot;fast&quot;.</desc></option><option default="&quot;swing&quot;" name="animateEasing" type="String"><desc>Easing effect for animating.</desc></option><option default="false" name="alsoResize" type="Selector"><desc>Resize these elements synchronous when resizing.</desc></option><option default="false" name="aspectRatio" type="Boolean, Number"><desc>When set to true, resizing is constrained by the original aspect ratio. If an alternate ratio is desired, you can submit a number and then the aspect ratio will be constrained by height \ width. </desc></option><option default="false" name="autoHide" type="Boolean"><desc>When set to true, automatically hides the handles except when the mouse hovers over the element.</desc></option><option default="':input'" name="cancel" type="Selector"><desc>Prevents resizing if you start on elements matching the selector. </desc></option><option default="false" name="containment" type="Element, Selector"><desc>Constrains resizing to within the bounds of the specified element - can be a DOM element, 'parent', 'document' or a jQuery selector.</desc></option><option default="0" name="delay" type="Integer"><desc>Time in milliseconds to define when the dragging should start. It helps preventing unwanted drags when clicking on an element. </desc></option><option default="true" name="disableSelection" type="Boolean"><desc>When set to true, stops users from selecting handles and helpers.</desc></option><option default="1" name="distance" type="Integer"><desc>Tolerance, in pixels, for when resizing should start. If specified, resizing will not start until after mouse is moved beyond distance.</desc></option><option default="false" name="ghost" type="Boolean"><desc>When set to true, shows a substitute element when resizing.</desc></option><option default="false" name="grid" type="[Integer x, Integer y]"><desc>Snaps the resizing element to a grid size, every x and y pixels. </desc></option><option name="handles" type="{n, e, s, w, ne, se, sw, nw, all}"><desc>Each handle string (if specified) should be a jquery selector matching the child element of the resizable to use as the handle. If the handle is not a child of the resizable, you can pass in the DOM node or a valid jQuery object directly. </desc></option><option default="null" name="helper" type="String"><desc>This is the css class that will be added to a proxy element to outline the resize during the drag of the resize handle. Once the resize is complete, the original element is sized.</desc></option><option default="false" name="knobHandles" type="Boolean"><desc> Use square handlebars as resize handles, rather than the default border.</desc></option><option default="null" name="maxHeight" type="Int"><desc>This is the maximum height the resizable should be allowed to resize to.</desc></option><option default="null" name="maxWidth" type="Int"><desc>This is the maximum width the resizable should be allowed to resize to.</desc></option><option default="10" name="minHeight" type="Int"><desc>This is the minimum height the resizable should be allowed to resize to.</desc></option><option default="10" name="minWidth" type="Int"><desc>This is the minimum width the resizable should be allowed to resize to.</desc></option><option default="true" name="preserveCursor" type="Boolean"><desc> Whether shows direction cursors when resizing.</desc></option><option default="true" name="preventDefault" type="Boolean"><desc> Whether prevent Safari's default resizing function on textareas.</desc></option><option default="false" name="proportionallyResize" type="Array"><desc>Advanced option that allows other elements to get proportionally resized together with the original one. Just specify jquery string in this array or directly insert DOM nodes.</desc></option><option default="false" name="transparent" type="Boolean"><desc> Whether the element is transparent when resizing.</desc></option><option name="start" type="function(event, ui)"><desc>This function is called at the start of a resize operation.</desc></option><option name="resize" type="function(event, ui)"><desc>This function is called during the resize, on the drag of the resize handler.</desc></option><option name="stop" type="function(event, ui)"><desc>This function is called at the end of a resize operation.</desc></option></function><function cat="UI/Resizable" name="resizable" return="jQuery" timestamp="2008-11-24T13:57:18Z"><desc>Temporarily disable the resizable functionality.</desc><longdesc>This method temporarily disables resizable functionality. It can later be reenabled by calling $(..).resizable(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Resizable" name="resizable" return="jQuery" timestamp="2008-11-24T13:57:18Z"><desc> Enable the resizable functionality.</desc><longdesc>This method re-enables a previously disabled resizable.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Resizable" name="resizable" return="jQuery" timestamp="2008-11-24T13:57:18Z"><desc> Completely remove the resizable functionality.</desc><longdesc>This method removes the resizable functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Accordion"><subcat value="Plugin methods"><function cat="UI/Accordion" name="accordion" return="jQuery" timestamp="2009-01-10T19:48:08Z"><desc>Make the selected elements Accordion widgets.</desc><longdesc> Semantic requirements:
0
+
0
+The markup of your accordion container needs pairs of headers and content panels, grouped by another element. By default, the header elements are anchors, assuming the following structure:
0
+
0
+&lt;pre&gt;&amp;lt;div id=&quot;accordion&quot;&amp;gt;
0
+  &amp;lt;div&amp;gt;
0
+    &amp;lt;a href=&quot;#&quot;&amp;gt;First header&amp;lt;/a&amp;gt;
0
+    &amp;lt;div&amp;gt;First content&amp;lt;/div&amp;gt;
0
+  &amp;lt;/div&amp;gt;
0
+  &amp;lt;div&amp;gt;
0
+    &amp;lt;a href=&quot;#&quot;&amp;gt;Second header&amp;lt;/a&amp;gt;
0
+    &amp;lt;div&amp;gt;Second content&amp;lt;/div&amp;gt;
0
+  &amp;lt;/div&amp;gt;
0
+&amp;lt;/div&amp;gt;&lt;/pre&gt;
0
+
0
+If you use a different element for the header, specify the header-option with an appropiate selector, eg. header: &quot;h3&quot;. The content element must be always next to it's header.
0
+
0
+If you have links inside the accordion content and use a-elements as headers, add a class to them and use that as the header, eg. header: &quot;a.header&quot;.
0
+
0
+Use activate(Number) to change the active content programmatically.
0
+
0
+A &quot;accordionchange&quot; event is triggered every time the accordion changes.
0
+If the accordion is animated, the event will be triggered upon completion
0
+of the animation; otherwise, it is triggered immediately.
0
+&lt;pre&gt;$(&quot;.ui-accordion&quot;).bind(&quot;accordionchange&quot;, function(event, ui) {
0
+  ui.options // options used to intialize this widget
0
+  ui.newHeader // jQuery, activated header
0
+  ui.oldHeader // jQuery, previous header
0
+  ui.newContent // jQuery, activated content
0
+  ui.oldContent // jQuery, previous content
0
+});&lt;/pre&gt;
0
+</longdesc><params name="options" optional="true" type="Options"><desc>A set of key/value pairs that configure the accordion. All options are optional.</desc></params><option default="first child" name="active" type="String, Element, jQuery, Boolean, Number"><desc>Selector for the active element. Set to false to display none at start. Needs &amp;laquo;alwaysOpen: false&amp;raquo;.</desc></option><option default="true" name="alwaysOpen" type="Boolean"><desc>Whether there must be one content element open. Allows collapsing the active section by the triggering event (click is the default).</desc></option><option default="'slide'" name="animated" type="Boolean, String"><desc>Choose your favorite animation, or disable them (set to false). In addition to the default, &quot;bounceslide&quot; and &quot;easeslide&quot; are supported (both require the easing plugin).</desc></option><option default="true" name="autoHeight" type="Boolean"><desc>If set, the highest content part is used as height reference for all other parts. Provides more consistent animations.</desc></option><option default="false" name="clearStyle" type="Boolean"><desc>If set, clears height and overflow styles after finishing animations. This enables accordions to work with dynamic content. Won't work together with autoheight.</desc></option><option default="&quot;click&quot;" name="event" type="String"><desc>The event on which to trigger the accordion.</desc></option><option default="false" name="fillSpace" type="Boolean"><desc>If set, the accordion completely fills the height of the parent element. Overrides autoheight.</desc></option><option default="a" name="header" type="String, Element, jQuery"><desc>Selector for the header element. </desc></option><option name="icons" type="Object"><desc>Icons to use for headers. Available icons are &quot;header&quot; and &quot;headerSelected&quot;</desc></option><option default="false" name="navigation" type="Boolean"><desc>If set, looks for the anchor that matches location.href and activates it. Great for href-based state-saving. Use navigationFilter to implement your own matcher.</desc></option><option name="navigationFilter" type="Function"><desc>Overwrite the default location.href-matching with your own matcher.</desc></option><option default="'selected'" name="selectedClass" type="String"><desc>Class for active header elements.</desc></option><example><height>380</height><desc>A simple jQuery UI Accordion.</desc><code>$(&quot;#example&quot;).accordion();</code><html>&lt;link rel=&quot;stylesheet&quot; href=&quot;http://ui.jquery.com/latest/themes/flora/flora.all.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; title=&quot;Flora (Default)&quot;&gt;
0
+&lt;script type=&quot;text/javascript&quot; src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+&lt;script type=&quot;text/javascript&quot; src=&quot;http://ui.jquery.com/latest/ui/ui.accordion.js&quot;&gt;&lt;/script&gt;
0
+
0
+  &lt;ul id=&quot;example&quot; class=&quot;ui-accordion-container&quot; style=&quot;width: 250px;&quot;&gt;
0
+    &lt;li&gt;
0
+      &lt;a href='#' class=&quot;ui-accordion-link&quot;&gt;
0
+        Test 1
0
+      &lt;/a&gt;
0
+      &lt;div&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
0
+      &lt;/div&gt;
0
+
0
+    &lt;/li&gt;
0
+    &lt;li&gt;
0
+      &lt;div class=&quot;ui-accordion-left&quot;&gt;&lt;/div&gt;
0
+      &lt;a href='#' class=&quot;ui-accordion-link&quot;&gt;Test 2&lt;div class=&quot;ui-accordion-right&quot;&gt;&lt;/div&gt;&lt;/a&gt;
0
+      &lt;div&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
0
+      &lt;/div&gt;
0
+    &lt;/li&gt;
0
+    &lt;li&gt;
0
+      &lt;div class=&quot;ui-accordion-left&quot;&gt;&lt;/div&gt;
0
+
0
+      &lt;a href='#' class=&quot;ui-accordion-link&quot;&gt;Test 3&lt;div class=&quot;ui-accordion-right&quot;&gt;&lt;/div&gt;&lt;/a&gt;
0
+      &lt;div&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
0
+      &lt;/div&gt;
0
+    &lt;/li&gt;
0
+  &lt;/ul&gt;</html></example></function><function cat="UI/Accordion" name="accordion" return="jQuery" timestamp="2009-01-10T19:48:08Z"><desc>Activate a content part of the Accordion programmatically.</desc><longdesc>The index can be a zero-indexed number to match the position of the header to close or a string expression matching an element. Pass -1 to close all (only possible with alwaysOpen:false).</longdesc><params name="&quot;activate&quot;" type="String"><desc></desc></params><params name="index" type="String, Element, jQuery, Boolean, Number"><desc>An Integer specifying the zero-based index of the content to be activated or an expression specifying the element, or an element/jQuery object, or a boolean false to close all.</desc></params><example><desc>Activate the second content panel.</desc><code>$(&quot;.selector&quot;).accordion(&quot;activate&quot;, 1);</code></example><example><desc>Close all content parts of the accordion.</desc><code>$(&quot;.selector&quot;).accordion(&quot;activate&quot;, false);</code></example><example><desc>Activate the first element matching the given expression.</desc><code>$(&quot;.selector&quot;).accordion(&quot;activate&quot;, &quot;a:first&quot;);</code></example></function><function cat="UI/Accordion" name="accordion" return="jQuery" timestamp="2009-01-10T19:48:08Z"><desc>Enable the selected accordion.</desc><longdesc>Enabling an accordion reverts the change made by accordion(&quot;disable&quot;), turning the behaviour back to the usual state.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params><example><desc>Activate the second content of the Accordion contained in &lt;div id=&quot;accordion&quot;&gt;.</desc><code>$(&quot;.selector&quot;).accordion(&quot;enable&quot;)</code></example></function><function cat="UI/Accordion" name="accordion" return="jQuery" timestamp="2009-01-10T19:48:08Z"><desc>Disables the selected accordion.</desc><longdesc>Disabling an accordion turns off the ability to close or open anything in the accordion, it disables all interactions.
0
+
0
+To completely remove the accordion behaviour, including visual changes, use <![CDATA[<a href='UI/Accordion/accordion#.22destroy.22'>accordion("destroy")</a>]]>.</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params><example><desc>Activate the second content of the Accordion contained in &lt;div id=&quot;accordion&quot;&gt;.</desc><code>$(&quot;.selector&quot;).accordion(&quot;disable&quot;)</code></example></function><function cat="UI/Accordion" name="accordion" return="jQuery" timestamp="2009-01-10T19:48:08Z"><desc>Destroy the selected accordion.</desc><longdesc>Destroying the accordion completely reverts changes made by accordion), including events and styles.
0
+
0
+To just temporily disable the behaviour of an accordion, use <![CDATA[<a href='UI/Accordion/accordion#.22disable.22'>accordion("disable")</a>]]>.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params><example><desc>Activate the second content of the Accordion contained in &lt;div id=&quot;accordion&quot;&gt;.</desc><code>$(&quot;.selector&quot;).accordion(&quot;disable&quot;)</code></example></function></subcat></cat><cat value="UI/Datepicker"><subcat value="Plugin methods"><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>The method that you use to create a new date picker. Customize with plenty of options.</desc><longdesc>Attach the date picker to an input or for an inline view attach the date picker to a div or span.</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the date picker. All options are optional.</desc></params><option default="'Clear'" name="clearText" type="String"><desc>The text to display for the clear link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Erase the current date'" name="clearStatus" type="String"><desc>The text to display in the status bar for the clear link. This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="mandatory" type="Boolean"><desc>True if a date must be selected, causing the Clear link to be removed. False if the date is not required.</desc></option><option default="'Close'" name="closeText" type="String"><desc>The text to display for the close link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Close without change'" name="closeStatus" type="String"><desc>The text to display in the status bar for the close link. This attribute is one of the regionalisation attributes.</desc></option><option default="true" name="closeAtTop" type="Boolean"><desc>Position the Clear/Close links at the top (true) or bottom (false).</desc></option><option default="'&lt;Prev'" name="prevText" type="String"><desc>The text to display for the previous month link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Show the previous month'" name="prevStatus" type="String"><desc>The text to display in the status bar for the previous month link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Next&gt;'" name="nextText" type="String"><desc>The text to display for the next month link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Show the next month'" name="nextStatus" type="String"><desc>The text to display in the status bar for the next month link. This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="hideIfNoPrevNext" type="Boolean"><desc>Normally the previous and next links are disabled when not applicable (see ''minDate''/''maxDate''). You can hide them altogether by setting this attribute to true.</desc></option><option default="'Today'" name="currentText" type="String"><desc>The text to display for the current day link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Show the current month'" name="currentStatus" type="String"><desc>The text to display in the status bar for the current day link. This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="gotoCurrent" type="Boolean"><desc>If true, the current day link moves to the currently selected date instead of today.</desc></option><option default="false" name="navigationAsDateFormat" type="Boolean"><desc>When true the ''formatDate'' function is applied to the ''prevText'', ''nextText'', and ''currentText'' values before display, allowing them to display the target month names for example.</desc></option><option default="['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']" name="monthNames" type="String[]"><desc>The list of full month names, as used in the month header on each datepicker and as requested via the ''dateFormat'' setting. This attribute is one of the regionalisation attributes.</desc></option><option default="['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']" name="monthNamesShort" type="String[]"><desc>The list of abbreviated month names, for use as requested via the ''dateFormat'' setting. This attribute is one of the regionalisation attributes.</desc></option><option default="true" name="changeMonth" type="Boolean"><desc>Allows you to change the month by selecting from a drop-down list. You can disable this feature by setting the attribute to false.</desc></option><option default="'Show a different month'" name="monthStatus" type="String"><desc>The text to display in the status bar for the month drop-down list. This attribute is one of the regionalisation attributes.</desc></option><option default="'-10:+10'" name="yearRange" type="String"><desc>Control the range of years displayed in the year drop-down: either relative to current year (-nn:+nn) or absolute (nnnn:nnnn).</desc></option><option default="true" name="changeYear" type="Boolean"><desc>Allows you to change the year by selecting from a drop-down list. You can disable this feature by setting the attribute to false.</desc></option><option default="'Show a different year'" name="yearStatus" type="String"><desc>The text to display in the status bar for the year drop-down list. This attribute is one of the regionalisation attributes.</desc></option><option default="'Wk'" name="weekHeader" type="String"><desc>The column header for the week of the year (see ''showWeeks''). This attribute is one of the regionalisation attributes.</desc></option><option default="'Week of the year'" name="weekStatus" type="String"><desc>The text to display in the status bar for the week of the year. This attribute is one of the regionalisation attributes.</desc></option><option default="['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']" name="dayNames" type="String[]"><desc>The list of long day names, starting from Sunday, for use as requested via the ''dateFormat'' setting. They also appear as popup hints when hovering over the corresponding column headings. This attribute is one of the regionalisation attributes.</desc></option><option default="['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']" name="dayNamesShort" type="String[]"><desc>The list of abbreviated day names, starting from Sunday, for use as requested via the ''dateFormat'' setting. This attribute is one of the regionalisation attributes.</desc></option><option default="['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']" name="dayNamesMin" type="String[]"><desc>The list of minimised day names, starting from Sunday, for use as column headers within the datepicker. This attribute is one of the regionalisation attributes.</desc></option><option default="0" name="firstDay" type="Number"><desc>Set the first day of the week: Sunday is 0, Monday is 1, ... This attribute is one of the regionalisation attributes.</desc></option><option default="true" name="changeFirstDay" type="Boolean"><desc>Allows you to click on the day names to have the week start on that day. You can disable this feature by setting the attribute to false.</desc></option><option default="'Set DD as first week day'" name="dayStatus" type="String"><desc>The text to display in the status bar for the day of the week links. Use 'DD' for the full name of the day, or 'D' for its short name. This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="highlightWeek" type="Boolean"><desc>If true, the entire week row is highlighted when the mouse hovers over a day.</desc></option><option default="false" name="showOtherMonths" type="Boolean"><desc>Display dates in other months (non-selectable) at the start or end of the current month.</desc></option><option default="'Select DD, M d'" name="dateStatus" type="String"><desc>The text to display in the status bar for the date links. Use any of the date formatting characters (see ''dateFormat''). This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="showWeeks" type="Boolean"><desc>Display the week of the year alongside each month. The column header is specified by the ''weekHeader'' setting. The week number is calculated based on the first date shown in each row in the datepicker, and so may not apply to all days in that row. The ''calculateWeek'' setting allows you to change the week of the year calculation from the default ISO 8601 implementation.</desc></option><option default="$.datepicker.iso8601Week" name="calculateWeek" type="Function"><desc>Perform the week of the year calculation. This function accepts a Date as a parameter and returns the number of the corresponding week of the year. The default implementation uses the ISO 8601 definition of a week: weeks start on a Monday and the first week of the year contains January 4. This means that up to three days from the previous year may be included in the first week of the  current year, and that up to three days from the current year may be included in the last week of the previous year.</desc></option><option default="1" name="numberOfMonths" type="Number, Number[2]"><desc>Set how many months to show at once. The value can be a straight integer, or can be a two-element array to define the number of rows and columns to display.</desc></option><option default="1" name="stepMonths" type="Number"><desc>Set how many months to move when clicking the Previous/Next links.</desc></option><option default="false" name="rangeSelect" type="Boolean"><desc>Set to true to allow the selection of a date range on the one date picker, or false to just select a single date. For a date range, the first click sets the start date and a second click sets the end date.</desc></option><option default="' - '" name="rangeSeparator" type="String"><desc>Set the text to use to separate the two dates in a date range via the ''onSelect'' function.</desc></option><option default="null" name="defaultDate" type="Date(yyyy, mm - 1, dd), Number, String"><desc>Set the date to display on first opening if the field is blank. Specify either an actual date via a Date object, or relative to today with a number (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or null for today.</desc></option><option default="null" name="minDate" type="Date(yyyy, mm - 1, dd), Number, String"><desc>Set a minimum selectable date via a Date object, or relative to today with a number (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '-1y -1m'), or null for no limit.</desc></option><option default="null" name="maxDate" type="Date(yyyy, mm - 1, dd), Number, String"><desc>Set a maximum selectable date via a Date object, or relative to today with a number (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +1w'), or null for no limit.</desc></option><option name="dateFormat" type="String"><desc>The format for parsed and displayed dates. This attribute is one of the regionalisation attributes. For a full list of the possible formats see the <![CDATA[<a href='UI/Datepicker/%24.datepicker.formatDate'>formatDate</a>]]> function.</desc></option><option default="'+10'" name="shortYearCutoff" type="String, Number"><desc>Set the cutoff year for determining the century for a date (used in conjunction with ''dateFormat'' 'y'). If a numeric value (0-99) is provided then this value is used directly. If a string value is provided then it is converted to a number and added to the current year. Once the cutoff year is calculated, any dates entered with a year value less than or equal to it are considered to be in the current century, while those greater than it are deemed to be in the previous century.</desc></option><option default="'Select a date'" name="initStatus" type="String"><desc>The text to display in the status bar when the datepicker is first opened. This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="showStatus" type="Boolean"><desc>True if a status bar should be shown within the datepicker indicating what each control does. False if no status bar is required.</desc></option><option default="this.dateStatus" name="statusForDate" type="Function"><desc>The function to call to determine the status text for a date within the datepicker. The default function uses the ''dateStatus'' value and substitutes in information from the current date.</desc></option><option default="''" name="appendText" type="String"><desc>The text to display after each date field, e.g. to show the required format.</desc></option><option default="'normal'" name="duration" type="String, Number"><desc>Control the speed at which the datepicker appears, it may be a time in milliseconds, a string representing one of the three predefined speeds (&quot;slow&quot;, &quot;normal&quot;, &quot;fast&quot;), or '' for immediately.</desc></option><option default="'focus'" name="showOn" type="String"><desc>Have the datepicker appear automatically when the field receives focus ('focus'), appear only when a button is clicked ('button'), or appear when either event takes place ('both').</desc></option><option default="'show'" name="showAnim" type="String"><desc>Set the name of the animation used to show/hide the datepicker. Use 'show' (the default), 'slideDown', 'fadeIn', or any of the show/hide [http://docs.jquery.com/UI/Effects jQuery UI effects].</desc></option><option default="{}" name="showOptions" type="Options"><desc>If using one of the jQuery UI effects for ''showAnim'', you can provide additional settings for that animation via this option.</desc></option><option default="'...'" name="buttonText" type="String"><desc>The text to display on the trigger button. Use in conjunction with ''showOn'' equal to 'button' or 'both'.</desc></option><option default="''" name="buttonImage" type="String"><desc>The URL for the popup button image. If set, button text becomes the ''alt'' value and is not directly displayed.</desc></option><option default="false" name="buttonImageOnly" type="Boolean"><desc>Set to true to place an image after the field to use as the trigger without it appearing on a button.</desc></option><option default="null" name="beforeShow" type="Function"><desc>Can be a function that takes an input field and current datepicker instance and returns a settings (anonymous) object to update the date picker with. It is called just before the datepicker is displayed.</desc></option><option default="null" name="beforeShowDay" type="Function"><desc>The function takes a date as a parameter and must return an array with [0] equal to true/false indicating whether or not this date is selectable and [1] equal to a CSS class name(s) or '' for the default presentation. It is called for each day in the datepicker before is it displayed.</desc></option><option default="''" name="altField" type="String"><desc>The jQuery selector for another field that is to be updated with the selected date from the datepicker. Use the ''altFormat'' setting below to change the format of the date within this field. Leave as blank for no alternate field.</desc></option><option default="''" name="altFormat" type="String"><desc>The ''dateFormat'' to be used for the ''altField'' above. This allows one date format to be shown to the user for selection purposes, while a different format is actually sent behind the scenes.</desc></option><option default="null" name="onSelect" type="Function"><desc>Allows you to define your own event when the datepicker is selected. The function receives the selected date(s) as text and the datepicker instance as parameters. ''this'' refers to the associated input field.</desc></option><option default="null" name="onChangeMonthYear" type="Function"><desc>Allows you to define your own event when the datepicker moves to a new month and/or year. The function receives the date of the first day of the first displayed month and the datepicker instance as parameters. ''this'' refers to the associated input field.</desc></option><option default="null" name="onClose" type="Function"><desc>Allows you to define your own event when the datepicker is closed, whether or not a date is selected. The function receives the selected date(s) as a date or array of dates and the datepicker instance as parameters. ''this'' refers to the associated input field.</desc></option><option default="false" name="isRTL" type="Boolean"><desc>True if the current language is drawn from right to left. This attribute is one of the regionalisation attributes.</desc></option><option default="true" name="constrainInput" type="Boolean"><desc>True if the input field is constrained to the current date format.</desc></option></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Change the settings for a previously attached datepicker.&lt;br&gt;Since 1.6, &quot;change&quot; has been deprecated and in its place is this method.</desc><longdesc></longdesc><params name="&quot;option&quot;" type="String"><desc></desc></params><params name="settings" type="Options"><desc>The new settings for these date pickers. These are the same as when <![CDATA[<a href='UI/Datepicker/datepicker'>attaching a datepicker</a>]]>.</desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Open a datepicker in a &quot;dialog&quot; box.</desc><longdesc></longdesc><params name="&quot;dialog&quot;" type="String"><desc></desc></params><params name="dateText" type="String"><desc>The initial date for the date picker.</desc></params><params name="onSelect" optional="true" type="Function"><desc>A callback function when a date is selected. The function receives the date text and date picker instance as parameters.</desc></params><params name="settings" optional="true" type="Options"><desc>The new settings for the date picker.</desc></params><params name="pos" optional="true" type="Number[2] or MouseEvent"><desc>The position of the top/left of the dialog as [x, y] or a MouseEvent that contains the coordinates. If not specified the dialog is centered on the screen.</desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Disable an input field and its attached date picker.</desc><longdesc></longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Enable an input field and its attached date picker.</desc><longdesc></longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="boolean" timestamp="2008-11-12T23:00:14Z"><desc>Determine whether a date picker has been disabled.</desc><longdesc>Only the first control is processed.</longdesc><params name="&quot;isDisabled&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Close a previously opened date picker.</desc><longdesc></longdesc><params name="&quot;hide&quot;" type="String"><desc></desc></params><params name="speed" optional="true" type="String"><desc>The speed at which to close the date picker (optional).</desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Call up a previously attached date picker.</desc><longdesc>Only the first entry in the jQuery collection is processed.</longdesc><params name="&quot;show&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Disconnect the datepicker functionality from its associated control.</desc><longdesc></longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="Date or Date[2]" timestamp="2008-11-12T23:00:14Z"><desc>Retrieve the current date(s) for a datepicker.</desc><longdesc>Returns the current date for the datepicker attached to the first control, or an array of two dates for a range.</longdesc><params name="&quot;getDate&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Set the current date(s) for a datepicker.</desc><longdesc>Returns the current date for the datepicker attached to the first control, or an array of two dates for a range.</longdesc><params name="&quot;setDate&quot;" type="String"><desc></desc></params><params name="date" type="Date"><desc>The new current date.</desc></params><params name="endDate" optional="true" type="Date"><desc>The new end date for a date range (optional).</desc></params></function></subcat><subcat value="Utilities"><function cat="UI/Datepicker" name="$.datepicker.setDefaults" return="Datepicker" timestamp="2008-01-24T05:52:40Z"><desc>Change the default settings for all date pickers</desc><longdesc></longdesc><params name="settings" type="Options"><desc>The new settings for all date pickers. See the <![CDATA[<a href='UI/Datepicker/datepicker'>datepicker options</a>]]>.</desc></params><example><desc>Set all date pickers to open on focus or a click on an icon.</desc><code>$.datepicker.setDefaults({
0
+    showOn: 'both',
0
+    buttonImageOnly: true,
0
+    buttonImage: 'calendar.gif',
0
+    buttonText: 'Calendar' });</code></example><example><desc>Set all date pickers to have French text.</desc><code>$.datepicker.setDefaults($.datepicker.regional['fr']);</code></example></function><function cat="UI/Datepicker" name="$.datepicker.formatDate" return="String" timestamp="2008-11-28T21:02:51Z"><desc>Format a date into a string value with a specified format.</desc><longdesc>The format can be combinations of the following:
0
+* d  - day of month (no leading zero)
0
+* dd - day of month (two digit)
0
+* D  - day name short
0
+* DD - day name long
0
+* m  - month of year (no leading zero)
0
+* mm - month of year (two digit)
0
+* M  - month name short
0
+* MM - month name long
0
+* y  - year (two digit)
0
+* yy - year (four digit)
0
+* @  - Unix timestamp (also known as epoch seconds or POSIX time) in milliseconds since 01/01/1970
0
+* '...' - literal text
0
+* '' - single quote
0
+* anything else - literal text
0
+There are also a number of predefined standard date formats available from $.datepicker:
0
+* ATOM - 'yy-mm-dd' (Same as RFC 3339/ISO 8601)
0
+* COOKIE - 'D, dd M yy'
0
+* ISO_8601 - 'yy-mm-dd'
0
+* RFC_822 - 'D, d M y' (See RFC 822)
0
+* RFC_850 - 'DD, dd-M-y' (See RFC 850)
0
+* RFC_1036 - 'D, d M y' (See RFC 1036)
0
+* RFC_1123 - 'D, d M yy' (See RFC 1123)
0
+* RFC_2822 - 'D, d M yy' (See RFC 2822)
0
+* RSS - 'D, d M y' (Same as RFC 822)
0
+* TIMESTAMP - '@'
0
+* W3C - 'yy-mm-dd' (Same as ISO 8601)</longdesc><params name="format" type="String"><desc>The format to use in presenting the date.</desc></params><params name="date" type="Date"><desc>The date value to be displayed.</desc></params><params name="settings" optional="true" type="Object"><desc>Additional parameters for formatting the date. All are optional and default to the datapicker defaults, which are usually standard English.&lt;br/&gt;
0
+Attributes include:&lt;br/&gt;
0
+&lt;i&gt;dayNamesShort&lt;/i&gt; (String[7]) - the short names for the days of the week, starting at Sunday.&lt;br/&gt;
0
+&lt;i&gt;dayNames&lt;/i&gt; (String[7]) - the long names for the days of the week, starting at Sunday.&lt;br/&gt;
0
+&lt;i&gt;monthNamesShort&lt;/i&gt; (String[12]) - the short names for the months of the year.&lt;br/&gt;
0
+&lt;i&gt;monthNames&lt;/i&gt; (String[12]) - the long names for the months of the year.&lt;br/&gt;&lt;br/&gt;</desc></params><example><desc>Display the date in ISO format. Produces '2007-01-26'.</desc><code>$.datepicker.formatDate('yy-mm-dd', new Date(2007, 1 - 1, 26));</code></example><example><desc>Display the date in RSS format.</desc><code>$.datepicker.formatDate($.datepicker.RSS, new Date(2007, 1 - 1, 26));</code></example><example><desc>Display the date in expanded French format. Produces 'Samedi, Juillet 14, 2007'.</desc><code>$.datepicker.formatDate('DD, MM d, yy', new Date(2007, 7 - 1, 14), {dayNamesShort: $.datepicker.regional['fr'].dayNamesShort, dayNames: $.datepicker.regional['fr'].dayNames, monthNamesShort: $.datepicker.regional['fr'].monthNamesShort, monthNames: $.datepicker.regional['fr'].monthNames});</code></example></function><function cat="UI/Datepicker" name="$.datepicker.iso8601Week" return="Number" timestamp="2008-01-24T05:56:44Z"><desc>Determine the week of the year for a given date: 1 to 53.</desc><longdesc>This function uses the ISO 8601 definition of a week: weeks start on a Monday and the first week of the year contains January 4. This means that up to three days from the previous year may be included in the first week of the current year, and that up to three days from the current year may be included in the last week of the previous year.&lt;br/&gt;'''Since v3.1.'''</longdesc><params name="date" type="Date"><desc>The date to find the week for.</desc></params><example><desc>Find the week of the year for a date.</desc><code>$.datepicker.iso8601Week(new Date(2007, 1 - 1, 26));</code></example></function><function cat="UI/Datepicker" name="$.datepicker.parseDate" return="Date" timestamp="2008-07-27T15:02:26Z"><desc>Extract a date from a string value with a specified format.</desc><longdesc>For a full list of the possible formats see the <![CDATA[<a href='UI/Datepicker/%24.datepicker.formatDate'>formatDate</a>]]> function.
0
+A number of exceptions may be thrown:
0
+* 'Invalid arguments' if either ''format'' or ''value'' is null
0
+* 'Missing number at position nn' if ''format'' indicated a numeric value that is not then found
0
+* 'Unknown name at position nn' if ''format'' indicated day or month name that is not then found
0
+* 'Unexpected literal at position nn' if ''format'' indicated a literal value that is not then found
0
+* 'Invalid date' if the date is invalid, such as '31/02/2007'</longdesc><params name="format" type="String"><desc>The format to use in extracting the date.</desc></params><params name="value" type="String"><desc>The date value to be examined.</desc></params><params name="settings" optional="true" type="Object"><desc>Additional parameters for parsing the date. All are optional and default to the datepicker default, which is usually standard English.&lt;br/&gt;
0
+Attributes include:&lt;br/&gt;
0
+''shortYearCutoff'' (Number) - the value (0-99) beyond which years are considered to be in the previous century. Used in conjunction with the 'y' format option. Defaults to the datepicker default, which is usually 10 years in the future.&lt;br/&gt;
0
+&lt;i&gt;dayNamesShort&lt;/i&gt; (String[7]) - the short names for the days of the week, starting at Sunday.&lt;br/&gt;
0
+&lt;i&gt;dayNames&lt;/i&gt; (String[7]) - the long names for the days of the week, starting at Sunday&lt;br/&gt;
0
+&lt;i&gt;monthNamesShort&lt;/i&gt; (String[12]) - the short names for the months of the year.&lt;br/&gt;
0
+&lt;i&gt;monthNames&lt;/i&gt; (String[12]) - the long names for the months of the year.&lt;br/&gt;&lt;br/&gt;</desc></params><example><desc>Extract a date in ISO format.</desc><code>$.datepicker.parseDate('yy-mm-dd', '2007-01-26');</code></example><example><desc>Extract a date in RSS format.</desc><code>$.datepicker.parseDate($.datepicker.RSS, 'Fri, 26 Jan 07');</code></example><example><desc>Extract a date in expanded French format.</desc><code>$.datepicker.parseDate('DD, MM d, yy', 'Samedi, Juillet 14, 2007', {shortYearCutoff: 20, dayNamesShort: $.datepicker.regional['fr'].dayNamesShort, dayNames: $.datepicker.regional['fr'].dayNames, monthNamesShort: $.datepicker.regional['fr'].monthNamesShort, monthNames: $.datepicker.regional['fr'].monthNames});</code></example></function></subcat></cat><cat value="UI/Dialog"><subcat value="Plugin methods"><function cat="UI/Dialog" name="dialog" return="jQuery" timestamp="2008-11-24T14:02:11Z"><desc>Make the selected elements Dialog boxes.</desc><longdesc></longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the dialog. All options are optional.</desc></params><option default="true" name="autoOpen" type="Boolean"><desc>When ''autoOpen'' is ''true'' the dialog will open automatically when ''dialog'' is called. If ''false'' it will stay hidden until ''.dialog(&quot;open&quot;)'' is called on it.</desc></option><option default="false" name="bgiframe" type="Boolean"><desc>When true, the bgiframe plugin will be used, to fix the issue in IE6 where select boxes show on top of other elements, regardless of zIndex. Requires including the bgiframe plugin. Future versions may not require a separate plugin.</desc></option><option name="buttons" type="Object"><desc>Specifies which buttons should be displayed on the dialog. The property key is the text of the button. The value is the callback function for when the button is clicked.  The context of the callback is the dialog element; if you need access to the button, it is available as the target of the event object.</desc></option><option name="dialogClass" type="String"><desc>The specified class name(s) will be added to the dialog, for additional theming.</desc></option><option default="true" name="draggable" type="Boolean"><desc>When ''draggable'' is ''true'' the resulting dialog will be draggable. If ''false'' the dialog will not be draggable.</desc></option><option default="200" name="height" type="Number"><desc>The height of the dialog, in pixels. </desc></option><option name="hide" type="String"><desc>The effect to be used when the dialog is closed.</desc></option><option default="" name="maxHeight" type="Number"><desc>The maximum height to which the dialog can be resized, in pixels. </desc></option><option default="" name="maxWidth" type="Number"><desc>The maximum width to which the dialog can be resized, in pixels. </desc></option><option default="100" name="minHeight" type="Number"><desc>The minimum height to which the dialog can be resized, in pixels. </desc></option><option default="150" name="minWidth" type="Number"><desc>The minimum width to which the dialog can be resized, in pixels. </desc></option><option default="false" name="modal" type="Boolean"><desc>When ''modal'' is set to ''true'' the dialog will have modal behavior; other items on the page will be disabled (i.e. cannot be interacted with). Modal dialogs create an overlay below the dialog but above other page elements. Custom style values for the overlay (e.g. changing its color or opacity) can be provided with the ''overlay'' option.</desc></option><option default="" name="overlay" type="Options"><desc>Key/value object of style properties for the overlay to display behind the dialog (but above other page elements). See <![CDATA[<a href='CSS'>CSS</a>]]> for details.</desc></option><option default="center" name="position" type="String, Array"><desc>Specifies where the dialog should be displayed. Possible values: 'center', 'left', 'right', 'top', 'bottom', or an array containing a coordinate pair (in pixel offset from top left of viewport) or the possible string values (e.g. ['right','top'] for top right corner).</desc></option><option default="true" name="resizable" type="Boolean"><desc>Specifies whether the dialog will be resizeable. Possible values: ''true'', ''false''. </desc></option><option name="show" type="String"><desc>The effect to be used when the dialog is opened.</desc></option><option default="true" name="stack" type="Boolean"><desc>Specifies whether the dialog will stack on top of other dialogs. This will cause the dialog to move to the front of other dialogs when it gains focus. </desc></option><option name="title" type="String"><desc>Specifies the title of the dialog. The title can also be specified by the title attribute on the dialog source element.</desc></option><option default="300" name="width" type="Number"><desc>The width of the dialog, in pixels. </desc></option><option name="open" type="function(event, ui)"><desc>Callback for the dialogopen event. The function gets passed two arguments in accordance with the <![CDATA[<a href='Events/triggerHandler'>triggerHandler</a>]]> interface. The data passed is the opened dialog options object.</desc></option><option name="focus" type="function(event, ui)"><desc>Callback for the dialogfocus event. The function gets passed two arguments in accordance with the <![CDATA[<a href='Events/triggerHandler'>triggerHandler</a>]]> interface. The data passed is the focused dialog options object.</desc></option><option name="dragStart" type="function(event, ui)"><desc>Callback for the beginning of the dialog being dragged.</desc></option><option name="drag" type="function(event, ui)"><desc>Callback for during the dialog being dragged.</desc></option><option name="dragStop" type="function(event, ui)"><desc>Callback for after the dialog has been dragged.</desc></option><option name="resizeStart" type="function(event, ui)"><desc>Callback for the beginning of the dialog being resized.</desc></option><option name="resize" type="function(event, ui)"><desc>Callback for during the dialog being resized.</desc></option><option name="resizeStop" type="function(event, ui)"><desc>Callback for after the dialog has been resize.</desc></option><option name="close" type="function(event, ui)"><desc>Callback for the close.dialog event. The function gets passed two arguments in accordance with the <![CDATA[<a href='Events/triggerHandler'>triggerHandler</a>]]> interface. The data passed is the closed dialog options object.</desc></option></function><function cat="UI/Dialog" name="dialog" return="jQuery" timestamp="2008-11-24T14:02:11Z"><desc>Opens the specified dialog boxes.</desc><longdesc></longdesc><params name="&quot;open&quot;" type="String"><desc></desc></params></function><function cat="UI/Dialog" name="dialog" return="Boolean" timestamp="2008-11-24T14:02:11Z"><desc>Return if the dialog is currently open.</desc><longdesc>Since version 1.6 stable.</longdesc><params name="&quot;isOpen&quot;" type="String"><desc></desc></params></function><function cat="UI/Dialog" name="dialog" return="jQuery" timestamp="2008-11-24T14:02:11Z"><desc>Moves the specified dialog on top of the dialogs stack.</desc><longdesc></longdesc><params name="&quot;moveToTop&quot;" type="String"><desc></desc></params></function><function cat="UI/Dialog" name="dialog" return="jQuery" timestamp="2008-11-24T14:02:11Z"><desc>Closes the specified dialog boxes.</desc><longdesc></longdesc><params name="&quot;close&quot;" type="String"><desc></desc></params></function><function cat="UI/Dialog" name="dialog" return="jQuery" timestamp="2008-11-24T14:02:11Z"><desc> Completely remove the dialog.</desc><longdesc>This method removes the dialog completely. Note however that it does ''not'' remove the contents of the dialog. To do that, use X.dialog('destroy').remove().</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Progressbar"><subcat value="Plugin methods"><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc>Make the selected elements progressbar.</desc><longdesc></longdesc><params name="options" optional="true" type="Options"><desc>A set of key/value pairs that configure the progressbar. All options are optional.</desc></params><option default="1000" name="duration" type="Number"><desc>Time for progressing. </desc></option><option default="1" name="increment" type="Number"><desc>Min stepping of the progressbar. </desc></option><option default="100" name="interval" type="Number"><desc>......</desc></option><option default="true" name="range" type="Boolean"><desc>Whether show range number as text on the bar.</desc></option><option default="" name="text" type="String"><desc>Text to show on the bar.</desc></option><option default="" name="textClass" type="String"><desc>Text CSS class.</desc></option><option default="300" name="width" type="Number"><desc>Width of the progressbar</desc></option><option default="" name="start" type="function(event, ui)"><desc>Callback function triggered when the progressbar is started. </desc></option><option default="" name="pause" type="function(event, ui)"><desc>Callback function triggered when the progressbar is paused. </desc></option><option default="" name="progress" type="function(event, ui)"><desc>Callback function triggered when the progressbar is progressing. </desc></option><option default="" name="stop" type="function(event, ui)"><desc>Callback function triggered when the progressbar is stopped. </desc></option></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Start the progressbar.</desc><longdesc>This method start the progressbar.</longdesc><params name="&quot;start&quot;" type="String"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Stop the progressbar.</desc><longdesc>This method stop the progressbar.</longdesc><params name="&quot;stop&quot;" type="String"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Pause the progressbar.</desc><longdesc>This method pause the progressbar.</longdesc><params name="&quot;pause&quot;" type="String"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Set range of the progressbar.</desc><longdesc>This method set range of the progressbar.</longdesc><params name="&quot;progress&quot;" type="String"><desc></desc></params><params name="value" type="Number"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Enable the progressbar.</desc><longdesc>This method enable the progressbar.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Disable the progressbar.</desc><longdesc>This method disable the progressbar.</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Completely remove the progressbar.</desc><longdesc>This method removes the progressbar completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Slider"><subcat value="Plugin methods"><function cat="UI/Slider" name="slider" timestamp="2008-11-24T14:04:01Z"><desc>Makes a slider from the nodeset supplied by the query.</desc><longdesc>With this plugin, you can generate sliders with a wide range of options, including multiple handles, callbacks and more.  Some options will not work correctly unless your external and internal stylesheets come '''before''' the script tags.
0
+
0
+All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):
0
+
0
+* '''ui.handle''': jQuery - the current focused handle
0
+* '''ui.value''': Integer - the current handle's value
0
+* '''ui.range''': Integer - the current range value (only with two handles and range: true)</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the slider. All options are optional, but a slider will not be useful without at least one callback.</desc></params><option default="false" name="animate" type="Boolean"><desc> Whether slide handle smoothly when user click outside handle on the bar.</desc></option><option name="axis" type="String"><desc> Normally you don't need to set this option because the plugin detects the slider orientation automatically. If the orientation is not correctly detected you can set this option to 'horizontal' or 'vertical'.</desc></option><option default="&quot;.ui-slider-handle&quot;" name="handle" type="String"><desc> The jquery selector to use for the handle(s) of the slider </desc></option><option name="handles" type="Object"><desc>Specify boundaries for one or more handles. Format: [{start:Integer, min:Integer, max:Integer, id:String} [, ..]]. Only start is required. If the slider doesn't have handles already, they are automatically created.</desc></option><option default="100" name="max" type="Integer"><desc> The maximum value of the slider. Useful for tracking values via callback, and to set steps.</desc></option><option default="0" name="min" type="Integer"><desc> The minimum value of the slider. Useful for tracking values via callback, and to set steps.</desc></option><option default="false" name="range" type="Boolean"><desc> If set to true, the slider will detect if you have two handles and create a stylable range element between these two. You now also have access to ui.range in your callbacks to get the amount of the range.</desc></option><option name="startValue" type="Integer"><desc> The value the handle will have first.</desc></option><option name="stepping" type="Integer"><desc> If defined, the new value has to be dividable through this number, so the slider jumps from step to step.</desc></option><option default="0" name="steps" type="Integer"><desc> Alternative to stepping, this defines how many steps a slider will have, instead of how many values to jump, as in stepping.</desc></option><option name="start" type="function(event, ui)"><desc>Function that gets called when the user starts sliding.</desc></option><option name="slide" type="function(event, ui)"><desc> Function that gets called on every mouse move during slide.  Takes arguments e and ui, for event and user-interface respectively. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(..).slider('value', index) to get another handles' value.</desc></option><option name="change" type="function(event, ui)"><desc> Function that gets called on slide stop, but only if the slider position has changed.  Takes arguments e and ui, for event and user-interface respectively.  Use ui.value (single-handled sliders) to obtain the value of the current handle, $(..).slider('value', index) to get another handles' value.</desc></option><option name="stop" type="function(event, ui)"><desc>Function that gets called when the user stops sliding.</desc></option></function><function cat="UI/Slider" name="slider" return="jQuery" timestamp="2008-11-24T14:04:01Z"><desc>Moves a slider's handle to the given position.</desc><longdesc>Calling this method moves the specified handle to the given value. If no handle or handle's index/number is specified as second argument, it moves the focused handle.
0
+
0
+If you want to increase/decrease the handles' value, you can also input a relative string format, using &quot;+=&quot; or &quot;-=&quot;. Example: $(..).slider(&quot;moveTo&quot;, &quot;-=10&quot;) (Decrements the current handles' value by 10). 
0
+
0
+Note also that when using a slider with range: true set in the options, move the second slider handle first as if the first handle is forced to overtake the second, you'll get strange results with minus numbers.</longdesc><params name="&quot;moveTo&quot;" type="String"><desc></desc></params><params name="value" type="Integer/String"><desc>The value to move the handle to.</desc></params><params name="index" type="Integer/Element"><desc>The index/number of the handle, zero-based (or alternatively the handle element itself).</desc></params></function><function cat="UI/Slider" name="slider" return="jQuery" timestamp="2008-11-24T14:04:01Z"><desc>Retrieves a handle's value.</desc><longdesc>This method returns a handle's value. If no handle is specified in the second argument by its index, it returns the value of the currently focused handle.</longdesc><params name="&quot;value&quot;" type="String"><desc></desc></params><params name="index" type="Integer"><desc>The index/number of the handle, zero-based.</desc></params></function><function cat="UI/Slider" name="slider" return="jQuery" timestamp="2008-11-24T14:04:01Z"><desc>Temporarily disables the slider.</desc><longdesc>This method temporarily disables the slider. It can later be reenabled by calling $(..).slider(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Slider" name="slider" return="jQuery" timestamp="2008-11-24T14:04:01Z"><desc> Enables the slider.</desc><longdesc>This method re-enables a previously disabled slider.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Slider" name="slider" return="jQuery" timestamp="2008-11-24T14:04:01Z"><desc> Completely removes the sliding functionality.</desc><longdesc>This method removes the sliding functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Tabs"><subcat value="Plugin methods"><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>The method that you use to create a new tabs interface.</desc><longdesc></longdesc><params name="options" optional="true" type="Options"><desc>A set of key/value pairs that configures the tabs interface. All options are optional.</desc></params><option default="0" name="selected" type="Number"><desc>Zero-based index of the tab to be selected on initialization. To set all tabs to unselected set this option to null.</desc></option><option default="false" name="unselect" type="Boolean"><desc>Allows a currently selected tab to become unselected upon clicking.</desc></option><option default="click" name="event" type="String"><desc>The type of event to be used for selecting a tab.</desc></option><option default="[]" name="disabled" type="Array&lt;Number&gt;"><desc>An array containing the position of the tabs (zero-based index) that should be disabled on initialization.</desc></option><option name="cookie" type="Object"><desc>Store the latest active (clicked) tab in a cookie. The cookie is used to determine the active tab on the next page load. Requires cookie plugin. The object needs to have key/value pairs of the form the cookie plugin expects as options. Available options: &amp;#123; expires: 7, path: '/', domain: 'jquery.com', secure: true &amp;#125;</desc></option><option default="Loading&amp;amp;#8230;" name="spinner" type="String"><desc>The HTML content of this string is shown in a tab title while remote content is loading. Pass in empty string to deactivate that behavior.</desc></option><option default="false" name="cache" type="Boolean"><desc>Wether or not to cache remote tabs content, e.g. load only once or with every click. Cached content is being lazy loaded, e.g once and only once for the first click. Note that to prevent the actual Ajax requests from being cached by the browser you need to provide an extra cache: false flag to ajaxOptions.</desc></option><option name="ajaxOptions" type="Options"><desc>Additional Ajax options to consider when loading tab content (see $.ajax).</desc></option><option default="ui-tabs-" name="idPrefix" type="String"><desc>If the remote tab, its anchor element that is, has no title attribute to generate an id from, an id/fragment identifier is created from this prefix and a unique id returned by $.data(el), for example &quot;ui-tabs-54&quot;.</desc></option><option name="fx" type="Options, Array&lt;Options&gt;"><desc>Enable animations for hiding and showing tab panels. The duration option can be a string representing one of the three predefined speeds (&quot;slow&quot;, &quot;normal&quot;, &quot;fast&quot;) or the duration in milliseconds to run an animation (default is &quot;normal&quot;).</desc></option><option default="&amp;lt;li&amp;gt;&amp;lt;a href&amp;#61;&quot;#&amp;#123;href&amp;#125;&quot;&amp;gt;&amp;lt;span&amp;gt;#&amp;#123;label&amp;#125;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;" name="tabTemplate" type="String"><desc>HTML template from which a new tab is created and added. The placeholders #&amp;#123;href&amp;#125; and #&amp;#123;label&amp;#125; are replaced with the url and tab label that are passed as arguments to the add method.</desc></option><option default="&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;" name="panelTemplate" type="String"><desc>HTML template from which a new tab panel is created in case of adding a tab with the add method or when creating a panel for a remote tab on the fly.</desc></option><option name="select" type="function(event,ui)"><desc>Function that gets called when clicking a tab.</desc></option><option name="load" type="function(event,ui)"><desc>Function that gets called after the content of a remote tab has been loaded.</desc></option><option name="show" type="function(event,ui)"><desc>Function that gets called when a tab is shown.</desc></option><option name="add" type="function(event,ui)"><desc>Function that gets called when a tab was added.</desc></option><option name="remove" type="function(event,ui)"><desc>Function that gets called when a tab was removed.</desc></option><option name="enable" type="function(event,ui)"><desc>Function that gets called when a tab was enabled.</desc></option><option name="disable" type="function(event,ui)"><desc>Function that gets called when a tab was disabled.</desc></option><example><height>155</height><desc>A simple jQuery UI Tabs interface.</desc><code>$(&quot;#example &gt; ul&quot;).tabs();</code><inhead>&lt;link rel=&quot;stylesheet&quot; href=&quot;http://ui.jquery.com/latest/themes/flora/flora.all.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; title=&quot;Flora (Default)&quot;&gt;
0
+&lt;script type=&quot;text/javascript&quot; src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+&lt;script type=&quot;text/javascript&quot; src=&quot;http://ui.jquery.com/latest/ui/ui.tabs.js&quot;&gt;&lt;/script&gt;</inhead><html>
0
+        &lt;div id=&quot;example&quot; class=&quot;flora&quot;&gt;
0
+            &lt;ul&gt;
0
+                &lt;li&gt;&lt;a href=&quot;#fragment-1&quot;&gt;&lt;span&gt;One&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
0
+                &lt;li&gt;&lt;a href=&quot;#fragment-2&quot;&gt;&lt;span&gt;Two&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
0
+                &lt;li&gt;&lt;a href=&quot;#fragment-3&quot;&gt;&lt;span&gt;Three&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
0
+            &lt;/ul&gt;
0
+            &lt;div id=&quot;fragment-1&quot;&gt;
0
+                &lt;p&gt;First tab is selected by default.&lt;/p&gt;
0
+            &lt;/div&gt;
0
+            &lt;div id=&quot;fragment-2&quot;&gt;
0
+                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0
+                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0
+            &lt;/div&gt;
0
+            &lt;div id=&quot;fragment-3&quot;&gt;
0
+                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0
+                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0
+                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0
+            &lt;/div&gt;
0
+        &lt;/div&gt;</html></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Add a new tab.</desc><longdesc></longdesc><params name="&quot;add&quot;" type="String"><desc></desc></params><params name="url" type="String"><desc>Either a URL consisting of a fragment identifier only to create an in-page tab or a full url (relative or absolute, no cross-domain support) to turn the new tab into an Ajax (remote) tab.</desc></params><params name="label" type="String"><desc>The label of the tab to be added.</desc></params><params name="index" optional="true" type="Number"><desc>Zero-based position where to insert the new tab. Optional, by default a new tab is appended at the end.</desc></params><example><desc>Append a new in-page tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;add&quot;, '#fragment-identifier', 'New Tab');</code></example><example><desc>Insert a new in-page tab at the second position.</desc><code>$(&quot;.selector&quot;).tabs(&quot;add&quot;, '#fragment-identifier', 'New Tab', 1);</code></example><example><desc>Append a new remote tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;add&quot;, '/load/content/url', 'New Tab');</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Remove a tab.</desc><longdesc></longdesc><params name="&quot;remove&quot;" type="String"><desc></desc></params><params name="index" type="Number"><desc>Zero-based index of the tab to be removed. </desc></params><example><desc>Remove second tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;remove&quot;, 1);</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Enable a disabled tab.</desc><longdesc>To enable more than one tab at once reset the disabled property like: &lt;code&gt;$('#example').data('disabled.tabs', []);&lt;/code&gt;</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params><params name="index" type="Number"><desc>Zero-based index of the tab to be enabled. </desc></params><example><desc>Enable second tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;enable&quot;, 1);</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Disable a tab.</desc><longdesc>The selected tab cannot be disabled. To disable more than one tab at once use: &lt;code&gt;$('#example').data('disabled.tabs', [1, 2, 3]);&lt;/code&gt;</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params><params name="index" type="Number"><desc>Zero-based index of the tab to be disabled. </desc></params><example><desc>Disable second tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;disable&quot;, 1);</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Select a tab, i.e., simulate a click programmatically.</desc><longdesc></longdesc><params name="&quot;select&quot;" type="String"><desc></desc></params><params name="index" type="Number, String"><desc>Zero-based index of the tab to be selected or the id selector of the panel the tab is associated with (the tab's href fragment identifier, e.g. hash, points to the panel's id).</desc></params><example><desc>Select second tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;select&quot;, 1);</code></example><example><desc>Select tab that is associated with a panel that has the id &quot;foo&quot;.</desc><code>$(&quot;.selector&quot;).tabs(&quot;select&quot;, '#foo');</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Reload the content of an Ajax tab programmatically.</desc><longdesc>This method always loads the tab content from the remote location, even is cache is set to true.</longdesc><params name="&quot;load&quot;" type="String"><desc></desc></params><params name="index" type="Number"><desc>Zero-based index of the tab to be reloaded. </desc></params><example><desc>Reload second tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;load&quot;, 1);</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Change the url from which an Ajax (remote) tab will be loaded.</desc><longdesc>The specified URL will be used for subsequent loads. Note that you can not only change the URL for an existing remote tab with this method, but also turn an in-page tab into a remote tab.</longdesc><params name="&quot;url&quot;" type="String"><desc></desc></params><params name="index" type="Number"><desc>Zero-based index of the tab of which its URL is to be updated.</desc></params><params name="url" type="String"><desc>A URL the content of the tab is loaded from.</desc></params><example><desc>Set the URL of an Ajax tab to load content from.</desc><code>$(&quot;.selector&quot;).tabs(&quot;url&quot;, '/changed/url');</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Destroy tabs interface and revert HTML to the state before creating tabs.</desc><longdesc></longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function><function cat="UI/Tabs" name="tabs" return="Number" timestamp="2008-12-24T17:07:11Z"><desc>Retrieve the number of tabs of the first matched tab pane.</desc><longdesc></longdesc><params name="&quot;length&quot;" type="String"><desc></desc></params></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Set up an automatic rotation through tabs of a tab pane.</desc><longdesc>'''Part of the UI Tabs extension package.'''</longdesc><params name="&quot;rotate&quot;" type="String"><desc></desc></params><params name="ms" type="Number"><desc>Amount of time in milliseconds until the next tab in the cycle gets activated. Use 0 or null to stop the rotation.</desc></params><params name="continuing" optional="true" type="Boolean"><desc>Whether or not to continue the rotation after a tab has been selected by a user. Default: false.</desc></params><example><desc>Start rotation with an interval of 5 seconds.</desc><code>$(&quot;.selector&quot;).tabs('rotate', 5000);</code></example><example><desc>Stop rotation.</desc><code>$(&quot;.selector&quot;).tabs('rotate', null);</code></example></function></subcat></cat><cat value="UI/Spinner"><subcat value="Plugin methods"><function cat="UI/Spinner" name="spinner" return="jQuery" timestamp="2008-11-12T02:26:07Z"><desc>Creates a Spinner widget.</desc><longdesc>This jQuery widget turns input fields or DOM nodes into a spin button. Handles such as min, max and currency provided.
0
+
0
+Callbacks (init, up, down, spin, change) accept two arguments: The original browser event and a prepared ui object.  The ui object have these fields:
0
+
0
+* '''ui.element''' - a jQuery object containing the spinner element.
0
+* '''ui.options''' - options used to initialize the spinner.
0
+* '''ui.value''' - current value of the spinner.
0
+* '''ui.add''' - add a new item to the spinner (DOM nodes only).</longdesc><params name="options" optional="true" type="Options"><desc>A set of key/value pairs that configure the spinner. All options are optional.</desc></params><option default="false" name="currency" type="Boolean, String"><desc>Accepts a currency symbol, e.g. &amp;pound;. Will also automatically format into a currency value. </desc></option><option default="0" name="decimals" type="Number"><desc>The number of decimal places displayed. </desc></option><option default="&quot;%&quot;" name="format" type="String"><desc>''printf'' style formatting with named arguments, e.g. ''%(name)'', for customising the display value. Used for DOM lists only. See ''items''. </desc></option><option default=" &quot;''&quot;" name="group" type="String"><desc>The symbol to use as a thousand separator / digital group separator. </desc></option><option default="true" name="incremental" type="Boolean"><desc>If ''incremental'' is set to ''true'' stepping delta will increase when spun incessantly. i.e. spinning jumps up a notch at set increments. </desc></option><option default="" name="items" type="Array"><desc>An Array of objects which automatically convert into DOM lists to form spinner items. Used in combination with ''format''. </desc></option><option default="" name="max" type="Number"><desc>The upper limit. </desc></option><option default="" name="min" type="Number"><desc>The lower limit. </desc></option><option default=" '.'" name="point" type="String"><desc>The symbol to use as a decimal point. </desc></option><option default="0" name="start" type="Number"><desc>The default/start position. </desc></option><option default="1" name="stepping" type="Number"><desc>The unit step size. </desc></option><option default="" name="init" type="Function"><desc>Callback triggered when the spinner initializes. </desc></option><option default="" name="up" type="Function"><desc>Callback function triggered when the spinner increments. </desc></option><option default="" name="down" type="Function"><desc>Callback function triggered when the spinner decrements. </desc></option><option default="" name="spin" type="Function"><desc>Callback function triggered when the spinner spins. </desc></option><option default="" name="change" type="Function"><desc>Callback function triggered when the value is changed. </desc></option></function><function cat="UI/Spinner" name="spinner" return="jQuery" timestamp="2008-11-12T02:26:07Z"><desc>Temporarily disables the spinner.</desc><longdesc>This method temporarily disables the spinner. It can later be reenabled by calling $(..).spinner(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Spinner" name="spinner" return="jQuery" timestamp="2008-11-12T02:26:07Z"><desc> Enables the spinner.</desc><longdesc>This method re-enables a previously disabled spinner.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Spinner" name="spinner" return="jQuery" timestamp="2008-11-12T02:26:07Z"><desc> Completely remove the spinner.</desc><longdesc>This method removes the spinner completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Colorpicker"><subcat value="Plugin methods"><function cat="UI/Colorpicker" name="colorpicker" return="jQuery" timestamp="2008-08-17T08:53:25Z"><desc>Make the selected elements colorpicker.</desc><longdesc></longdesc><params name="options" optional="true" type="Options"><desc>A set of key/value pairs that configure the colorpicker. All options are optional.</desc></params><option default="Click" name="eventName" type="String"><desc>The desired event to trigger the colorpicker. </desc></option><option default="ff0000" name="color" type="String or Object"><desc>The default color. String for hex color or hash for RGB and HSB ({r:255, r:0, b:0})  </desc></option><option default="false" name="flat" type="Boolean"><desc>Whatever if the color picker is appended to the element or triggered by an event. </desc></option><option default="" name="show" type="Function"><desc>Callback function triggered when the color picker is shown. </desc></option><option default="" name="beforeShow" type="Function"><desc>Callback function triggered before the color picker is shown. </desc></option><option default="" name="change" type="Function"><desc>Callback function triggered when the color is changed. </desc></option><option default="" name="submit" type="Function"><desc>Callback function triggered when the color it is chosen.</desc></option><option default="" name="hide" type="Function"><desc>Callback function triggered when the color picker is hidden. </desc></option></function><function cat="UI/Colorpicker" name="colorpicker" return="jQuery" timestamp="2008-08-17T08:53:25Z"><desc> Set a new color.</desc><longdesc>This method set a new color.</longdesc><params name="&quot;setColor&quot;" type="String"><desc></desc></params><params name="color" type="String or Object"><desc>The 'color' argument is the same format as the option color, string for hex color or hash for RGB and HSB ({r:255, r:0, b:0}).</desc></params></function><function cat="UI/Colorpicker" name="colorpicker" return="jQuery" timestamp="2008-08-17T08:53:25Z"><desc> Completely remove the colorpicker.</desc><longdesc>This method removes the colorpicker completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Autocomplete"><subcat value="Plugin methods"><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc>Make the selected elements Autocomplete.</desc><longdesc></longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the autocomplete. All options are optional.</desc></params><option default="" name="url" type="String"><desc>A URL pointing at a remote resource.</desc></option><option default="" name="data" type="Array"><desc>Local data as an array.</desc></option><option default="1" name="minChars" type="Number"><desc>The minimum number of characters a user has to type before the autocompleter activates.</desc></option><option default="400 for remote, 10 for local" name="delay" type="Number"><desc>The delay in milliseconds the autocompleter waits after a keystroke to activate itself.</desc></option><option default="10" name="cacheLength" type="Number"><desc>The number of backend query results to store in cache. If set to 1 (the current result), no caching will happen. Must be &gt;= 1.</desc></option><option default="true" name="matchSubset" type="Boolean"><desc>Whether or not the autocompleter can use a cache for more specific queries. This means that all matches of &quot;foot&quot; are a subset of all matches for &quot;foo&quot;. Usually this is true, and using this options decreases server load and increases performance. Only useful with cacheLength settings bigger than one, like 10.</desc></option><option default="false" name="matchCase" type="Boolean"><desc>Whether or not the comparison is case sensitive. Important only if you use caching.</desc></option><option default="false" name="matchContains" type="Boolean"><desc>Whether or not the comparison looks inside (i.e. does &quot;ba&quot; match &quot;foo bar&quot;) the search results. Important only if you use caching. Don't mix with autofill.</desc></option><option default="false" name="mustMatch" type="Boolean"><desc>If set to true, the autocompleter will only allow results that are presented by the backend. Note that illegal values result in an empty input box.</desc></option><option default="true" name="selectFirst" type="Boolean"><desc>If this is set to true, the first autocomplete value will be automatically selected on tab/return, even if it has not been handpicked by keyboard or mouse action. If there is a handpicked (highlighted) result, that result will take precedence.</desc></option><option name="extraParams" type="Object"><desc>Extra parameters for the backend. If you were to specify { bar:4 }, the autocompleter would call my_autocomplete_backend.php?q=foo&amp;bar=4 (assuming the input box contains &quot;foo&quot;). The param can be a function that is called to calculate the param before each request.</desc></option><option default="Assumes that a single row contains a single value." name="formatItem" type="Function"><desc>Provides advanced markup for an item. For each row of results, this function will be called. The returned value will be displayed inside an LI element in the results list. Autocompleter will provide 4 parameters: the results row, the position of the row in the list of results (starting at 1), the number of items in the list of results and the search term.</desc></option><option default="formatItem is used" name="formatMatch" type="Function"><desc>Use this option if you want to limit the data that autocomplete searches for matches. For example, there may be items you want displayed to the user, but don't want included in the data that's searched. Gets called with the same arguments as formatItem.</desc></option><option default="Assumes either plain data to use as result or uses the same value as provided by formatItem." name="formatResult" type="Function"><desc>Similar to formatItem, but provides the formatting for the value to be put into the input field. Again three arguments: Data, position (starting with one) and total number of data.</desc></option><option default="false" name="multiple" type="Boolean"><desc>Whether to allow more than one autocompleted-value to enter.</desc></option><option default="&quot;, &quot;" name="multipleSeparator" type="String"><desc>Separator to put between values when using multiple option.</desc></option><option default="width of the input element" name="width" type="Number"><desc>Specify a custom width for the select box.</desc></option><option default="false" name="autoFill" type="Boolean"><desc>Fill the textinput while still selecting a value, replacing the value if more is typed or something else is selected.</desc></option><option default="10" name="max" type="Number"><desc>Limit the number of items in the select box. Is also sent as a &quot;limit&quot; parameter with a remote request.</desc></option><option default="Wraps the search term in a &lt;strong&gt; element " name="highlight" type="Boolean, Function"><desc>Whether and how to highlight matches in the select box. Set to false to disable. Set to a function to customize. The function gets the value as the first argument and the search term as the second and must return the formatted value.</desc></option><option default="true " name="scroll" type="Boolean"><desc>Whether to scroll when more results than configured via scrollHeight are available.</desc></option><option default="180" name="scrollHeight" type="Number"><desc>height of scrolled autocomplete control in pixels</desc></option></function><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc>Handle the result of a search event.</desc><longdesc>Is executed when the user selects a value or a programmatic search event is triggered (see 'search').
0
+
0
+You can add and remove (using unbind(&quot;result&quot;)) this event at any time.</longdesc><params name="&quot;result&quot;" type="String"><desc></desc></params><params name="handler" type="Function"><desc>The event handler, gets a default event object as first and the selected list item as second argument.</desc></params><example><desc>Bind a handler to the result event to display the selected value in a #result element.
0
+The first argument is a generic event object, in this case with type &quot;result&quot;.
0
+The second argument refers to the selected data, which can be a plain string value or an array or object.
0
+The third argument is the formatted value that is inserted into the input field.</desc><code>$('input#suggest').autocomplete(&quot;result&quot;,function(event, data, formatted) {
0
+  $(&quot;#result&quot;).html( !data ? &quot;No match!&quot; : &quot;Selected: &quot; + formatted);
0
+ });</code></example></function><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc>Trigger a search event.</desc><longdesc>See 'result' for binding to that event.
0
+
0
+A search event mimics the same behaviour as when the user selects a value from
0
+the list of autocomplete items. You can use it to execute anything that does something
0
+with the selected value, beyond simply putting the value into the input and submitting it.</longdesc><params name="&quot;search&quot;" type="String"><desc></desc></params></function><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc>Flush (empty) the cache of matched input's autocompleters.</desc><longdesc></longdesc><params name="&quot;flushCache&quot;" type="String"><desc></desc></params></function><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc>Updates the options for the current autocomplete field.</desc><longdesc>This allows you to change things like the URL, max items to display, etc.
0
+If you're changing the URL, be sure to call the 'flushCache' method.</longdesc><params name="&quot;setData&quot;" type="String"><desc></desc></params><params name="options" type="Options"><desc>The options to set.</desc></params></function><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc> Completely remove the autocomplete.</desc><longdesc>This method removes the autocomplete completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Theming/API"/></docs>
0
lib/docs/api-docs.js
...
 
0
...
1
2
0
@@ -0,0 +1 @@
0
+loadDocs({"version": "1.2.6", "timestamp": "2008-06-03T15:40:58Z", "startdoc": "API", "letters": ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w"], "data": {"jquery1": {"id": 1, "searchname": "jquery", "name": "jQuery", "type": "function", "category": "Core", "subcategory": "$(...) The jQuery Function", "return": "jQuery", "added": "1.0", "sample": "", "desc": "This function accepts a string containing a CSS selector which is then used to match a set of elements.", "longdesc": "<p>The core functionality of jQuery centers around this function. Everything in jQuery is based upon this, or uses this in some way. The most basic use of this function is to pass in an expression (usually consisting of CSS), which then finds all matching elements.</p><p>By default, if no context is specified, $() looks for DOM elements within the context of the current HTML document. If you do specify a context, such as a DOM element or jQuery object, the expression will be matched against the contents of that context.</p><p>See <a href='Selectors'>Selectors</a> for the allowed CSS syntax for expressions. </p>", "params": [{"optional": false, "name": "expression", "type": "String", "desc": "An expression to search with."}, {"optional": true, "name": "context", "type": "Element, jQuery", "desc": "A DOM Element, Document or jQuery to use as context"}], "examples": [{"code": "$(\"div > p\").css(\"border\", \"1px solid gray\");", "htmlCode": "$(\"div &gt; p\").css(\"border\", \"1px solid gray\");", "desc": "Finds all p elements that are children of a div element.", "css": "", "inhead": "", "html": "<p>one</p> <div><p>two</p></div> <p>three</p>", "exampleId": "1iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div > p\").css(\"border\", \"1px solid gray\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>one</p> <div><p>two</p></div> <p>three</p>\n</body>\n</html>"}, {"code": "$(\"input:radio\", document.forms[0]);", "htmlCode": "$(\"input:radio\", document.forms[0]);", "desc": "Finds all inputs of type radio within the first form in the document.", "css": "", "inhead": "", "html": "", "exampleId": "1iframeExample1", "runCode": ""}, {"code": "$(\"div\", xml.responseXML);", "htmlCode": "$(\"div\", xml.responseXML);", "desc": "Finds all div elements within an XML document from an AJAX response.", "css": "", "inhead": "", "html": "", "exampleId": "1iframeExample2", "runCode": ""}]}, "jquery2": {"id": 2, "searchname": "jquery", "name": "jQuery", "type": "function", "category": "Core", "subcategory": "$(...) The jQuery Function", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Create DOM elements on-the-fly from the provided String of raw HTML.", "longdesc": "<p>You can pass in plain HTML Strings written by hand, create them using some template engine or plugin, or load them via AJAX. There are limitations when creating input elements, see the second example. Also when passing strings that may include slashes (such as an image path), escape the slashes.  When creating single elements use the closing tag or XHTML format.  For example, to create a span use $(\"<span/>\") or $(\"<span></span>\") instead of without the closing slash/tag.</p>", "params": [{"optional": false, "name": "html", "type": "String", "desc": "A string of HTML to create on the fly."}], "examples": [{"code": "$(\"<div><p>Hello</p></div>\").appendTo(\"body\")", "htmlCode": "$(\"&lt;div&gt;&lt;p&gt;Hello&lt;/p&gt;&lt;/div&gt;\").appendTo(\"body\")", "desc": "Creates a div element (and all of its contents) dynamically, and appends it to the body element. Internally, an element is created and its innerHTML property set to the given markup. It is therefore both quite flexible and limited.", "css": "", "inhead": "", "html": "", "exampleId": "2iframeExample0", "runCode": ""}, {"code": "// Does NOT work in IE:\n$(\"<input/>\").attr(\"type\", \"checkbox\");\n// Does work in IE:\n$(\"<input type='checkbox'/>\");", "htmlCode": "// Does NOT work in IE:\n$(\"&lt;input/&gt;\").attr(\"type\", \"checkbox\");\n// Does work in IE:\n$(\"&lt;input type='checkbox'/&gt;\");", "desc": "Do not create &lt;input&gt;-Elements without a type-attribute, due to Microsofts read/write-once-rule for the type-attribute of &lt;input&gt;-elements, see this <a href=\"http://msdn2.microsoft.com/en-us/library/ms534700.aspx\">http://msdn2.microsoft.com/en-us/library/ms534700.aspx</a> for details.", "css": "", "inhead": "", "html": "", "exampleId": "2iframeExample1", "runCode": ""}]}, "jquery3": {"id": 3, "searchname": "jquery", "name": "jQuery", "type": "function", "category": "Core", "subcategory": "$(...) The jQuery Function", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Wrap jQuery functionality around a single or multiple DOM Element(s).", "longdesc": "<p>This function also accepts XML Documents and Window objects as valid arguments (even though they are not DOM Elements).</p>", "params": [{"optional": false, "name": "elements", "type": "Element, Array&lt;Element&gt;", "desc": "DOM element(s) to be encapsulated by a jQuery object."}], "examples": [{"code": "$(document.body).css( \"background\", \"black\" );", "htmlCode": "$(document.body).css( \"background\", \"black\" );", "desc": "Sets the background color of the page to black.", "css": "", "inhead": "", "html": "", "exampleId": "3iframeExample0", "runCode": ""}, {"code": "$(myForm.elements).hide()", "htmlCode": "$(myForm.elements).hide()", "desc": "Hides all the input elements within a form.", "css": "", "inhead": "", "html": "", "exampleId": "3iframeExample1", "runCode": ""}]}, "jquery4": {"id": 4, "searchname": "jquery", "name": "jQuery", "type": "function", "category": "Core", "subcategory": "$(...) The jQuery Function", "return": "jQuery", "added": "1.0", "sample": "", "desc": "A shorthand for $(document).ready().", "longdesc": "<p>Allows you to bind a function to be executed when the DOM document has finished loading. This function behaves just like $(document).ready(), in that it should be used to wrap other $() operations on your page that depend on the DOM being ready to be operated on. While this function is, technically, chainable - there really isn't much use for chaining against it.</p><p>You can have as many $(document).ready events on your page as you like.</p><p>See ready(Function) for details about the ready event. </p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute when the DOM is ready."}], "examples": [{"code": "$(function(){\n  // Document is ready\n});", "htmlCode": "$(function(){\n  // Document is ready\n});", "desc": "Executes the function when the DOM is ready to be used.", "css": "", "inhead": "", "html": "", "exampleId": "4iframeExample0", "runCode": ""}, {"code": "jQuery(function($) {\n  // Your code using failsafe $ alias here...\n});", "htmlCode": "jQuery(function($) {\n  // Your code using failsafe $ alias here...\n});", "desc": "Uses both the shortcut for $(document).ready() and the argument to write failsafe jQuery code using the $ alias, without relying on the global alias.", "css": "", "inhead": "", "html": "", "exampleId": "4iframeExample1", "runCode": ""}]}, "each5": {"id": 5, "searchname": "each", "name": "each", "type": "function", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Execute a function within the context of every matched element.", "longdesc": "<p>This means that every time the passed-in function is executed (which is once for every element matched) the 'this' keyword points to the specific DOM element.</p><p>Additionally, the function, when executed, is passed a single argument representing the position of the element in the matched set (integer, zero-index).</p><p>Returning 'false' from within the each function completely stops the loop through all of the elements (this is like using a 'break' with a normal loop). Returning 'true' from within the loop skips to the next iteration (this is like using a 'continue' with a normal loop). </p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The callback to execute for each matched element.\n<pre>function callback(index, domElement) {\n  this; // this == domElement\n}\n</pre>"}], "examples": [{"code": "\n    $(document.body).click(function () {\n      $(\"div\").each(function (i) {\n        if (this.style.color != \"blue\") {\n          this.style.color = \"blue\";\n        } else {\n          this.style.color = \"\";\n        }\n      });\n    });\n", "htmlCode": "\n    $(document.body).click(function () {\n      $(\"div\").each(function (i) {\n        if (this.style.color != \"blue\") {\n          this.style.color = \"blue\";\n        } else {\n          this.style.color = \"\";\n        }\n      });\n    });\n", "desc": "Iterates over three divs and sets their color property.", "css": "\n  div { color:red; text-align:center; cursor:pointer; \n        font-weight:bolder; width:300px; }\n  ", "inhead": "", "html": "<div>Click here</div>\n  <div>to iterate through</div>\n  <div>these divs.</div>", "exampleId": "5iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function () {\n      $(\"div\").each(function (i) {\n        if (this.style.color != \"blue\") {\n          this.style.color = \"blue\";\n        } else {\n          this.style.color = \"\";\n        }\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { color:red; text-align:center; cursor:pointer; \n        font-weight:bolder; width:300px; }\n  \n</style>\n</head>\n<body>\n<div>Click here</div>\n  <div>to iterate through</div>\n  <div>these divs.</div>\n</body>\n</html>"}, {"code": "\n    $(\"span\").click(function () {\n      $(\"li\").each(function(){\n        $(this).toggleClass(\"example\");\n      });\n    });\n", "htmlCode": "\n    $(\"span\").click(function () {\n      $(\"li\").each(function(){\n        $(this).toggleClass(\"example\");\n      });\n    });\n", "desc": "If you want to have the jQuery object instead of the regular DOM element, use the $(this) function, for example:", "css": "\n  ul { font-size:18px; margin:0; }\n  span { color:blue; text-decoration:underline; cursor:pointer; }\n  .example { font-style:italic; }\n  ", "inhead": "", "html": "To do list: <span>(click here to change)</span>\n  <ul>\n    <li>Eat</li>\n    <li>Sleep</li>\n    <li>Be merry</li>\n  </ul>", "exampleId": "5iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"span\").click(function () {\n      $(\"li\").each(function(){\n        $(this).toggleClass(\"example\");\n      });\n    });\n\n  });\n</script>\n<style>\n\n  ul { font-size:18px; margin:0; }\n  span { color:blue; text-decoration:underline; cursor:pointer; }\n  .example { font-style:italic; }\n  \n</style>\n</head>\n<body>\nTo do list: <span>(click here to change)</span>\n  <ul>\n    <li>Eat</li>\n    <li>Sleep</li>\n    <li>Be merry</li>\n  </ul>\n</body>\n</html>"}, {"code": "\n    $(\"button\").click(function () {\n      $(\"div\").each(function (index, domEle) {\n        // domEle == this\n        $(domEle).css(\"backgroundColor\", \"yellow\"); \n        if ($(this).is(\"#stop\")) {\n          $(\"span\").text(\"Stopped at div index #\" + index);\n          return false;\n        }\n      });\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"div\").each(function (index, domEle) {\n        // domEle == this\n        $(domEle).css(\"backgroundColor\", \"yellow\"); \n        if ($(this).is(\"#stop\")) {\n          $(\"span\").text(\"Stopped at div index #\" + index);\n          return false;\n        }\n      });\n    });\n", "desc": "You can use 'return' to break out of each() loops early.", "css": "\n  div { width:40px; height:40px; margin:5px; float:left;\n        border:2px blue solid; text-align:center; }\n  span { color:red; }\n  ", "inhead": "", "html": "<button>Change colors</button> \n  <span></span>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div id=\"stop\">Stop here</div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "5iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"div\").each(function (index, domEle) {\n        // domEle == this\n        $(domEle).css(\"backgroundColor\", \"yellow\"); \n        if ($(this).is(\"#stop\")) {\n          $(\"span\").text(\"Stopped at div index #\" + index);\n          return false;\n        }\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { width:40px; height:40px; margin:5px; float:left;\n        border:2px blue solid; text-align:center; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<button>Change colors</button> \n  <span></span>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div id=\"stop\">Stop here</div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "eq6": {"id": 6, "searchname": "eq", "name": "eq", "type": "function", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Reduce the set of matched elements to a single element.", "longdesc": "<p>The position of the element in the set of matched elements starts at 0 and goes to length - 1.</p>", "params": [{"optional": false, "name": "position", "type": "Number", "desc": "The index of the element to select."}], "examples": [{"code": "$(\"p\").eq(1).css(\"color\", \"red\")", "htmlCode": "$(\"p\").eq(1).css(\"color\", \"red\")", "desc": "Reduces the selection to the second selected element.", "css": "", "inhead": "", "html": "<p>This is just a test.</p><p>So is this</p>", "exampleId": "6iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").eq(1).css(\"color\", \"red\")\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>This is just a test.</p><p>So is this</p>\n</body>\n</html>"}]}, "get7": {"id": 7, "searchname": "get", "name": "get", "type": "function", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "Array&lt;Element&gt;", "added": "1.0", "sample": "", "desc": "Access all matched DOM elements.", "longdesc": "<p>This serves as a backwards-compatible way of accessing all matched elements (other than the jQuery object itself, which is, in fact, an array of elements).</p><p>It is useful if you need to operate on the DOM elements themselves instead of using built-in jQuery functions. </p>", "params": [], "examples": [{"code": "\n    function disp(divs) {\n      var a = [];\n      for (var i = 0; i < divs.length; i++) {\n        a.push(divs[i].innerHTML);\n      }\n      $(\"span\").text(a.join(\" \"));\n    }\n    \n    disp( $(\"div\").get().reverse() );\n", "htmlCode": "\n    function disp(divs) {\n      var a = [];\n      for (var i = 0; i &lt; divs.length; i++) {\n        a.push(divs[i].innerHTML);\n      }\n      $(\"span\").text(a.join(\" \"));\n    }\n    \n    disp( $(\"div\").get().reverse() );\n", "desc": "Selects all divs in the document and returns the DOM Elements as an Array, then uses the built-in reverse-method to reverse that array.", "css": "\n  span { color:red; }\n  ", "inhead": "", "html": "Reversed - <span></span>\n  <div>One</div>\n  <div>Two</div>\n  <div>Three</div>", "exampleId": "7iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function disp(divs) {\n      var a = [];\n      for (var i = 0; i < divs.length; i++) {\n        a.push(divs[i].innerHTML);\n      }\n      $(\"span\").text(a.join(\" \"));\n    }\n    \n    disp( $(\"div\").get().reverse() );\n\n  });\n</script>\n<style>\n\n  span { color:red; }\n  \n</style>\n</head>\n<body>\nReversed - <span></span>\n  <div>One</div>\n  <div>Two</div>\n  <div>Three</div>\n</body>\n</html>"}]}, "get8": {"id": 8, "searchname": "get", "name": "get", "type": "function", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "Element", "added": "1.0", "sample": "", "desc": "Access a single matched DOM element at a specified index in the matched set.", "longdesc": "<p>This allows you to extract the actual DOM element and operate on it directly without necessarily using jQuery functionality on it. This function called as $(this).get(0) is the equivalent of using square bracket notation on the jQuery object itself like $(this)[0].</p>", "params": [{"optional": false, "name": "index", "type": "Number", "desc": "Access the element in the Nth position."}], "examples": [{"code": "\n    $(\"*\", document.body).click(function (e) {\n      e.stopPropagation();\n      var domEl = $(this).get(0);\n      $(\"span:first\").text(\"Clicked on - \" + domEl.tagName);\n    });\n", "htmlCode": "\n    $(\"*\", document.body).click(function (e) {\n      e.stopPropagation();\n      var domEl = $(this).get(0);\n      $(\"span:first\").text(\"Clicked on - \" + domEl.tagName);\n    });\n", "desc": "Gives the tag name of the element clicked on.", "css": "\n  span { color:red; }\n  div { background:yellow; }\n  ", "inhead": "", "html": "<span>&nbsp;</span>\n  <p>In this paragraph is an <span>important</span> section</p>\n  <div><input type=\"text\" /></div>", "exampleId": "8iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"*\", document.body).click(function (e) {\n      e.stopPropagation();\n      var domEl = $(this).get(0);\n      $(\"span:first\").text(\"Clicked on - \" + domEl.tagName);\n    });\n\n  });\n</script>\n<style>\n\n  span { color:red; }\n  div { background:yellow; }\n  \n</style>\n</head>\n<body>\n<span>&nbsp;</span>\n  <p>In this paragraph is an <span>important</span> section</p>\n  <div><input type=\"text\" /></div>\n</body>\n</html>"}]}, "index9": {"id": 9, "searchname": "index", "name": "index", "type": "function", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "Number", "added": "1.0", "sample": "", "desc": "Searches every matched element for the object and returns the index of the element, if found, starting with zero.", "longdesc": "<p>Returns -1 if the object wasn't found.</p>", "params": [{"optional": false, "name": "subject", "type": "Element ", "desc": "Object to search for."}], "examples": [{"code": "\n    $(\"div\").click(function () {\n      // this is the dom element clicked\n      var index = $(\"div\").index(this);\n      $(\"span\").text(\"That was div index #\" + index);\n    });\n", "htmlCode": "\n    $(\"div\").click(function () {\n      // this is the dom element clicked\n      var index = $(\"div\").index(this);\n      $(\"span\").text(\"That was div index #\" + index);\n    });\n", "desc": "On click, returns the index (based zero) of that div in the page.", "css": "\n  div { background:yellow; margin:5px; }\n  span { color:red; }\n  ", "inhead": "", "html": "<span>Click a div!</span>\n  <div>First div</div>\n  <div>Second div</div>\n  <div>Third div</div>", "exampleId": "9iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").click(function () {\n      // this is the dom element clicked\n      var index = $(\"div\").index(this);\n      $(\"span\").text(\"That was div index #\" + index);\n    });\n\n  });\n</script>\n<style>\n\n  div { background:yellow; margin:5px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<span>Click a div!</span>\n  <div>First div</div>\n  <div>Second div</div>\n  <div>Third div</div>\n</body>\n</html>"}, {"code": "$(\"*\").index( $('#foobar')[0] )", "htmlCode": "$(\"*\").index( $('#foobar')[0] )", "desc": "Returns the index for the element with ID foobar.", "css": "", "inhead": "", "html": "<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>", "exampleId": "9iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"*\").index( $('#foobar')[0] )\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>\n</body>\n</html>"}, {"code": "$(\"*\").index( $('#foo')[0] )", "htmlCode": "$(\"*\").index( $('#foo')[0] )", "desc": "Returns the index for the element with ID foo within another element.", "css": "", "inhead": "", "html": "<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>", "exampleId": "9iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"*\").index( $('#foo')[0] )\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>\n</body>\n</html>"}, {"code": "var mainNavLinks = $('ul#mainNav li a');\nmainNavLinks.click(function(){alert(mainNavLinks.index(this)0;});", "htmlCode": "var mainNavLinks = $('ul#mainNav li a');\nmainNavLinks.click(function(){alert(mainNavLinks.index(this)0;});", "desc": "Returns the index for the element clicked within a collection.", "css": "", "inhead": "", "html": "", "exampleId": "9iframeExample3", "runCode": ""}, {"code": "$(\"*\").index( $('#bar')[0] )", "htmlCode": "$(\"*\").index( $('#bar')[0] )", "desc": "Returns -1, as there is no element with ID bar.", "css": "", "inhead": "", "html": "<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>", "exampleId": "9iframeExample4", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"*\").index( $('#bar')[0] )\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div id=\"foobar\"><b></b><span id=\"foo\"></span></div>\n</body>\n</html>"}]}, "length10": {"id": 10, "searchname": "length", "name": "length", "type": "property", "category": "Core", "subcategory": "jQuery Object Accessors", "return": "Number", "added": "", "sample": "", "desc": "The number of elements in the jQuery object.", "longdesc": "<p>The number of elements currently matched. The <a href='Core/size'>size</a> function will return the same value.</p>", "params": [], "examples": [{"code": " \n    $(document.body).click(function () {\n      $(document.body).append($(\"<div>\"));\n      var n = $(\"div\").length;\n      $(\"span\").text(\"There are \" + n + \" divs.\" +\n                     \"Click to add more.\");\n    }).trigger('click'); // trigger the click to start\n", "htmlCode": " \n    $(document.body).click(function () {\n      $(document.body).append($(\"&lt;div&gt;\"));\n      var n = $(\"div\").length;\n      $(\"span\").text(\"There are \" + n + \" divs.\" +\n                     \"Click to add more.\");\n    }).trigger('click'); // trigger the click to start\n", "desc": "Count the divs.  Click to add more.", "css": "\n  body { cursor:pointer; }\n  div { width:50px; height:30px; margin:5px; float:left;\n        background:green; }\n  span { color:red; }\n  ", "inhead": "", "html": "<span></span>\n  <div></div>", "exampleId": "10iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n \n    $(document.body).click(function () {\n      $(document.body).append($(\"<div>\"));\n      var n = $(\"div\").length;\n      $(\"span\").text(\"There are \" + n + \" divs.\" +\n                     \"Click to add more.\");\n    }).trigger('click'); // trigger the click to start\n\n  });\n</script>\n<style>\n\n  body { cursor:pointer; }\n  div { width:50px; height:30px; margin:5px; float:left;\n        background:green; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<span></span>\n  <div></div>\n</body>\n</html>"}]}, "data11": {"id": 11, "searchname": "data", "name": "data", "type": "function", "category": "Core", "subcategory": "Data Cache", "return": "Any", "added": "1.2.3", "sample": "", "desc": "Returns value at named data store for the element, as set by data(name, value).", "longdesc": "<p>If the JQuery collection references multiple elements, the value returned refers to the first element.</p><p>This function is used to get stored data on an element without the risk of a circular reference.  It uses jQuery.data and is new to version 1.2.3.  It can be used for many reasons and jQuery UI uses it heavily. </p>", "params": [{"optional": false, "name": "name", "type": "String", "desc": "Name of the data stored."}], "examples": [{"code": "\n    $(\"button\").click(function(e) {\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = $(\"div\").data(\"blah\");\n          break;\n        case 1 :\n          $(\"div\").data(\"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          $(\"div\").data(\"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          $(\"div\").removeData(\"blah\");\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n", "htmlCode": "\n    $(\"button\").click(function(e) {\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = $(\"div\").data(\"blah\");\n          break;\n        case 1 :\n          $(\"div\").data(\"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          $(\"div\").data(\"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          $(\"div\").removeData(\"blah\");\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n", "desc": "Get the data named \"blah\" stored at for an element.", "css": "\n  div { margin:5px; background:yellow; }\n  button { margin:5px; font-size:14px; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>A div</div>\n  <button>Get \"blah\" from the div</button>\n  <button>Set \"blah\" to \"hello\"</button>\n  <button>Set \"blah\" to 86</button>\n  <button>Remove \"blah\" from the div</button>\n  <p>The \"blah\" value of this div is <span>?</span></p>", "exampleId": "11iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function(e) {\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = $(\"div\").data(\"blah\");\n          break;\n        case 1 :\n          $(\"div\").data(\"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          $(\"div\").data(\"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          $(\"div\").removeData(\"blah\");\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:5px; background:yellow; }\n  button { margin:5px; font-size:14px; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>A div</div>\n  <button>Get \"blah\" from the div</button>\n  <button>Set \"blah\" to \"hello\"</button>\n  <button>Set \"blah\" to 86</button>\n  <button>Remove \"blah\" from the div</button>\n  <p>The \"blah\" value of this div is <span>?</span></p>\n</body>\n</html>"}]}, "data12": {"id": 12, "searchname": "data", "name": "data", "type": "function", "category": "Core", "subcategory": "Data Cache", "return": "Any", "added": "1.2.3", "sample": "", "desc": "Stores the value in the named spot and also returns the value.", "longdesc": "<p>If the JQuery collection references multiple elements, the data element is set on all of them.</p><p>This function can be useful for attaching data to elements without having to create a new expando.  It also isn't limited to a string.  The value can be any format.</p>", "params": [{"optional": false, "name": "name", "type": "String", "desc": "Name of the data to store."}, {"optional": false, "name": "value", "type": "Any", "desc": "Value to be stored."}], "examples": [{"code": "\n    $(\"div\").data(\"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text($(\"div\").data(\"test\").first);\n    $(\"span:last\").text($(\"div\").data(\"test\").last);\n", "htmlCode": "\n    $(\"div\").data(\"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text($(\"div\").data(\"test\").first);\n    $(\"span:last\").text($(\"div\").data(\"test\").last);\n", "desc": "Store then retrieve a value from the div element.", "css": "\n  div { color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>\n    The values stored were \n    <span></span>\n    and\n    <span></span>\n  </div>", "exampleId": "12iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").data(\"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text($(\"div\").data(\"test\").first);\n    $(\"span:last\").text($(\"div\").data(\"test\").last);\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>\n    The values stored were \n    <span></span>\n    and\n    <span></span>\n  </div>\n</body>\n</html>"}]}, "removedata13": {"id": 13, "searchname": "removedata", "name": "removeData", "type": "function", "category": "Core", "subcategory": "Data Cache", "return": "jQuery", "added": "1.2.3", "sample": "", "desc": "Removes named data store from an element.", "longdesc": "<p>This is the complement function to $(...).data(name, value).</p>", "params": [{"optional": false, "name": "name", "type": "String", "desc": "The name of the data store property to remove."}], "examples": [{"code": "\n    $(\"span:eq(0)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").data(\"test1\", \"VALUE-1\");\n    $(\"div\").data(\"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").removeData(\"test1\");\n    $(\"span:eq(2)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"span:eq(3)\").text(\"\" + $(\"div\").data(\"test2\"));\n", "htmlCode": "\n    $(\"span:eq(0)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").data(\"test1\", \"VALUE-1\");\n    $(\"div\").data(\"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").removeData(\"test1\");\n    $(\"span:eq(2)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"span:eq(3)\").text(\"\" + $(\"div\").data(\"test2\"));\n", "desc": "Set a data store for 2 names then remove one of them.", "css": "\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>", "exampleId": "13iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"span:eq(0)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").data(\"test1\", \"VALUE-1\");\n    $(\"div\").data(\"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"div\").removeData(\"test1\");\n    $(\"span:eq(2)\").text(\"\" + $(\"div\").data(\"test1\"));\n    $(\"span:eq(3)\").text(\"\" + $(\"div\").data(\"test2\"));\n\n  });\n</script>\n<style>\n\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>\n</body>\n</html>"}]}, "fn.extend14": {"id": 14, "searchname": "fn.extend", "name": "$.fn.extend", "type": "function", "category": "Core", "subcategory": "Plugins", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Extends the jQuery element set to provide new methods (used to make a typical jQuery plugin).", "longdesc": "<p>Can be used to add functions into the to add <a href='Plugins/Authoring'>plugin methods (plugins)</a>. </p>", "params": [{"optional": false, "name": "object", "type": "Object", "desc": "The object that will be merged into the jQuery object."}], "examples": [{"code": "jQuery.fn.extend({\n  check: function() {\n    return this.each(function() { this.checked = true; });\n  },\n  uncheck: function() {\n    return this.each(function() { this.checked = false; });\n  }\n});", "htmlCode": "jQuery.fn.extend({\n  check: function() {\n    return this.each(function() { this.checked = true; });\n  },\n  uncheck: function() {\n    return this.each(function() { this.checked = false; });\n  }\n});", "desc": "Adds two plugin methods.", "css": "", "inhead": "", "html": "", "exampleId": "14iframeExample0", "runCode": ""}]}, "extend15": {"id": 15, "searchname": "extend", "name": "$.extend", "type": "function", "category": "Core", "subcategory": "Plugins", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Extends the jQuery object itself.", "longdesc": "<p>Can be used to add functions into the jQuery namespace. See <a href='Core/jQuery.fn.extend'>jQuery.fn.extend</a> for more information on using this method to add <a href='Plugins/Authoring'>Plugins</a>.</p>", "params": [{"optional": false, "name": "object", "type": "Object", "desc": "The object that will be merged into the jQuery object."}], "examples": [{"code": "jQuery.extend({\n  min: function(a, b) { return a < b ? a : b; },\n  max: function(a, b) { return a > b ? a : b; }\n});", "htmlCode": "jQuery.extend({\n  min: function(a, b) { return a &lt; b ? a : b; },\n  max: function(a, b) { return a &gt; b ? a : b; }\n});", "desc": "Adds two functions into the jQuery namespace.", "css": "", "inhead": "", "html": "", "exampleId": "15iframeExample0", "runCode": ""}]}, "noconflict16": {"id": 16, "searchname": "noconflict", "name": "$.noConflict", "type": "function", "category": "Core", "subcategory": "Interoperability", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Run this function to give control of the $ variable back to whichever library first implemented it.", "longdesc": "<p>This helps to make sure that jQuery doesn't conflict with the $ object of other libraries.</p><p>By using this function, you will only be able to access jQuery using the 'jQuery' variable. For example, where you used to do $(\"div p\"), you now must do jQuery(\"div p\").</p><p><strong>NOTE:</strong> This function must be called after including the jQuery javascript file, but <strong>before</strong> including any other conflicting library, and also before actually that other conflicting library gets used, in case jQuery is included last.</p>", "params": [], "examples": [{"code": "jQuery.noConflict();\n// Do something with jQuery\njQuery(\"div p\").hide();\n// Do something with another library's $()\n$(\"content\").style.display = 'none';", "htmlCode": "jQuery.noConflict();\n// Do something with jQuery\njQuery(\"div p\").hide();\n// Do something with another library's $()\n$(\"content\").style.display = 'none';", "desc": "Maps the original object that was referenced by $ back to $.", "css": "", "inhead": "", "html": "", "exampleId": "16iframeExample0", "runCode": ""}, {"code": "jQuery.noConflict();\n(function($) { \n  $(function() {\n    // more code using $ as alias to jQuery\n  });\n})(jQuery);\n// other code using $ as an alias to the other library", "htmlCode": "jQuery.noConflict();\n(function($) { \n  $(function() {\n    // more code using $ as alias to jQuery\n  });\n})(jQuery);\n// other code using $ as an alias to the other library", "desc": "Reverts the $ alias and then creates and executes a function to provide the $ as a jQuery alias inside the functions scope. Inside the function the original $ object is not available. This works well for most plugins that don't rely on any other library.", "css": "", "inhead": "", "html": "", "exampleId": "16iframeExample1", "runCode": ""}, {"code": "var j = jQuery.noConflict();\n// Do something with jQuery\nj(\"div p\").hide();\n// Do something with another library's $()\n$(\"content\").style.display = 'none';", "htmlCode": "var j = jQuery.noConflict();\n// Do something with jQuery\nj(\"div p\").hide();\n// Do something with another library's $()\n$(\"content\").style.display = 'none';", "desc": "Creates a different alias instead of jQuery to use in the rest of the script.", "css": "", "inhead": "", "html": "", "exampleId": "16iframeExample2", "runCode": ""}]}, "noconflict17": {"id": 17, "searchname": "noconflict", "name": "$.noConflict", "type": "function", "category": "Core", "subcategory": "Interoperability", "return": "jQuery", "added": "1.1.4", "sample": "", "desc": "Revert control of both the $ and jQuery variables to their original owners. '''Use with discretion.'''", "longdesc": "<p>This is a more-extreme version of the simple <a href='Core/jQuery.noConflict'>noConflict</a> method, as this one will completely undo what jQuery has introduced. This is to be used in an extreme case where you'd like to embed jQuery into a high-conflict environment. <strong>NOTE:</strong> It's very likely that plugins won't work after this particular method has been called.</p>", "params": [{"optional": false, "name": "extreme", "type": "Boolean", "desc": "Set to true to enable the extreme rollback of jQuery and it's variables."}], "examples": [{"code": "var dom = {};\ndom.query = jQuery.noConflict(true);", "htmlCode": "var dom = {};\ndom.query = jQuery.noConflict(true);", "desc": "Completely move jQuery to a new namespace in another object.", "css": "", "inhead": "", "html": "", "exampleId": "17iframeExample0", "runCode": ""}]}, "id18": {"id": 18, "searchname": "id", "name": "id", "type": "selector", "category": "Selectors", "subcategory": "Basics", "return": "Array&lt;Element&gt;", "added": "1.0", "sample": "#id", "desc": "Matches a single element with the given id attribute. ", "longdesc": "<p>If the id contains characters like periods or colons you have to escape those characters with backslashes <a href=\"http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F\">http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_select_an_element_that_has_weird_characters_in_its_ID.3F</a>.</p>", "params": [{"optional": false, "name": "id", "type": "String", "desc": "An ID to search for, specified via the id attribute of an element."}], "examples": [{"code": "$(\"#myDiv\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\"#myDiv\").css(\"border\",\"3px solid red\");", "desc": "Finds the element with the id \"myDiv\".", "css": "\n  div {\n    width: 90px;\n    height: 90px;\n    float:left;\n    padding: 5px;\n    margin: 5px;\n    background-color: #EEEEEE;\n  }\n  ", "inhead": "", "html": "<div id=\"notMe\"><p>id=\"notMe\"</p></div>\n  <div id=\"myDiv\">id=\"myDiv\"</div>", "exampleId": "18iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"#myDiv\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div {\n    width: 90px;\n    height: 90px;\n    float:left;\n    padding: 5px;\n    margin: 5px;\n    background-color: #EEEEEE;\n  }\n  \n</style>\n</head>\n<body>\n<div id=\"notMe\"><p>id=\"notMe\"</p></div>\n  <div id=\"myDiv\">id=\"myDiv\"</div>\n</body>\n</html>"}, {"code": "$(\"#myID\\\\.entry\\\\[1\\\\]\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\"#myID\\\\.entry\\\\[1\\\\]\").css(\"border\",\"3px solid red\");", "desc": "Finds the element with the id \"myID.entry[1]\".  See how certain characters must be escaped with backslashes.", "css": "\n  div {\n    width: 300px;\n    float:left;\n    padding: 2px;\n    margin: 3px;\n    background-color: #EEEEEE;\n  }\n  ", "inhead": "", "html": "<div id=\"myID.entry[0]\">id=\"myID.entry[0]\"</div>\n  <div id=\"myID.entry[1]\">id=\"myID.entry[1]\"</div>\n  <div id=\"myID.entry[2]\">id=\"myID.entry[2]\"</div>", "exampleId": "18iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"#myID\\\\.entry\\\\[1\\\\]\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div {\n    width: 300px;\n    float:left;\n    padding: 2px;\n    margin: 3px;\n    background-color: #EEEEEE;\n  }\n  \n</style>\n</head>\n<body>\n<div id=\"myID.entry[0]\">id=\"myID.entry[0]\"</div>\n  <div id=\"myID.entry[1]\">id=\"myID.entry[1]\"</div>\n  <div id=\"myID.entry[2]\">id=\"myID.entry[2]\"</div>\n</body>\n</html>"}]}, "element19": {"id": 19, "searchname": "element", "name": "element", "type": "selector", "category": "Selectors", "subcategory": "Basics", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "element", "desc": "Matches all elements with the given name. ", "longdesc": "", "params": [{"optional": false, "name": "element", "type": "String", "desc": "An element to search for. Refers to the tagName of DOM nodes."}], "examples": [{"code": "$(\"div\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\"div\").css(\"border\",\"3px solid red\");", "desc": "Finds every DIV element.", "css": "\n  div,span {\n    width: 60px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  ", "inhead": "", "html": "<div>DIV1</div>\n  <div>DIV2</div>\n  <span>SPAN</span>", "exampleId": "19iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div,span {\n    width: 60px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  \n</style>\n</head>\n<body>\n<div>DIV1</div>\n  <div>DIV2</div>\n  <span>SPAN</span>\n</body>\n</html>"}]}, "class20": {"id": 20, "searchname": "class", "name": "class", "type": "selector", "category": "Selectors", "subcategory": "Basics", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ".class", "desc": "Matches all elements with the given class. ", "longdesc": "", "params": [{"optional": false, "name": "class", "type": "String", "desc": "A class to search for. An element can have multiple classes, one of them must match."}], "examples": [{"code": "$(\".myClass\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\".myClass\").css(\"border\",\"3px solid red\");", "desc": "Finds the element with the class \"myClass\".", "css": "\n  div,span {\n    width: 150px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  ", "inhead": "", "html": "<div class=\"notMe\">div class=\"notMe\"</div>\n  <div class=\"myClass\">div class=\"myClass\"</div>\n  <span class=\"myClass\">span class=\"myClass\"</span>", "exampleId": "20iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\".myClass\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div,span {\n    width: 150px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  \n</style>\n</head>\n<body>\n<div class=\"notMe\">div class=\"notMe\"</div>\n  <div class=\"myClass\">div class=\"myClass\"</div>\n  <span class=\"myClass\">span class=\"myClass\"</span>\n</body>\n</html>"}]}, "all21": {"id": 21, "searchname": "all", "name": "all", "type": "selector", "category": "Selectors", "subcategory": "Basics", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "*", "desc": "Matches all elements.", "longdesc": "<p>Most useful when combined with a context to search in.</p>", "params": [], "examples": [{"code": "$(\"*\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\"*\").css(\"border\",\"3px solid red\");", "desc": "Finds every element (including head, body, etc).", "css": "\n  div,span,p {\n    width: 150px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  ", "inhead": "", "html": "<div>DIV</div>\n  <span>SPAN</span>\n  <p>P <button>Button</button></p>", "exampleId": "21iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"*\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div,span,p {\n    width: 150px;\n    height: 60px;\n    float:left;\n    padding: 10px;\n    margin: 10px;\n    background-color: #EEEEEE;\n  }\n  \n</style>\n</head>\n<body>\n<div>DIV</div>\n  <span>SPAN</span>\n  <p>P <button>Button</button></p>\n</body>\n</html>"}, {"code": "$(\"*\", document.body).css(\"border\",\"3px solid red\");", "htmlCode": "$(\"*\", document.body).css(\"border\",\"3px solid red\");", "desc": "A common way to find all elements is to set the 'context' to document.body so elements like head, script, etc are left out.", "css": "", "inhead": "", "html": "", "exampleId": "21iframeExample1", "runCode": ""}]}, "multiple22": {"id": 22, "searchname": "multiple", "name": "multiple", "type": "selector", "category": "Selectors", "subcategory": "Basics", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "selector1, selector2, selectorN", "desc": "Matches the combined results of all the specified selectors.", "longdesc": "<p>You can specify any number of selectors to combine into a single result.  Note order of the dom elements in the jQuery object aren't necessarily identical.</p>", "params": [{"optional": false, "name": "selector1", "type": "Selector", "desc": "Any valid selector"}, {"optional": false, "name": "selector2", "type": "Selector", "desc": "Another valid selector"}, {"optional": true, "name": "selectorN", "type": "Selector", "desc": "As many more valid selectors as you like"}], "examples": [{"code": "$(\"div,span,p.myClass\").css(\"border\",\"3px solid red\");", "htmlCode": "$(\"div,span,p.myClass\").css(\"border\",\"3px solid red\");", "desc": "Finds the elements that match any of these three selectors.", "css": "\n  div,span,p {\n    width: 130px;\n    height: 60px;\n    float:left;\n    padding: 3px;\n    margin: 2px;\n    background-color: #EEEEEE;\n    font-size:14px;\n  }\n  ", "inhead": "", "html": "<div>div</div>\n  <p class=\"myClass\">p class=\"myClass\"</p>\n  <p class=\"notMyClass\">p class=\"notMyClass\"</p>\n  <span>span</span>", "exampleId": "22iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div,span,p.myClass\").css(\"border\",\"3px solid red\");\n  });\n</script>\n<style>\n\n  div,span,p {\n    width: 130px;\n    height: 60px;\n    float:left;\n    padding: 3px;\n    margin: 2px;\n    background-color: #EEEEEE;\n    font-size:14px;\n  }\n  \n</style>\n</head>\n<body>\n<div>div</div>\n  <p class=\"myClass\">p class=\"myClass\"</p>\n  <p class=\"notMyClass\">p class=\"notMyClass\"</p>\n  <span>span</span>\n</body>\n</html>"}, {"code": "\n    var list = $(\"div,p,span\").map(function () {\n      return this.tagName;\n    }).get().join(\", \");\n    $(\"b\").append(document.createTextNode(list));\n", "htmlCode": "\n    var list = $(\"div,p,span\").map(function () {\n      return this.tagName;\n    }).get().join(\", \");\n    $(\"b\").append(document.createTextNode(list));\n", "desc": "Show the order in the jQuery object.", "css": "\n  b { color:red; font-size:16px; display:block; clear:left; }\n  div,span,p { width: 40px; height: 40px; float:left;\n               margin: 10px; background-color: blue; \n               padding:3px; color:white; }\n  ", "inhead": "", "html": "<span>span</span>\n  <p>p</p>\n  <p>p</p>\n  <div>div</div>\n  <span>span</span>\n  <p>p</p>\n  <div>div</div>\n  <b></b>", "exampleId": "22iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var list = $(\"div,p,span\").map(function () {\n      return this.tagName;\n    }).get().join(\", \");\n    $(\"b\").append(document.createTextNode(list));\n\n  });\n</script>\n<style>\n\n  b { color:red; font-size:16px; display:block; clear:left; }\n  div,span,p { width: 40px; height: 40px; float:left;\n               margin: 10px; background-color: blue; \n               padding:3px; color:white; }\n  \n</style>\n</head>\n<body>\n<span>span</span>\n  <p>p</p>\n  <p>p</p>\n  <div>div</div>\n  <span>span</span>\n  <p>p</p>\n  <div>div</div>\n  <b></b>\n</body>\n</html>"}]}, "descendant23": {"id": 23, "searchname": "descendant", "name": "descendant", "type": "selector", "category": "Selectors", "subcategory": "Hierarchy", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "ancestor descendant", "desc": "Matches all descendant elements specified by \"descendant\" of elements specified by \"ancestor\".", "longdesc": "", "params": [{"optional": false, "name": "ancestor", "type": "Selector", "desc": "Any valid selector."}, {"optional": false, "name": "descendant", "type": "Selector", "desc": "A selector to match elements that are descendants of the first selector."}], "examples": [{"code": "$(\"form input\").css(\"border\", \"2px dotted blue\");", "htmlCode": "$(\"form input\").css(\"border\", \"2px dotted blue\");", "desc": "Finds all input descendants of forms.", "css": "\n  body { font-size:14px; }\n  form { border:2px green solid; padding:2px; margin:0; \n         background:#efe; }\n  div { color:red; }\n  fieldset { margin:1px; padding:3px; }\n  ", "inhead": "", "html": "<form>\n    <div>Form is surrounded by the green outline</div>\n    <label>Child:</label>\n    <input name=\"name\" />\n    <fieldset>\n      <label>Grandchild:</label>\n      <input name=\"newsletter\" />\n    </fieldset>\n  </form>\n  Sibling to form: <input name=\"none\" />", "exampleId": "23iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"form input\").css(\"border\", \"2px dotted blue\");\n  });\n</script>\n<style>\n\n  body { font-size:14px; }\n  form { border:2px green solid; padding:2px; margin:0; \n         background:#efe; }\n  div { color:red; }\n  fieldset { margin:1px; padding:3px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <div>Form is surrounded by the green outline</div>\n    <label>Child:</label>\n    <input name=\"name\" />\n    <fieldset>\n      <label>Grandchild:</label>\n      <input name=\"newsletter\" />\n    </fieldset>\n  </form>\n  Sibling to form: <input name=\"none\" />\n</body>\n</html>"}]}, "child24": {"id": 24, "searchname": "child", "name": "child", "type": "selector", "category": "Selectors", "subcategory": "Hierarchy", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "parent > child", "desc": "Matches all child elements specified by \"child\" of elements specified by \"parent\".", "longdesc": "", "params": [{"optional": false, "name": "parent", "type": "Selector", "desc": "Any valid selector."}, {"optional": false, "name": "child", "type": "Selector", "desc": "A selector to match elements that are children of the first selector."}], "examples": [{"code": "$(\"#main > *\").css(\"border\", \"3px double red\");", "htmlCode": "$(\"#main &gt; *\").css(\"border\", \"3px double red\");", "desc": "Finds all children of the element with id \"main\" which is yellow.", "css": "\n  body { font-size:14px; }\n  span#main { display:block; background:yellow; height:110px; }\n  button { display:block; float:left; margin:2px; \n           font-size:14px; }\n  div { width:90px; height:90px; margin:5px; float:left;\n        background:#bbf; font-weight:bold; }\n  div.mini { width:30px; height:30px; background:green; }\n  ", "inhead": "", "html": "<span id=\"main\">\n    <div></div>\n    <button>Child</button>\n    <div class=\"mini\"></div>\n    <div>\n      <div class=\"mini\"></div>\n      <div class=\"mini\"></div>\n    </div>\n    <div><button>Grand</button></div>\n    <div><span>A Span <em>in</em> child</span></div>\n    <span>A Span in main</span>\n  </span>", "exampleId": "24iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"#main > *\").css(\"border\", \"3px double red\");\n  });\n</script>\n<style>\n\n  body { font-size:14px; }\n  span#main { display:block; background:yellow; height:110px; }\n  button { display:block; float:left; margin:2px; \n           font-size:14px; }\n  div { width:90px; height:90px; margin:5px; float:left;\n        background:#bbf; font-weight:bold; }\n  div.mini { width:30px; height:30px; background:green; }\n  \n</style>\n</head>\n<body>\n<span id=\"main\">\n    <div></div>\n    <button>Child</button>\n    <div class=\"mini\"></div>\n    <div>\n      <div class=\"mini\"></div>\n      <div class=\"mini\"></div>\n    </div>\n    <div><button>Grand</button></div>\n    <div><span>A Span <em>in</em> child</span></div>\n    <span>A Span in main</span>\n  </span>\n</body>\n</html>"}]}, "next25": {"id": 25, "searchname": "next", "name": "next", "type": "selector", "category": "Selectors", "subcategory": "Hierarchy", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "prev + next", "desc": "Matches all next elements specified by \"next\" that are next to elements specified by \"prev\".", "longdesc": "", "params": [{"optional": false, "name": "prev", "type": "Selector", "desc": "Any valid selector."}, {"optional": false, "name": "next", "type": "Selector", "desc": "A selector to match elements that are next to the first selector."}], "examples": [{"code": "$(\"label + input\").css(\"color\", \"blue\").val(\"Labeled!\")", "htmlCode": "$(\"label + input\").css(\"color\", \"blue\").val(\"Labeled!\")", "desc": "Finds all inputs that are next to a label.", "css": "", "inhead": "", "html": "<form>\n    <label>Name:</label>\n    <input name=\"name\" />\n    <fieldset>\n      <label>Newsletter:</label>\n      <input name=\"newsletter\" />\n    </fieldset>\n  </form>\n  <input name=\"none\" />", "exampleId": "25iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"label + input\").css(\"color\", \"blue\").val(\"Labeled!\")\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<form>\n    <label>Name:</label>\n    <input name=\"name\" />\n    <fieldset>\n      <label>Newsletter:</label>\n      <input name=\"newsletter\" />\n    </fieldset>\n  </form>\n  <input name=\"none\" />\n</body>\n</html>"}]}, "siblings26": {"id": 26, "searchname": "siblings", "name": "siblings", "type": "selector", "category": "Selectors", "subcategory": "Hierarchy", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "prev ~ siblings", "desc": "Matches all sibling elements after the \"prev\" element that match the filtering \"siblings\" selector.", "longdesc": "", "params": [{"optional": false, "name": "prev", "type": "Selector", "desc": "Any valid selector."}, {"optional": false, "name": "siblings", "type": "Selector", "desc": "A filter selector to match elements that are following siblings to the first selector."}], "examples": [{"code": "$(\"#prev ~ div\").css(\"border\", \"3px groove blue\");", "htmlCode": "$(\"#prev ~ div\").css(\"border\", \"3px groove blue\");", "desc": "Finds all divs that are siblings after the element with #prev as its id.  Notice the span isn't selected since it is not a div and the \"niece\" isn't selected since it is a child of a sibling, not an actual sibling.", "css": "\n  div,span {\n    display:block;\n    width:80px;\n    height:80px;\n    margin:5px;\n    background:#bbffaa;\n    float:left;\n    font-size:14px;\n  }\n  div#small {\n    width:60px;\n    height:25px;\n    font-size:12px;\n    background:#fab;\n  }\n  ", "inhead": "", "html": "<div>div (doesn't match since before #prev)</div>\n  <div id=\"prev\">div#prev</div>\n  <div>div sibling</div>\n  <div>div sibling <div id=\"small\">div neice</div></div>\n  <span>span sibling (not div)</span>\n  <div>div sibling</div>", "exampleId": "26iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"#prev ~ div\").css(\"border\", \"3px groove blue\");\n  });\n</script>\n<style>\n\n  div,span {\n    display:block;\n    width:80px;\n    height:80px;\n    margin:5px;\n    background:#bbffaa;\n    float:left;\n    font-size:14px;\n  }\n  div#small {\n    width:60px;\n    height:25px;\n    font-size:12px;\n    background:#fab;\n  }\n  \n</style>\n</head>\n<body>\n<div>div (doesn't match since before #prev)</div>\n  <div id=\"prev\">div#prev</div>\n  <div>div sibling</div>\n  <div>div sibling <div id=\"small\">div neice</div></div>\n  <span>span sibling (not div)</span>\n  <div>div sibling</div>\n</body>\n</html>"}]}, "first27": {"id": 27, "searchname": "first", "name": "first", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element&gt;", "added": "1.0", "sample": ":first", "desc": "Matches the first selected element.", "longdesc": "<p>While this matches only a single element, <a href='Selectors/firstChild'>:first-child</a> matches more than one: One for each parent.</p>", "params": [], "examples": [{"code": "$(\"tr:first\").css(\"font-style\", \"italic\");", "htmlCode": "$(\"tr:first\").css(\"font-style\", \"italic\");", "desc": "Finds the first table row.", "css": "\n  td { color:blue; font-weight:bold; }\n  ", "inhead": "", "html": "<table>\n    <tr><td>Row 1</td></tr>\n    <tr><td>Row 2</td></tr>\n    <tr><td>Row 3</td></tr>\n  </table>", "exampleId": "27iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"tr:first\").css(\"font-style\", \"italic\");\n  });\n</script>\n<style>\n\n  td { color:blue; font-weight:bold; }\n  \n</style>\n</head>\n<body>\n<table>\n    <tr><td>Row 1</td></tr>\n    <tr><td>Row 2</td></tr>\n    <tr><td>Row 3</td></tr>\n  </table>\n</body>\n</html>"}]}, "last28": {"id": 28, "searchname": "last", "name": "last", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element&gt;", "added": "1.0", "sample": ":last", "desc": "Matches the last selected element.", "longdesc": "", "params": [], "examples": [{"code": "$(\"tr:last\").css({backgroundColor: 'yellow', fontWeight: 'bolder'});", "htmlCode": "$(\"tr:last\").css({backgroundColor: 'yellow', fontWeight: 'bolder'});", "desc": "Finds the last table row.", "css": "", "inhead": "", "html": "<table>\n    <tr><td>First Row</td></tr>\n    <tr><td>Middle Row</td></tr>\n    <tr><td>Last Row</td></tr>\n  </table>", "exampleId": "28iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"tr:last\").css({backgroundColor: 'yellow', fontWeight: 'bolder'});\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<table>\n    <tr><td>First Row</td></tr>\n    <tr><td>Middle Row</td></tr>\n    <tr><td>Last Row</td></tr>\n  </table>\n</body>\n</html>"}]}, "not29": {"id": 29, "searchname": "not", "name": "not", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":not(selector)", "desc": "Filters out all elements matching the given selector.", "longdesc": "", "params": [{"optional": false, "name": "selector", "type": "Selector", "desc": "A selector with which to filter by."}], "examples": [{"code": "\n    $(\"input:not(:checked) + span\").css(\"background-color\", \"yellow\");\n    $(\"input\").attr(\"disabled\", \"disabled\");\n", "htmlCode": "\n    $(\"input:not(:checked) + span\").css(\"background-color\", \"yellow\");\n    $(\"input\").attr(\"disabled\", \"disabled\");\n", "desc": "Finds all inputs that are not checked and highlights the next sibling span.  Notice there is no change when clicking the checkboxes since no click events have been linked.", "css": "", "inhead": "", "html": "<div>\n    <input type=\"checkbox\" name=\"a\" />\n    <span>Mary</span>\n  </div>\n  <div>\n    <input type=\"checkbox\" name=\"b\" />\n    <span>lcm</span>\n  </div>\n  <div>\n    <input type=\"checkbox\" name=\"c\" checked=\"checked\" />\n    <span>Peter</span>\n  </div>", "exampleId": "29iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"input:not(:checked) + span\").css(\"background-color\", \"yellow\");\n    $(\"input\").attr(\"disabled\", \"disabled\");\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div>\n    <input type=\"checkbox\" name=\"a\" />\n    <span>Mary</span>\n  </div>\n  <div>\n    <input type=\"checkbox\" name=\"b\" />\n    <span>lcm</span>\n  </div>\n  <div>\n    <input type=\"checkbox\" name=\"c\" checked=\"checked\" />\n    <span>Peter</span>\n  </div>\n</body>\n</html>"}]}, "even30": {"id": 30, "searchname": "even", "name": "even", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":even", "desc": "Matches even elements, zero-indexed.", "longdesc": "", "params": [], "examples": [{"code": "$(\"tr:even\").css(\"background-color\", \"#bbbbff\");", "htmlCode": "$(\"tr:even\").css(\"background-color\", \"#bbbbff\");", "desc": "Finds even table rows, matching the first, third and so on (index 0, 2, 4 etc.).", "css": "\n  table {\n    background:#eeeeee;\n  }\n  ", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>Row with Index #0</td></tr>\n    <tr><td>Row with Index #1</td></tr>\n    <tr><td>Row with Index #2</td></tr>\n    <tr><td>Row with Index #3</td></tr>\n  </table>", "exampleId": "30iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"tr:even\").css(\"background-color\", \"#bbbbff\");\n  });\n</script>\n<style>\n\n  table {\n    background:#eeeeee;\n  }\n  \n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>Row with Index #0</td></tr>\n    <tr><td>Row with Index #1</td></tr>\n    <tr><td>Row with Index #2</td></tr>\n    <tr><td>Row with Index #3</td></tr>\n  </table>\n</body>\n</html>"}]}, "odd31": {"id": 31, "searchname": "odd", "name": "odd", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":odd", "desc": "Matches odd elements, zero-indexed.", "longdesc": "", "params": [], "examples": [{"code": "$(\"tr:odd\").css(\"background-color\", \"#bbbbff\");", "htmlCode": "$(\"tr:odd\").css(\"background-color\", \"#bbbbff\");", "desc": "Finds odd table rows, matching the second, fourth and so on (index 1, 3, 5 etc.).", "css": "\n  table {\n    background:#f3f7f5;\n  }\n  ", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>Row with Index #0</td></tr>\n    <tr><td>Row with Index #1</td></tr>\n    <tr><td>Row with Index #2</td></tr>\n    <tr><td>Row with Index #3</td></tr>\n  </table>", "exampleId": "31iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"tr:odd\").css(\"background-color\", \"#bbbbff\");\n  });\n</script>\n<style>\n\n  table {\n    background:#f3f7f5;\n  }\n  \n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>Row with Index #0</td></tr>\n    <tr><td>Row with Index #1</td></tr>\n    <tr><td>Row with Index #2</td></tr>\n    <tr><td>Row with Index #3</td></tr>\n  </table>\n</body>\n</html>"}]}, "eq32": {"id": 32, "searchname": "eq", "name": "eq", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element&gt;", "added": "1.0", "sample": ":eq(index)", "desc": "Matches a single element by its index.", "longdesc": "", "params": [{"optional": false, "name": "index", "type": "Number", "desc": "Zero-based index of the element to match."}], "examples": [{"code": "$(\"td:eq(2)\").css(\"color\", \"red\");", "htmlCode": "$(\"td:eq(2)\").css(\"color\", \"red\");", "desc": "Finds the third td.", "css": "", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>", "exampleId": "32iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"td:eq(2)\").css(\"color\", \"red\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>\n</body>\n</html>"}]}, "gt33": {"id": 33, "searchname": "gt", "name": "gt", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":gt(index)", "desc": "Matches all elements with an index above the given one.", "longdesc": "", "params": [{"optional": false, "name": "index", "type": "Number", "desc": "Zero-based index."}], "examples": [{"code": "$(\"td:gt(4)\").css(\"text-decoration\", \"line-through\");", "htmlCode": "$(\"td:gt(4)\").css(\"text-decoration\", \"line-through\");", "desc": "Finds TD #5 and higher. Reminder: the indexing starts at 0.", "css": "", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>", "exampleId": "33iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"td:gt(4)\").css(\"text-decoration\", \"line-through\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>\n</body>\n</html>"}]}, "lt34": {"id": 34, "searchname": "lt", "name": "lt", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":lt(index)", "desc": "Matches all elements with an index below the given one.", "longdesc": "", "params": [{"optional": false, "name": "index", "type": "Number", "desc": "Zero-based index."}], "examples": [{"code": "$(\"td:lt(4)\").css(\"color\", \"red\");", "htmlCode": "$(\"td:lt(4)\").css(\"color\", \"red\");", "desc": "Finds TDs less than the one with the 4th index (TD#4).", "css": "", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>", "exampleId": "34iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"td:lt(4)\").css(\"color\", \"red\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>TD #0</td><td>TD #1</td><td>TD #2</td></tr>\n    <tr><td>TD #3</td><td>TD #4</td><td>TD #5</td></tr>\n    <tr><td>TD #6</td><td>TD #7</td><td>TD #8</td></tr>\n  </table>\n</body>\n</html>"}]}, "header35": {"id": 35, "searchname": "header", "name": "header", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.2", "sample": ":header", "desc": "Matches all elements that are headers, like h1, h2, h3 and so on.", "longdesc": "", "params": [], "examples": [{"code": "$(\":header\").css({ background:'#CCC', color:'blue' });", "htmlCode": "$(\":header\").css({ background:'#CCC', color:'blue' });", "desc": "Adds a background and text color to all the headers on the page.", "css": "\n  body { font-size: 10px; font-family: Arial; } \n  h1, h2 { margin: 3px 0; }\n  ", "inhead": "", "html": "<h1>Header 1</h1>\n  <p>Contents 1</p>\n  <h2>Header 2</h2>\n  <p>Contents 2</p>", "exampleId": "35iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\":header\").css({ background:'#CCC', color:'blue' });\n  });\n</script>\n<style>\n\n  body { font-size: 10px; font-family: Arial; } \n  h1, h2 { margin: 3px 0; }\n  \n</style>\n</head>\n<body>\n<h1>Header 1</h1>\n  <p>Contents 1</p>\n  <h2>Header 2</h2>\n  <p>Contents 2</p>\n</body>\n</html>"}]}, "animated36": {"id": 36, "searchname": "animated", "name": "animated", "type": "selector", "category": "Selectors", "subcategory": "Basic Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.2", "sample": ":animated", "desc": "Matches all elements that are currently being animated.", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"#run\").click(function(){\n      $(\"div:animated\").toggleClass(\"colored\");\n    });\n    function animateIt() {\n      $(\"#mover\").slideToggle(\"slow\", animateIt);\n    }\n    animateIt();\n", "htmlCode": "\n    $(\"#run\").click(function(){\n      $(\"div:animated\").toggleClass(\"colored\");\n    });\n    function animateIt() {\n      $(\"#mover\").slideToggle(\"slow\", animateIt);\n    }\n    animateIt();\n", "desc": "Change the color of any div that is animated.", "css": "\n  div { background:yellow; border:1px solid #AAA; width:80px; height:80px; margin:5px; float:left; }\n  div.colored { background:green; }\n  ", "inhead": "", "html": "<button id=\"run\">Run</button>\n  <div></div>\n  <div id=\"mover\"></div>\n  <div></div>", "exampleId": "36iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#run\").click(function(){\n      $(\"div:animated\").toggleClass(\"colored\");\n    });\n    function animateIt() {\n      $(\"#mover\").slideToggle(\"slow\", animateIt);\n    }\n    animateIt();\n\n  });\n</script>\n<style>\n\n  div { background:yellow; border:1px solid #AAA; width:80px; height:80px; margin:5px; float:left; }\n  div.colored { background:green; }\n  \n</style>\n</head>\n<body>\n<button id=\"run\">Run</button>\n  <div></div>\n  <div id=\"mover\"></div>\n  <div></div>\n</body>\n</html>"}]}, "contains37": {"id": 37, "searchname": "contains", "name": "contains", "type": "selector", "category": "Selectors", "subcategory": "Content Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":contains(text)", "desc": "Matches elements which contain the given text.", "longdesc": "", "params": [{"optional": false, "name": "text", "type": "String", "desc": "A string of text to look for. It's case sensitive."}], "examples": [{"code": "$(\"div:contains('John')\").css(\"text-decoration\", \"underline\");", "htmlCode": "$(\"div:contains('John')\").css(\"text-decoration\", \"underline\");", "desc": "Finds all divs containing \"John\" and underlines them.", "css": "", "inhead": "", "html": "<div>John Resig</div>\n  <div>George Martin</div>\n  <div>Malcom John Sinclair</div>\n  <div>J. Ohn", "exampleId": "37iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div:contains('John')\").css(\"text-decoration\", \"underline\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div>John Resig</div>\n  <div>George Martin</div>\n  <div>Malcom John Sinclair</div>\n  <div>J. Ohn\n</body>\n</html>"}]}, "empty38": {"id": 38, "searchname": "empty", "name": "empty", "type": "selector", "category": "Selectors", "subcategory": "Content Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":empty", "desc": "Matches all elements that have no children (including text nodes).", "longdesc": "", "params": [], "examples": [{"code": "$(\"td:empty\").text(\"Was empty!\").css('background', 'rgb(255,220,200)');", "htmlCode": "$(\"td:empty\").text(\"Was empty!\").css('background', 'rgb(255,220,200)');", "desc": "Finds all elements that are empty - they don't have child elements or text.", "css": "\n  td { text-align:center; }\n  ", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>TD #0</td><td></td></tr>\n    <tr><td>TD #2</td><td></td></tr>\n    <tr><td></td><td>TD#5</td></tr>\n  </table>", "exampleId": "38iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"td:empty\").text(\"Was empty!\").css('background', 'rgb(255,220,200)');\n  });\n</script>\n<style>\n\n  td { text-align:center; }\n  \n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>TD #0</td><td></td></tr>\n    <tr><td>TD #2</td><td></td></tr>\n    <tr><td></td><td>TD#5</td></tr>\n  </table>\n</body>\n</html>"}]}, "has39": {"id": 39, "searchname": "has", "name": "has", "type": "selector", "category": "Selectors", "subcategory": "Content Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":has(selector)", "desc": "Matches elements which contain at least one element that matches the specified selector.", "longdesc": "", "params": [{"optional": false, "name": "selector", "type": "Selector", "desc": "A selector with which to filter by."}], "examples": [{"code": "$(\"div:has(p)\").addClass(\"test\");", "htmlCode": "$(\"div:has(p)\").addClass(\"test\");", "desc": "Adds the class \"test\" to all divs that have a paragraph inside of them.", "css": "\n  .test{ border: 3px inset red; }\n  ", "inhead": "", "html": "<div><p>Hello in a paragraph</p></div>\n  <div>Hello again! (with no paragraph)</div>", "exampleId": "39iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div:has(p)\").addClass(\"test\");\n  });\n</script>\n<style>\n\n  .test{ border: 3px inset red; }\n  \n</style>\n</head>\n<body>\n<div><p>Hello in a paragraph</p></div>\n  <div>Hello again! (with no paragraph)</div>\n</body>\n</html>"}]}, "parent40": {"id": 40, "searchname": "parent", "name": "parent", "type": "selector", "category": "Selectors", "subcategory": "Content Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":parent", "desc": "Matches all elements that are parents - they have child elements, including text.", "longdesc": "", "params": [], "examples": [{"code": "$(\"td:parent\").fadeTo(1500, 0.3);", "htmlCode": "$(\"td:parent\").fadeTo(1500, 0.3);", "desc": "Finds all tds with children, including text.", "css": "\ntd { width:40px; background:green; }\n  ", "inhead": "", "html": "<table border=\"1\">\n    <tr><td>Value 1</td><td></td></tr>\n    <tr><td>Value 2</td><td></td></tr>\n  </table>", "exampleId": "40iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"td:parent\").fadeTo(1500, 0.3);\n  });\n</script>\n<style>\n\ntd { width:40px; background:green; }\n  \n</style>\n</head>\n<body>\n<table border=\"1\">\n    <tr><td>Value 1</td><td></td></tr>\n    <tr><td>Value 2</td><td></td></tr>\n  </table>\n</body>\n</html>"}]}, "hidden41": {"id": 41, "searchname": "hidden", "name": "hidden", "type": "selector", "category": "Selectors", "subcategory": "Visibility Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":hidden", "desc": "Matches all elements that are hidden, or input elements of type \"hidden\".", "longdesc": "", "params": [], "examples": [{"code": "\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n", "htmlCode": "\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n", "desc": "Shows all hidden divs and counts hidden inputs.", "css": "\n  div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }\n  span { display:block; clear:left; color:red; }\n  .starthidden { display:none; }\n  ", "inhead": "", "html": "<span></span>\n  <div></div>\n  <div style=\"display:none;\">Hider!</div>\n  <div></div>\n  <div class=\"starthidden\">Hider!</div>\n  <div></div>\n  <form>\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n  </form>\n  <span>\n  </span>", "exampleId": "41iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n\n  });\n</script>\n<style>\n\n  div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }\n  span { display:block; clear:left; color:red; }\n  .starthidden { display:none; }\n  \n</style>\n</head>\n<body>\n<span></span>\n  <div></div>\n  <div style=\"display:none;\">Hider!</div>\n  <div></div>\n  <div class=\"starthidden\">Hider!</div>\n  <div></div>\n  <form>\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n  </form>\n  <span>\n  </span>\n</body>\n</html>"}]}, "visible42": {"id": 42, "searchname": "visible", "name": "visible", "type": "selector", "category": "Selectors", "subcategory": "Visibility Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":visible", "desc": "Matches all elements that are visible.", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"div:visible\").click(function () {\n      $(this).css(\"background\", \"yellow\");\n    });\n    $(\"button\").click(function () {\n      $(\"div:hidden\").show(\"fast\");\n    });\n", "htmlCode": "\n    $(\"div:visible\").click(function () {\n      $(this).css(\"background\", \"yellow\");\n    });\n    $(\"button\").click(function () {\n      $(\"div:hidden\").show(\"fast\");\n    });\n", "desc": "Make all visible divs turn yellow on click.", "css": "\n  div { width:50px; height:40px; margin:5px; border:3px outset green; float:left; }\n  .starthidden { display:none; }\n  ", "inhead": "", "html": "<button>Show hidden to see they don't change</button>\n  <div></div>\n  <div class=\"starthidden\"></div>\n  <div></div>\n  <div></div>\n  <div style=\"display:none;\"></div>", "exampleId": "42iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div:visible\").click(function () {\n      $(this).css(\"background\", \"yellow\");\n    });\n    $(\"button\").click(function () {\n      $(\"div:hidden\").show(\"fast\");\n    });\n\n  });\n</script>\n<style>\n\n  div { width:50px; height:40px; margin:5px; border:3px outset green; float:left; }\n  .starthidden { display:none; }\n  \n</style>\n</head>\n<body>\n<button>Show hidden to see they don't change</button>\n  <div></div>\n  <div class=\"starthidden\"></div>\n  <div></div>\n  <div></div>\n  <div style=\"display:none;\"></div>\n</body>\n</html>"}]}, "attributehas43": {"id": 43, "searchname": "attributehas", "name": "attributeHas", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute]", "desc": "Matches elements that have the specified attribute.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}], "examples": [{"code": "\n    $(\"div[id]\").one(\"click\", function(){\n      var idString = $(this).text() + \" = \" + $(this).attr(\"id\");\n      $(this).text(idString);\n    });\n", "htmlCode": "\n    $(\"div[id]\").one(\"click\", function(){\n      var idString = $(this).text() + \" = \" + $(this).attr(\"id\");\n      $(this).text(idString);\n    });\n", "desc": "Bind a single click that adds the div id to its text.", "css": "", "inhead": "", "html": "<div>no id</div>\n  <div id=\"hey\">with id</div>\n  <div id=\"there\">has an id</div>\n  <div>nope</div>", "exampleId": "43iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div[id]\").one(\"click\", function(){\n      var idString = $(this).text() + \" = \" + $(this).attr(\"id\");\n      $(this).text(idString);\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div>no id</div>\n  <div id=\"hey\">with id</div>\n  <div id=\"there\">has an id</div>\n  <div>nope</div>\n</body>\n</html>"}]}, "attributeequals44": {"id": 44, "searchname": "attributeequals", "name": "attributeEquals", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute=value]", "desc": "Matches elements that have the specified attribute with a certain value.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}, {"optional": false, "name": "value", "type": "String", "desc": "An attribute value. Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like \"]\"."}], "examples": [{"code": "$(\"input[name='newsletter']\").next().text(\" is newsletter\");", "htmlCode": "$(\"input[name='newsletter']\").next().text(\" is newsletter\");", "desc": "Finds all inputs with name 'newsletter' and changes the text of the span next to it.", "css": "", "inhead": "", "html": "<div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Hot Fuzz\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"newsletters\" value=\"Cold Fusion\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"accept\" value=\"Evil Plans\" />\n    <span>name?</span>\n  </div>", "exampleId": "44iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[name='newsletter']\").next().text(\" is newsletter\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Hot Fuzz\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"newsletters\" value=\"Cold Fusion\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"accept\" value=\"Evil Plans\" />\n    <span>name?</span>\n  </div>\n</body>\n</html>"}]}, "attributenotequal45": {"id": 45, "searchname": "attributenotequal", "name": "attributeNotEqual", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute!=value]", "desc": "Matches elements that don't have the specified attribute with a certain value.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}, {"optional": false, "name": "value", "type": "String", "desc": "An attribute value. Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like \"]\"."}], "examples": [{"code": "$(\"input[name!='newsletter']\").next().text(\" is not newsletter\");", "htmlCode": "$(\"input[name!='newsletter']\").next().text(\" is not newsletter\");", "desc": "Finds all inputs that don't have the name 'newsletter' and changes the text of the span next to it.", "css": "", "inhead": "", "html": "<div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Hot Fuzz\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Cold Fusion\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"accept\" value=\"Evil Plans\" />\n    <span>name?</span>\n  </div>", "exampleId": "45iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[name!='newsletter']\").next().text(\" is not newsletter\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Hot Fuzz\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"newsletter\" value=\"Cold Fusion\" />\n    <span>name?</span>\n  </div>\n  <div>\n    <input type=\"radio\" name=\"accept\" value=\"Evil Plans\" />\n    <span>name?</span>\n  </div>\n</body>\n</html>"}]}, "attributestartswith46": {"id": 46, "searchname": "attributestartswith", "name": "attributeStartsWith", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute^=value]", "desc": "Matches elements that have the specified attribute and it starts with a certain value.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}, {"optional": false, "name": "value", "type": "String", "desc": "An attribute value. Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like \"]\"."}], "examples": [{"code": "$(\"input[@name^='news']\").val(\"news here!\");", "htmlCode": "$(\"input[@name^='news']\").val(\"news here!\");", "desc": "Finds all inputs with an attribute name that starts with 'news' and puts text in them.", "css": "", "inhead": "", "html": "<input name=\"newsletter\" />\n  <input name=\"milkman\" />\n  <input name=\"newsboy\" />", "exampleId": "46iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[@name^='news']\").val(\"news here!\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<input name=\"newsletter\" />\n  <input name=\"milkman\" />\n  <input name=\"newsboy\" />\n</body>\n</html>"}]}, "attributeendswith47": {"id": 47, "searchname": "attributeendswith", "name": "attributeEndsWith", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute$=value]", "desc": "Matches elements that have the specified attribute and it ends with a certain value.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}, {"optional": false, "name": "value", "type": "String", "desc": "An attribute value. Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like \"]\"."}], "examples": [{"code": "$(\"input[name$='letter']\").val(\"a letter\");", "htmlCode": "$(\"input[name$='letter']\").val(\"a letter\");", "desc": "Finds all inputs with an attribute name that ends with 'letter' and puts text in them.", "css": "", "inhead": "", "html": "<input name=\"newsletter\" />\n  <input name=\"milkman\" />\n  <input name=\"jobletter\" />", "exampleId": "47iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[name$='letter']\").val(\"a letter\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<input name=\"newsletter\" />\n  <input name=\"milkman\" />\n  <input name=\"jobletter\" />\n</body>\n</html>"}]}, "attributecontains48": {"id": 48, "searchname": "attributecontains", "name": "attributeContains", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[attribute*=value]", "desc": "Matches elements that have the specified attribute and it contains a certain value.", "longdesc": "", "params": [{"optional": false, "name": "attribute", "type": "String", "desc": "An attribute name."}, {"optional": false, "name": "value", "type": "String", "desc": "An attribute value. Quotes are optional in most cases, but should be used to avoid conflicts when the value contains characters like \"]\"."}], "examples": [{"code": "$(\"input[name*='man']\").val(\"has man in it!\");", "htmlCode": "$(\"input[name*='man']\").val(\"has man in it!\");", "desc": "Finds all inputs that with a name attribute that contains 'man' and sets the value with some text.", "css": "", "inhead": "", "html": "<input name=\"man-news\" />\n  <input name=\"milkman\" />\n  <input name=\"letterman2\" />\n  <input name=\"newmilk\" />", "exampleId": "48iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[name*='man']\").val(\"has man in it!\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<input name=\"man-news\" />\n  <input name=\"milkman\" />\n  <input name=\"letterman2\" />\n  <input name=\"newmilk\" />\n</body>\n</html>"}]}, "attributemultiple49": {"id": 49, "searchname": "attributemultiple", "name": "attributeMultiple", "type": "selector", "category": "Selectors", "subcategory": "Attribute Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": "[selector1][selector2][selectorN]", "desc": "Matches elements that have the specified attribute and it contains a certain value.", "longdesc": "", "params": [{"optional": false, "name": "selector1", "type": "Selector", "desc": "An attribute selector."}, {"optional": false, "name": "selector2", "type": "Selector", "desc": "Another attribute selector, reducing the selection even more"}, {"optional": true, "name": "selectorN", "type": "Selector", "desc": "As many more attribute selectors as necessary"}], "examples": [{"code": "$(\"input[id][name$='man']\").val(\"only this one\");", "htmlCode": "$(\"input[id][name$='man']\").val(\"only this one\");", "desc": "Finds all inputs that have an id attribute and whose name attribute ends with man and sets the value.", "css": "", "inhead": "", "html": "<input id=\"man-news\" name=\"man-news\" />\n  <input name=\"milkman\" />\n  <input id=\"letterman\" name=\"new-letterman\" />\n  <input name=\"newmilk\" />", "exampleId": "49iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input[id][name$='man']\").val(\"only this one\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<input id=\"man-news\" name=\"man-news\" />\n  <input name=\"milkman\" />\n  <input id=\"letterman\" name=\"new-letterman\" />\n  <input name=\"newmilk\" />\n</body>\n</html>"}]}, "nthchild50": {"id": 50, "searchname": "nthchild", "name": "nthChild", "type": "selector", "category": "Selectors", "subcategory": "Child Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":nth-child(index/even/odd/equation)", "desc": "Matches all elements that are the nth-child of their parent or that are the parent's even or odd children.", "longdesc": "<p>While <a href='Selectors/eq'>:eq(index)</a> matches only a single element, this matches more then one: One for each parent with index.  Multiple for each parent with even, odd, or equation.</p><p>The specified index is one-indexed, in contrast to :eq() which starts at zero.</p>", "params": [{"optional": false, "name": "index", "type": "Number/String", "desc": "The index of each child to match, starting with 1 or the string even, odd, or equation ( eg. :nth-child(even), :nth-child(4n) )"}], "examples": [{"code": "$(\"ul li:nth-child(2)\").append(\"<span> - 2nd!</span>\");", "htmlCode": "$(\"ul li:nth-child(2)\").append(\"&lt;span&gt; - 2nd!&lt;/span&gt;\");", "desc": "Finds the second li in each matched ul and notes it.", "css": "\n  div { float:left; }\n  span { color:blue; }\n  ", "inhead": "", "html": "<div><ul>\n    <li>John</li>\n    <li>Karl</li>\n    <li>Brandon</li>\n  </ul></div>\n  <div><ul>\n    <li>Sam</li>\n  </ul></div>\n  <div><ul>\n    <li>Glen</li>\n    <li>Tane</li>\n    <li>Ralph</li>\n    <li>David</li>\n  </ul></div>", "exampleId": "50iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"ul li:nth-child(2)\").append(\"<span> - 2nd!</span>\");\n  });\n</script>\n<style>\n\n  div { float:left; }\n  span { color:blue; }\n  \n</style>\n</head>\n<body>\n<div><ul>\n    <li>John</li>\n    <li>Karl</li>\n    <li>Brandon</li>\n  </ul></div>\n  <div><ul>\n    <li>Sam</li>\n  </ul></div>\n  <div><ul>\n    <li>Glen</li>\n    <li>Tane</li>\n    <li>Ralph</li>\n    <li>David</li>\n  </ul></div>\n</body>\n</html>"}, {"code": "\n    $(\"button\").click(function () {\n      var str = $(this).text();\n      $(\"tr\").css(\"background\", \"white\");\n      $(\"tr\" + str).css(\"background\", \"#ff0000\");\n      $(\"#inner\").text(str);\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      var str = $(this).text();\n      $(\"tr\").css(\"background\", \"white\");\n      $(\"tr\" + str).css(\"background\", \"#ff0000\");\n      $(\"#inner\").text(str);\n    });\n", "desc": "This is a playground to see how the selector works with different strings.  Notice that this is different from the :even and :odd which have no regard for parent and just filter the list of elements to every other one.  The :nth-child, however, counts the index of the child to its particular parent.  In any case, it's easier to see than explain so...", "css": "\n  button { display:block; font-size:12px; width:100px; }\n  div { float:left; margin:10px; font-size:10px; \n        border:1px solid black; }\n  span { color:blue; font-size:18px; }\n  #inner { color:red; }\n  td { width:50px; text-align:center; }\n  ", "inhead": "", "html": "<div>\n    <button>:nth-child(even)</button>\n    <button>:nth-child(odd)</button>\n    <button>:nth-child(3n)</button>\n    <button>:nth-child(2)</button>\n  </div>\n  <div>\n    <button>:nth-child(3n+1)</button>\n    <button>:nth-child(3n+2)</button>\n    <button>:even</button>\n    <button>:odd</button>\n  </div>\n  <div><table>\n    <tr><td>John</td></tr>\n    <tr><td>Karl</td></tr>\n    <tr><td>Brandon</td></tr>\n    <tr><td>Benjamin</td></tr>\n  </table></div>\n  <div><table>\n    <tr><td>Sam</td></tr>\n  </table></div>\n  <div><table>\n    <tr><td>Glen</td></tr>\n    <tr><td>Tane</td></tr>\n    <tr><td>Ralph</td></tr>\n    <tr><td>David</td></tr>\n    <tr><td>Mike</td></tr>\n    <tr><td>Dan</td></tr>\n  </table></div>\n  <span>\n    tr<span id=\"inner\"></span>\n  </span>", "exampleId": "50iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      var str = $(this).text();\n      $(\"tr\").css(\"background\", \"white\");\n      $(\"tr\" + str).css(\"background\", \"#ff0000\");\n      $(\"#inner\").text(str);\n    });\n\n  });\n</script>\n<style>\n\n  button { display:block; font-size:12px; width:100px; }\n  div { float:left; margin:10px; font-size:10px; \n        border:1px solid black; }\n  span { color:blue; font-size:18px; }\n  #inner { color:red; }\n  td { width:50px; text-align:center; }\n  \n</style>\n</head>\n<body>\n<div>\n    <button>:nth-child(even)</button>\n    <button>:nth-child(odd)</button>\n    <button>:nth-child(3n)</button>\n    <button>:nth-child(2)</button>\n  </div>\n  <div>\n    <button>:nth-child(3n+1)</button>\n    <button>:nth-child(3n+2)</button>\n    <button>:even</button>\n    <button>:odd</button>\n  </div>\n  <div><table>\n    <tr><td>John</td></tr>\n    <tr><td>Karl</td></tr>\n    <tr><td>Brandon</td></tr>\n    <tr><td>Benjamin</td></tr>\n  </table></div>\n  <div><table>\n    <tr><td>Sam</td></tr>\n  </table></div>\n  <div><table>\n    <tr><td>Glen</td></tr>\n    <tr><td>Tane</td></tr>\n    <tr><td>Ralph</td></tr>\n    <tr><td>David</td></tr>\n    <tr><td>Mike</td></tr>\n    <tr><td>Dan</td></tr>\n  </table></div>\n  <span>\n    tr<span id=\"inner\"></span>\n  </span>\n</body>\n</html>"}]}, "firstchild51": {"id": 51, "searchname": "firstchild", "name": "firstChild", "type": "selector", "category": "Selectors", "subcategory": "Child Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":first-child", "desc": "Matches all elements that are the first child of their parent.", "longdesc": "<p>While <a href='Selectors/first'>:first</a> matches only a single element, this matches more then one: One for each parent.</p>", "params": [], "examples": [{"code": "\n    $(\"div span:first-child\")\n        .css(\"text-decoration\", \"underline\")\n        .hover(function () {\n              $(this).addClass(\"sogreen\");\n            }, function () {\n              $(this).removeClass(\"sogreen\");\n            });\n", "htmlCode": "\n    $(\"div span:first-child\")\n        .css(\"text-decoration\", \"underline\")\n        .hover(function () {\n              $(this).addClass(\"sogreen\");\n            }, function () {\n              $(this).removeClass(\"sogreen\");\n            });\n", "desc": "Finds the first span in each matched div to underline and add a hover state.", "css": "\n  span { color:#008; }\n  span.sogreen { color:green; font-weight: bolder; }\n  ", "inhead": "", "html": "<div>\n    <span>John,</span>\n    <span>Karl,</span>\n    <span>Brandon</span>\n  </div>\n  <div>\n    <span>Glen,</span>\n    <span>Tane,</span>\n    <span>Ralph</span>\n  </div>", "exampleId": "51iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div span:first-child\")\n        .css(\"text-decoration\", \"underline\")\n        .hover(function () {\n              $(this).addClass(\"sogreen\");\n            }, function () {\n              $(this).removeClass(\"sogreen\");\n            });\n\n  });\n</script>\n<style>\n\n  span { color:#008; }\n  span.sogreen { color:green; font-weight: bolder; }\n  \n</style>\n</head>\n<body>\n<div>\n    <span>John,</span>\n    <span>Karl,</span>\n    <span>Brandon</span>\n  </div>\n  <div>\n    <span>Glen,</span>\n    <span>Tane,</span>\n    <span>Ralph</span>\n  </div>\n</body>\n</html>"}]}, "lastchild52": {"id": 52, "searchname": "lastchild", "name": "lastChild", "type": "selector", "category": "Selectors", "subcategory": "Child Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":last-child", "desc": "Matches all elements that are the last child of their parent.", "longdesc": "<p>While <a href='Selectors/last'>:last</a> matches only a single element, this matches more then one: One for each parent.</p>", "params": [], "examples": [{"code": "\n    $(\"div span:last-child\")\n        .css({color:\"red\", fontSize:\"80%\"})\n        .hover(function () {\n              $(this).addClass(\"solast\");\n            }, function () {\n              $(this).removeClass(\"solast\");\n            });\n", "htmlCode": "\n    $(\"div span:last-child\")\n        .css({color:\"red\", fontSize:\"80%\"})\n        .hover(function () {\n              $(this).addClass(\"solast\");\n            }, function () {\n              $(this).removeClass(\"solast\");\n            });\n", "desc": "Finds the last span in each matched div and adds some css plus a hover state.", "css": "\n  span.solast { text-decoration:line-through; }\n  ", "inhead": "", "html": "<div>\n    <span>John,</span>\n    <span>Karl,</span>\n    <span>Brandon,</span>\n    <span>Sam</span>\n  </div>\n  <div>\n    <span>Glen,</span>\n    <span>Tane,</span>\n    <span>Ralph,</span>\n    <span>David</span>\n  </div>", "exampleId": "52iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div span:last-child\")\n        .css({color:\"red\", fontSize:\"80%\"})\n        .hover(function () {\n              $(this).addClass(\"solast\");\n            }, function () {\n              $(this).removeClass(\"solast\");\n            });\n\n  });\n</script>\n<style>\n\n  span.solast { text-decoration:line-through; }\n  \n</style>\n</head>\n<body>\n<div>\n    <span>John,</span>\n    <span>Karl,</span>\n    <span>Brandon,</span>\n    <span>Sam</span>\n  </div>\n  <div>\n    <span>Glen,</span>\n    <span>Tane,</span>\n    <span>Ralph,</span>\n    <span>David</span>\n  </div>\n</body>\n</html>"}]}, "onlychild53": {"id": 53, "searchname": "onlychild", "name": "onlyChild", "type": "selector", "category": "Selectors", "subcategory": "Child Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.1.4", "sample": ":only-child", "desc": "Matches all elements that are the only child of their parent.", "longdesc": "<p>If the parent has other child elements, nothing is matched.</p>", "params": [], "examples": [{"code": "$(\"div button:only-child\").text(\"Alone\").css(\"border\", \"2px blue solid\");", "htmlCode": "$(\"div button:only-child\").text(\"Alone\").css(\"border\", \"2px blue solid\");", "desc": "Finds the button with no siblings in each matched div and modifies look.", "css": "\n  div { width:100px; height:80px; margin:5px; float:left; background:#b9e }\n  ", "inhead": "", "html": "<div>\n    <button>Sibling!</button>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    None\n  </div>\n  <div>  \n    <button>Sibling!</button>\n    <button>Sibling!</button>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    <button>Sibling!</button>\n  </div>", "exampleId": "53iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div button:only-child\").text(\"Alone\").css(\"border\", \"2px blue solid\");\n  });\n</script>\n<style>\n\n  div { width:100px; height:80px; margin:5px; float:left; background:#b9e }\n  \n</style>\n</head>\n<body>\n<div>\n    <button>Sibling!</button>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    None\n  </div>\n  <div>  \n    <button>Sibling!</button>\n    <button>Sibling!</button>\n    <button>Sibling!</button>\n  </div>\n  <div>\n    <button>Sibling!</button>\n  </div>\n</body>\n</html>"}]}, "input54": {"id": 54, "searchname": "input", "name": "input", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":input", "desc": "Matches all input, textarea, select and button elements.", "longdesc": "", "params": [], "examples": [{"code": "\n    var allInputs = $(\":input\");\n    var formChildren = $(\"form > *\");\n    $(\"div\").text(\"Found \" + allInputs.length + \" inputs and the form has \" +\n                             formChildren.length + \" children.\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var allInputs = $(\":input\");\n    var formChildren = $(\"form &gt; *\");\n    $(\"div\").text(\"Found \" + allInputs.length + \" inputs and the form has \" +\n                             formChildren.length + \" children.\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all input elements.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option</option></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "54iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var allInputs = $(\":input\");\n    var formChildren = $(\"form > *\");\n    $(\"div\").text(\"Found \" + allInputs.length + \" inputs and the form has \" +\n                             formChildren.length + \" children.\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option</option></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "text55": {"id": 55, "searchname": "text", "name": "text", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":text", "desc": "Matches all input elements of type text.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":text\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":text\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all text inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "55iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":text\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "password56": {"id": 56, "searchname": "password", "name": "password", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":password", "desc": "Matches all input elements of type password.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":password\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":password\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all password inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "56iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":password\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "radio57": {"id": 57, "searchname": "radio", "name": "radio", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":radio", "desc": "Matches all input elements of type radio.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":radio\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":radio\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all radio inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" name=\"asdf\" />\n    <input type=\"radio\" name=\"asdf\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "57iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":radio\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" name=\"asdf\" />\n    <input type=\"radio\" name=\"asdf\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "checkbox58": {"id": 58, "searchname": "checkbox", "name": "checkbox", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":checkbox", "desc": "Matches all input elements of type checkbox.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":checkbox\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":checkbox\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all checkbox inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "58iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":checkbox\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "submit59": {"id": 59, "searchname": "submit", "name": "submit", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":submit", "desc": "Matches all input elements of type submit.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":submit\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":submit\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all submit inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "59iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":submit\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "image60": {"id": 60, "searchname": "image", "name": "image", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":image", "desc": "Matches all input elements of type image.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":image\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":image\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all image inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "60iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":image\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "reset61": {"id": 61, "searchname": "reset", "name": "reset", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":reset", "desc": "Matches all input elements of type reset.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":reset\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":reset\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all reset inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "61iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":reset\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "button62": {"id": 62, "searchname": "button", "name": "button", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":button", "desc": "Matches all button elements and input elements of type button.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":button\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":button\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all button inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "62iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":button\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "file63": {"id": 63, "searchname": "file", "name": "file", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":file", "desc": "Matches all input elements of type file.", "longdesc": "", "params": [], "examples": [{"code": "\n    var input = $(\":file\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "htmlCode": "\n    var input = $(\":file\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n", "desc": "Finds all file inputs.", "css": "\n  textarea { height:45px; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>", "exampleId": "63iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var input = $(\":file\").css({background:\"yellow\", border:\"3px red solid\"});\n    $(\"div\").text(\"For this type jQuery found \" + input.length + \".\")\n            .css(\"color\", \"red\");\n    $(\"form\").submit(function () { return false; }); // so it won't submit\n\n  });\n</script>\n<style>\n\n  textarea { height:45px; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"button\" value=\"Input Button\"/>\n    <input type=\"checkbox\" />\n    <input type=\"file\" />\n    <input type=\"hidden\" />\n    <input type=\"image\" />\n    <input type=\"password\" />\n    <input type=\"radio\" />\n    <input type=\"reset\" />\n    <input type=\"submit\" />\n    <input type=\"text\" />\n    <select><option>Option<option/></select>\n    <textarea></textarea>\n    <button>Button</button>\n  </form>\n  <div>\n  </div>\n</body>\n</html>"}]}, "hidden64": {"id": 64, "searchname": "hidden", "name": "hidden", "type": "selector", "category": "Selectors", "subcategory": "Forms", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":hidden", "desc": "Matches all elements that are hidden, or input elements of type \"hidden\".", "longdesc": "", "params": [], "examples": [{"code": "\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n", "htmlCode": "\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n", "desc": "Shows all hidden divs and counts hidden inputs.", "css": "\n  div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }\n  span { display:block; clear:left; color:red; }\n  .starthidden { display:none; }\n  ", "inhead": "", "html": "<span></span>\n  <div></div>\n  <div style=\"display:none;\">Hider!</div>\n  <div></div>\n  <div class=\"starthidden\">Hider!</div>\n  <div></div>\n  <form>\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n  </form>\n  <span>\n  </span>", "exampleId": "64iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    // in some browsers :hidden includes head, title, script, etc... so limit to body\n    $(\"span:first\").text(\"Found \" + $(\":hidden\", document.body).length + \n                         \" hidden elements total.\");\n    $(\"div:hidden\").show(3000);\n    $(\"span:last\").text(\"Found \" + $(\"input:hidden\").length + \" hidden inputs.\");\n\n  });\n</script>\n<style>\n\n  div { width:70px; height:40px; background:#ee77ff; margin:5px; float:left; }\n  span { display:block; clear:left; color:red; }\n  .starthidden { display:none; }\n  \n</style>\n</head>\n<body>\n<span></span>\n  <div></div>\n  <div style=\"display:none;\">Hider!</div>\n  <div></div>\n  <div class=\"starthidden\">Hider!</div>\n  <div></div>\n  <form>\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n    <input type=\"hidden\" />\n  </form>\n  <span>\n  </span>\n</body>\n</html>"}]}, "enabled65": {"id": 65, "searchname": "enabled", "name": "enabled", "type": "selector", "category": "Selectors", "subcategory": "Form Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":enabled", "desc": "Matches all elements that are enabled.", "longdesc": "", "params": [], "examples": [{"code": "$(\"input:enabled\").val(\"this is it\");", "htmlCode": "$(\"input:enabled\").val(\"this is it\");", "desc": "Finds all input elements that are enabled.", "css": "", "inhead": "", "html": "<form>\n    <input name=\"email\" disabled=\"disabled\" />\n    <input name=\"id\" />\n  </form>", "exampleId": "65iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input:enabled\").val(\"this is it\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<form>\n    <input name=\"email\" disabled=\"disabled\" />\n    <input name=\"id\" />\n  </form>\n</body>\n</html>"}]}, "disabled66": {"id": 66, "searchname": "disabled", "name": "disabled", "type": "selector", "category": "Selectors", "subcategory": "Form Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":disabled", "desc": "Matches all elements that are disabled.", "longdesc": "", "params": [], "examples": [{"code": "$(\"input:disabled\").val(\"this is it\");", "htmlCode": "$(\"input:disabled\").val(\"this is it\");", "desc": "Finds all input elements that are disabled.", "css": "", "inhead": "", "html": "<form>\n    <input name=\"email\" disabled=\"disabled\" />\n    <input name=\"id\" />\n  </form>", "exampleId": "66iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"input:disabled\").val(\"this is it\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<form>\n    <input name=\"email\" disabled=\"disabled\" />\n    <input name=\"id\" />\n  </form>\n</body>\n</html>"}]}, "checked67": {"id": 67, "searchname": "checked", "name": "checked", "type": "selector", "category": "Selectors", "subcategory": "Form Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":checked", "desc": "Matches all elements that are checked.", "longdesc": "", "params": [], "examples": [{"code": "\n    function countChecked() {\n      var n = $(\"input:checked\").length;\n      $(\"div\").text(n + (n == 1 ? \" is\" : \" are\") + \" checked!\");\n    }\n    countChecked();\n    $(\":checkbox\").click(countChecked);\n", "htmlCode": "\n    function countChecked() {\n      var n = $(\"input:checked\").length;\n      $(\"div\").text(n + (n == 1 ? \" is\" : \" are\") + \" checked!\");\n    }\n    countChecked();\n    $(\":checkbox\").click(countChecked);\n", "desc": "Finds all input elements that are checked.", "css": "\n  div { color:red; }\n  ", "inhead": "", "html": "<form>\n    <input type=\"checkbox\" name=\"newsletter\" checked=\"checked\" value=\"Hourly\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Daily\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Weekly\" />\n    <input type=\"checkbox\" name=\"newsletter\" checked=\"checked\" value=\"Monthly\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Yearly\" />\n  </form>\n  <div></div>", "exampleId": "67iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function countChecked() {\n      var n = $(\"input:checked\").length;\n      $(\"div\").text(n + (n == 1 ? \" is\" : \" are\") + \" checked!\");\n    }\n    countChecked();\n    $(\":checkbox\").click(countChecked);\n\n  });\n</script>\n<style>\n\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<form>\n    <input type=\"checkbox\" name=\"newsletter\" checked=\"checked\" value=\"Hourly\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Daily\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Weekly\" />\n    <input type=\"checkbox\" name=\"newsletter\" checked=\"checked\" value=\"Monthly\" />\n    <input type=\"checkbox\" name=\"newsletter\" value=\"Yearly\" />\n  </form>\n  <div></div>\n</body>\n</html>"}]}, "selected68": {"id": 68, "searchname": "selected", "name": "selected", "type": "selector", "category": "Selectors", "subcategory": "Form Filters", "return": "Array&lt;Element(s)&gt;", "added": "1.0", "sample": ":selected", "desc": "Matches all elements that are selected.", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .trigger('change');\n", "htmlCode": "\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .trigger('change');\n", "desc": "Attaches a change event to the select that gets the text for each selected option and writes them in the div.  It then triggers the event for the initial text draw.", "css": "\n  div { color:red; }\n  ", "inhead": "", "html": "<select name=\"garden\" multiple=\"multiple\">\n    <option>Flowers</option>\n    <option selected=\"selected\">Shrubs</option>\n    <option>Trees</option>\n    <option selected=\"selected\">Bushes</option>\n    <option>Grass</option>\n    <option>Dirt</option>\n  </select>\n  <div></div>", "exampleId": "68iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .trigger('change');\n\n  });\n</script>\n<style>\n\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<select name=\"garden\" multiple=\"multiple\">\n    <option>Flowers</option>\n    <option selected=\"selected\">Shrubs</option>\n    <option>Trees</option>\n    <option selected=\"selected\">Bushes</option>\n    <option>Grass</option>\n    <option>Dirt</option>\n  </select>\n  <div></div>\n</body>\n</html>"}]}, "attr69": {"id": 69, "searchname": "attr", "name": "attr", "type": "function", "category": "Attributes", "subcategory": "Attr", "return": "Object", "added": "", "sample": "", "desc": "Access a property on the first matched element. This method makes it easy to retrieve a property value from the first matched element. If the element does not have an attribute with such a name, undefined is returned.", "longdesc": "", "params": [{"optional": false, "name": "name", "type": "String", "desc": "The name of the property to access."}], "examples": [{"code": "\n    var title = $(\"em\").attr(\"title\");\n    $(\"div\").text(title);\n", "htmlCode": "\n    var title = $(\"em\").attr(\"title\");\n    $(\"div\").text(title);\n", "desc": "Finds the title attribute of the first &lt;em&gt; in the page.", "css": "\n  em { color:blue; font-weight;bold; }\n  div { color:red; }\n  ", "inhead": "", "html": "<p>\n    Once there was a <em title=\"huge, gigantic\">large</em> dinosaur...\n  </p>\n  The title of the emphasis is:<div></div>", "exampleId": "69iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var title = $(\"em\").attr(\"title\");\n    $(\"div\").text(title);\n\n  });\n</script>\n<style>\n\n  em { color:blue; font-weight;bold; }\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<p>\n    Once there was a <em title=\"huge, gigantic\">large</em> dinosaur...\n  </p>\n  The title of the emphasis is:<div></div>\n</body>\n</html>"}]}, "attr70": {"id": 70, "searchname": "attr", "name": "attr", "type": "function", "category": "Attributes", "subcategory": "Attr", "return": "jQuery", "added": "", "sample": "", "desc": "Set a key/value object as properties to all matched elements.", "longdesc": "<p>This serves as the best way to set a large number of properties on all matched elements. Note that you must use 'className' as key if you want to set the class-Attribute. Or use .addClass( class ) or .removeClass( class ). Keep in mind this recursively calls attr( key, value ) or attr ( key, fn ), so if one of the properties you are passing is a function, the function will be evaluated and not stored as the attribute itself.</p>", "params": [{"optional": false, "name": "properties", "type": "Map", "desc": "Key/value pairs to set as object properties."}], "examples": [{"code": "\n    $(\"img\").attr({ \n          src: \"/images/hat.gif\",\n          title: \"jQuery\",\n          alt: \"jQuery Logo\"\n        });\n    $(\"div\").text($(\"img\").attr(\"alt\"));\n", "htmlCode": "\n    $(\"img\").attr({ \n          src: \"/images/hat.gif\",\n          title: \"jQuery\",\n          alt: \"jQuery Logo\"\n        });\n    $(\"div\").text($(\"img\").attr(\"alt\"));\n", "desc": "Set some attributes for all &lt;img&gt;s in the page.", "css": "\n  img { padding:10px; }\n  div { color:red; font-size:24px; }\n  ", "inhead": "", "html": "<img />\n  <img />\n  <img />\n  <div></div>", "exampleId": "70iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"img\").attr({ \n          src: \"/images/hat.gif\",\n          title: \"jQuery\",\n          alt: \"jQuery Logo\"\n        });\n    $(\"div\").text($(\"img\").attr(\"alt\"));\n\n  });\n</script>\n<style>\n\n  img { padding:10px; }\n  div { color:red; font-size:24px; }\n  \n</style>\n</head>\n<body>\n<img />\n  <img />\n  <img />\n  <div></div>\n</body>\n</html>"}]}, "attr71": {"id": 71, "searchname": "attr", "name": "attr", "type": "function", "category": "Attributes", "subcategory": "Attr", "return": "jQuery", "added": "", "sample": "", "desc": "Set a single property to a value, on all matched elements.", "longdesc": "", "params": [{"optional": false, "name": "key", "type": "String", "desc": "The name of the property to set."}, {"optional": false, "name": "value", "type": "Object", "desc": "The value to set the property to."}], "examples": [{"code": "$(\"button:gt(1)\").attr(\"disabled\",\"disabled\");", "htmlCode": "$(\"button:gt(1)\").attr(\"disabled\",\"disabled\");", "desc": "Disables buttons greater than the 1st button.", "css": "\n  button { margin:10px; }\n  ", "inhead": "", "html": "<button>0th Button</button>\n  <button>1st Button</button>\n  <button>2nd Button</button>", "exampleId": "71iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"button:gt(1)\").attr(\"disabled\",\"disabled\");\n  });\n</script>\n<style>\n\n  button { margin:10px; }\n  \n</style>\n</head>\n<body>\n<button>0th Button</button>\n  <button>1st Button</button>\n  <button>2nd Button</button>\n</body>\n</html>"}]}, "attr72": {"id": 72, "searchname": "attr", "name": "attr", "type": "function", "category": "Attributes", "subcategory": "Attr", "return": "jQuery", "added": "", "sample": "", "desc": "Set a single property to a computed value, on all matched elements.", "longdesc": "<p>Instead of supplying a string value as described  <a href='#keyvalue'>above</a>, a function is provided that computes the value.</p>", "params": [{"optional": false, "name": "key", "type": "String", "desc": "The name of the property to set."}, {"optional": false, "name": "fn", "type": "Function", "desc": "A function returning the value to set. Scope: Current element, argument: Index of current element\n<pre>function callback(indexArray) {\n  // indexArray == position in the jQuery object\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"div\").attr(\"id\", function (arr) {\n          return \"div-id\" + arr;\n        })\n        .each(function () {\n          $(\"span\", this).html(\"(ID = '<b>\" + this.id + \"</b>')\");\n        });\n", "htmlCode": "\n    $(\"div\").attr(\"id\", function (arr) {\n          return \"div-id\" + arr;\n        })\n        .each(function () {\n          $(\"span\", this).html(\"(ID = '&lt;b&gt;\" + this.id + \"&lt;/b&gt;')\");\n        });\n", "desc": "Sets id for divs based on the position in the page.", "css": "\n  div { color:blue; }\n  span { color:red; }\n  b { font-weight:bolder; }\n  ", "inhead": "", "html": "<div>Zero-th <span></span></div>\n  <div>First <span></span></div>\n  <div>Second <span></span></div>", "exampleId": "72iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").attr(\"id\", function (arr) {\n          return \"div-id\" + arr;\n        })\n        .each(function () {\n          $(\"span\", this).html(\"(ID = '<b>\" + this.id + \"</b>')\");\n        });\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  span { color:red; }\n  b { font-weight:bolder; }\n  \n</style>\n</head>\n<body>\n<div>Zero-th <span></span></div>\n  <div>First <span></span></div>\n  <div>Second <span></span></div>\n</body>\n</html>"}, {"code": "\n    $(\"img\").attr(\"src\", function() { \n          return \"/images/\" + this.title; \n        });\n", "htmlCode": "\n    $(\"img\").attr(\"src\", function() { \n          return \"/images/\" + this.title; \n        });\n", "desc": "Sets src attribute from title attribute on the image.", "css": "", "inhead": "", "html": "<img title=\"hat.gif\"/>\n  <img title=\"hat-old.gif\"/>\n  <img title=\"hat2-old.gif\"/>", "exampleId": "72iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"img\").attr(\"src\", function() { \n          return \"/images/\" + this.title; \n        });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<img title=\"hat.gif\"/>\n  <img title=\"hat-old.gif\"/>\n  <img title=\"hat2-old.gif\"/>\n</body>\n</html>"}]}, "removeattr73": {"id": 73, "searchname": "removeattr", "name": "removeAttr", "type": "function", "category": "Attributes", "subcategory": "Attr", "return": "jQuery", "added": "", "sample": "", "desc": "Remove an attribute from each of the matched elements.", "longdesc": "", "params": [{"optional": false, "name": "name", "type": "String", "desc": "The name of the property to remove."}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(this).next().removeAttr(\"disabled\")\n             .focus()\n             .val(\"editable now\");\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(this).next().removeAttr(\"disabled\")\n             .focus()\n             .val(\"editable now\");\n    });\n", "desc": "Clicking the button enables the input next to it.", "css": "", "inhead": "", "html": "<button>Enable</button>\n  <input type=\"text\" disabled=\"disabled\" value=\"can't edit this\" />", "exampleId": "73iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(this).next().removeAttr(\"disabled\")\n             .focus()\n             .val(\"editable now\");\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<button>Enable</button>\n  <input type=\"text\" disabled=\"disabled\" value=\"can't edit this\" />\n</body>\n</html>"}]}, "addclass74": {"id": 74, "searchname": "addclass", "name": "addClass", "type": "function", "category": "Attributes", "subcategory": "Class", "return": "jQuery", "added": "", "sample": "", "desc": "Adds the specified class(es) to each of the set of matched elements.", "longdesc": "", "params": [{"optional": false, "name": "class", "type": "String", "desc": "One or more CSS classes to add to the elements, these are separated by spaces."}], "examples": [{"code": "$(\"p:last\").addClass(\"selected\");", "htmlCode": "$(\"p:last\").addClass(\"selected\");", "desc": "Adds the class 'selected' to the matched elements.", "css": "\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>and</p>\n  <p>Goodbye</p>", "exampleId": "74iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p:last\").addClass(\"selected\");\n  });\n</script>\n<style>\n\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>and</p>\n  <p>Goodbye</p>\n</body>\n</html>"}, {"code": "$(\"p:last\").addClass(\"selected highlight\");", "htmlCode": "$(\"p:last\").addClass(\"selected highlight\");", "desc": "Adds the classes 'selected' and 'highlight' to the matched elements.", "css": "\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>and</p>\n  <p>Goodbye</p>", "exampleId": "74iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p:last\").addClass(\"selected highlight\");\n  });\n</script>\n<style>\n\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>and</p>\n  <p>Goodbye</p>\n</body>\n</html>"}]}, "hasclass75": {"id": 75, "searchname": "hasclass", "name": "hasClass", "type": "function", "category": "Attributes", "subcategory": "Class", "return": "Boolean", "added": "", "sample": "", "desc": "Returns true if the specified class is present on at least one of the set of matched elements.", "longdesc": "", "params": [{"optional": false, "name": "class", "type": "String", "desc": "One CSS class name to be checked for."}], "examples": [{"code": "$(\"div#result1\").append($(\"p:first\").hasClass(\"selected\").toString());\n$(\"div#result2\").append($(\"p:last\").hasClass(\"selected\").toString());\n$(\"div#result3\").append($(\"p\").hasClass(\"selected\").toString());", "htmlCode": "$(\"div#result1\").append($(\"p:first\").hasClass(\"selected\").toString());\n$(\"div#result2\").append($(\"p:last\").hasClass(\"selected\").toString());\n$(\"div#result3\").append($(\"p\").hasClass(\"selected\").toString());", "desc": "Looks for the class 'selected' on the matched elements.", "css": "\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p class=\"selected\">Goodbye</p>\n  <div id=\"result1\">First paragraph has selected class: </div>\n  <div id=\"result2\">Last paragraph has selected class: </div>\n  <div id=\"result3\">Some paragraph has selected class: </div>", "exampleId": "75iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div#result1\").append($(\"p:first\").hasClass(\"selected\").toString());\n$(\"div#result2\").append($(\"p:last\").hasClass(\"selected\").toString());\n$(\"div#result3\").append($(\"p\").hasClass(\"selected\").toString());\n  });\n</script>\n<style>\n\n  p { margin: 8px; font-size:16px; }\n  .selected { color:red; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p class=\"selected\">Goodbye</p>\n  <div id=\"result1\">First paragraph has selected class: </div>\n  <div id=\"result2\">Last paragraph has selected class: </div>\n  <div id=\"result3\">Some paragraph has selected class: </div>\n</body>\n</html>"}]}, "removeclass76": {"id": 76, "searchname": "removeclass", "name": "removeClass", "type": "function", "category": "Attributes", "subcategory": "Class", "return": "jQuery", "added": "", "sample": "", "desc": "Removes all or the specified class(es) from the set of matched elements.", "longdesc": "", "params": [{"optional": true, "name": "class", "type": "String", "desc": "One or more CSS classes to remove from the elements, these are separated by spaces."}], "examples": [{"code": "$(\"p:even\").removeClass(\"blue\");", "htmlCode": "$(\"p:even\").removeClass(\"blue\");", "desc": "Remove the class 'blue' from the matched elements.", "css": "\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>", "exampleId": "76iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p:even\").removeClass(\"blue\");\n  });\n</script>\n<style>\n\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>\n</body>\n</html>"}, {"code": "$(\"p:odd\").removeClass(\"blue under\");", "htmlCode": "$(\"p:odd\").removeClass(\"blue under\");", "desc": "Remove the class 'blue' and 'under' from the matched elements.", "css": "\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>", "exampleId": "76iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p:odd\").removeClass(\"blue under\");\n  });\n</script>\n<style>\n\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>\n</body>\n</html>"}, {"code": "$(\"p:eq(1)\").removeClass();", "htmlCode": "$(\"p:eq(1)\").removeClass();", "desc": "Remove all the classes from the matched elements.", "css": "\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>", "exampleId": "76iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p:eq(1)\").removeClass();\n  });\n</script>\n<style>\n\n  p { margin: 4px; font-size:16px; font-weight:bolder; }\n  .blue { color:blue; }\n  .under { text-decoration:underline; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p class=\"blue under\">Hello</p>\n  <p class=\"blue under highlight\">and</p>\n  <p class=\"blue under\">then</p>\n  <p class=\"blue under\">Goodbye</p>\n</body>\n</html>"}]}, "toggleclass77": {"id": 77, "searchname": "toggleclass", "name": "toggleClass", "type": "function", "category": "Attributes", "subcategory": "Class", "return": "jQuery", "added": "", "sample": "", "desc": "Adds the specified class if it is not present, removes the specified class if it is present.", "longdesc": "", "params": [{"optional": false, "name": "class", "type": "String", "desc": "A CSS class to toggle on the elements."}], "examples": [{"code": "\n    $(\"p\").click(function () {\n      $(this).toggleClass(\"highlight\");\n    });\n", "htmlCode": "\n    $(\"p\").click(function () {\n      $(this).toggleClass(\"highlight\");\n    });\n", "desc": "Toggle the class 'highlight' when a paragraph is clicked.", "css": "\n  p { margin: 4px; font-size:16px; font-weight:bolder; \n      cursor:pointer; }\n  .blue { color:blue; }\n  .highlight { background:yellow; }\n  ", "inhead": "", "html": "<p class=\"blue\">Click to toggle</p>\n  <p class=\"blue highlight\">highlight</p>\n  <p class=\"blue\">on these</p>\n  <p class=\"blue\">paragraphs</p>", "exampleId": "77iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () {\n      $(this).toggleClass(\"highlight\");\n    });\n\n  });\n</script>\n<style>\n\n  p { margin: 4px; font-size:16px; font-weight:bolder; \n      cursor:pointer; }\n  .blue { color:blue; }\n  .highlight { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p class=\"blue\">Click to toggle</p>\n  <p class=\"blue highlight\">highlight</p>\n  <p class=\"blue\">on these</p>\n  <p class=\"blue\">paragraphs</p>\n</body>\n</html>"}]}, "html78": {"id": 78, "searchname": "html", "name": "html", "type": "function", "category": "Attributes", "subcategory": "HTML", "return": "String", "added": "", "sample": "", "desc": "Get the html contents (innerHTML) of the first matched element. This property is not available on XML documents (although it will work for XHTML documents).", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n", "htmlCode": "\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n", "desc": "Click a paragraph to convert it from html to text.", "css": "\n  p { margin:8px; font-size:20px; color:blue; \n      cursor:pointer; }\n  b { text-decoration:underline; }\n  button { cursor:pointer; }\n  ", "inhead": "", "html": "<p>\n    <b>Click</b> to change the <span id=\"tag\">html</span>\n  </p>\n  <p>\n    to a <span id=\"text\">text</span> node.\n  </p>\n  <p>\n    This <button name=\"nada\">button</button> does nothing.\n  </p>", "exampleId": "78iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n\n  });\n</script>\n<style>\n\n  p { margin:8px; font-size:20px; color:blue; \n      cursor:pointer; }\n  b { text-decoration:underline; }\n  button { cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<p>\n    <b>Click</b> to change the <span id=\"tag\">html</span>\n  </p>\n  <p>\n    to a <span id=\"text\">text</span> node.\n  </p>\n  <p>\n    This <button name=\"nada\">button</button> does nothing.\n  </p>\n</body>\n</html>"}]}, "html79": {"id": 79, "searchname": "html", "name": "html", "type": "function", "category": "Attributes", "subcategory": "HTML", "return": "jQuery", "added": "", "sample": "", "desc": "Set the html contents of every matched element. This property is not available on XML documents (although it will work for XHTML documents).", "longdesc": "", "params": [{"optional": false, "name": "val", "type": "String", "desc": "Set the html contents to the specified value."}], "examples": [{"code": "$(\"div\").html(\"<span class='red'>Hello <b>Again</b></span>\");", "htmlCode": "$(\"div\").html(\"&lt;span class='red'&gt;Hello &lt;b&gt;Again&lt;/b&gt;&lt;/span&gt;\");", "desc": "Add some html to each div.", "css": "\n  .red { color:red; }\n  ", "inhead": "", "html": "<span>Hello</span>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "79iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div\").html(\"<span class='red'>Hello <b>Again</b></span>\");\n  });\n</script>\n<style>\n\n  .red { color:red; }\n  \n</style>\n</head>\n<body>\n<span>Hello</span>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    $(\"div\").html(\"<b>Wow!</b> Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n", "htmlCode": "\n    $(\"div\").html(\"&lt;b&gt;Wow!&lt;/b&gt; Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n", "desc": "Add some html to each div then immediately do further manipulations to the inserted html.", "css": "\n  div { color:blue; font-size:18px; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>", "exampleId": "79iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").html(\"<b>Wow!</b> Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n\n  });\n</script>\n<style>\n\n  div { color:blue; font-size:18px; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "text80": {"id": 80, "searchname": "text", "name": "text", "type": "function", "category": "Attributes", "subcategory": "Text", "return": "String", "added": "", "sample": "", "desc": "Get the combined text contents of all matched elements.", "longdesc": "<p>The result is a string that contains the combined text contents of all matched elements. This method works on both HTML and XML documents.</p>", "params": [], "examples": [{"code": "\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n", "htmlCode": "\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n", "desc": "Find the text in the first paragraph (stripping out the html), then set the html of the last paragraph to show it is just text (the red bold is gone).", "css": "\n  p { color:blue; margin:8px; }\n  b { color:red; }\n  ", "inhead": "", "html": "<p><b>Test</b> Paragraph.</p>\n  <p></p>", "exampleId": "80iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n\n  });\n</script>\n<style>\n\n  p { color:blue; margin:8px; }\n  b { color:red; }\n  \n</style>\n</head>\n<body>\n<p><b>Test</b> Paragraph.</p>\n  <p></p>\n</body>\n</html>"}]}, "text81": {"id": 81, "searchname": "text", "name": "text", "type": "function", "category": "Attributes", "subcategory": "Text", "return": "jQuery", "added": "", "sample": "", "desc": "Set the text contents of all matched elements.", "longdesc": "<p>Similar to html(), but escapes HTML (replace \"<\" and \">\" with their HTML entities).</p>", "params": [{"optional": false, "name": "val", "type": "String", "desc": "The text value to set the contents of the element to."}], "examples": [{"code": "$(\"p\").text(\"<b>Some</b> new text.\");", "htmlCode": "$(\"p\").text(\"&lt;b&gt;Some&lt;/b&gt; new text.\");", "desc": "Add text to the paragraph (notice the bold tag is escaped).", "css": "\n  p { color:blue; margin:8px; }\n  ", "inhead": "", "html": "<p>Test Paragraph.</p>", "exampleId": "81iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").text(\"<b>Some</b> new text.\");\n  });\n</script>\n<style>\n\n  p { color:blue; margin:8px; }\n  \n</style>\n</head>\n<body>\n<p>Test Paragraph.</p>\n</body>\n</html>"}]}, "val82": {"id": 82, "searchname": "val", "name": "val", "type": "function", "category": "Attributes", "subcategory": "Value", "return": "String, Array", "added": "1.0", "sample": "", "desc": "Get the content of the value attribute of the first matched element.", "longdesc": "<p>In jQuery 1.2, a value is now returned for all elements, including selects. For multiple selects an array of values is returned.</p><p>For older versions of jQuery use the <a href=\"http://www.malsup.com/jquery/form/#fields\">http://www.malsup.com/jquery/form/#fields</a>.</p><p>For selects and checkboxes, see the <a href='Selectors/selected'>:selected</a> and <a href='Selectors/checked'>:checked</a> selectors.</p>", "params": [], "examples": [{"code": "\n    function displayVals() {\n      var singleValues = $(\"#single\").val();\n      var multipleValues = $(\"#multiple\").val() || [];\n      $(\"p\").html(\"<b>Single:</b> \" + \n                  singleValues +\n                  \" <b>Multiple:</b> \" + \n                  multipleValues.join(\", \"));\n    }\n\n    $(\"select\").change(displayVals);\n    displayVals();\n", "htmlCode": "\n    function displayVals() {\n      var singleValues = $(\"#single\").val();\n      var multipleValues = $(\"#multiple\").val() || [];\n      $(\"p\").html(\"&lt;b&gt;Single:&lt;/b&gt; \" + \n                  singleValues +\n                  \" &lt;b&gt;Multiple:&lt;/b&gt; \" + \n                  multipleValues.join(\", \"));\n    }\n\n    $(\"select\").change(displayVals);\n    displayVals();\n", "desc": "Get the single value from a single select and an array of values from a multiple select and display their values.", "css": "\n  p { color:red; margin:4px; }\n  b { color:blue; }\n  ", "inhead": "", "html": "<p></p>\n  <select id=\"single\">\n    <option>Single</option>\n    <option>Single2</option>\n  </select>\n  <select id=\"multiple\" multiple=\"multiple\">\n    <option selected=\"selected\">Multiple</option>\n    <option>Multiple2</option>\n    <option selected=\"selected\">Multiple3</option>\n  </select>", "exampleId": "82iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function displayVals() {\n      var singleValues = $(\"#single\").val();\n      var multipleValues = $(\"#multiple\").val() || [];\n      $(\"p\").html(\"<b>Single:</b> \" + \n                  singleValues +\n                  \" <b>Multiple:</b> \" + \n                  multipleValues.join(\", \"));\n    }\n\n    $(\"select\").change(displayVals);\n    displayVals();\n\n  });\n</script>\n<style>\n\n  p { color:red; margin:4px; }\n  b { color:blue; }\n  \n</style>\n</head>\n<body>\n<p></p>\n  <select id=\"single\">\n    <option>Single</option>\n    <option>Single2</option>\n  </select>\n  <select id=\"multiple\" multiple=\"multiple\">\n    <option selected=\"selected\">Multiple</option>\n    <option>Multiple2</option>\n    <option selected=\"selected\">Multiple3</option>\n  </select>\n</body>\n</html>"}, {"code": "\n    $(\"input\").keyup(function () {\n      var value = $(this).val();\n      $(\"p\").text(value);\n    }).keyup();\n", "htmlCode": "\n    $(\"input\").keyup(function () {\n      var value = $(this).val();\n      $(\"p\").text(value);\n    }).keyup();\n", "desc": "Find the value of an input box.", "css": "\n  p { color:blue; margin:8px; }\n  ", "inhead": "", "html": "<input type=\"text\" value=\"some text\"/>\n  <p></p>", "exampleId": "82iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"input\").keyup(function () {\n      var value = $(this).val();\n      $(\"p\").text(value);\n    }).keyup();\n\n  });\n</script>\n<style>\n\n  p { color:blue; margin:8px; }\n  \n</style>\n</head>\n<body>\n<input type=\"text\" value=\"some text\"/>\n  <p></p>\n</body>\n</html>"}]}, "val83": {"id": 83, "searchname": "val", "name": "val", "type": "function", "category": "Attributes", "subcategory": "Value", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Set the value attribute of every matched element.", "longdesc": "<p>In jQuery 1.2, this is also able to set the value of select elements, but selecting the appropriate options.</p>", "params": [{"optional": false, "name": "val", "type": "String", "desc": "The value to set on the matched element."}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      var text = $(this).text();\n      $(\"input\").val(text);\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      var text = $(this).text();\n      $(\"input\").val(text);\n    });\n", "desc": "Set the value of an input box.", "css": "\n  button { margin:4px; cursor:pointer; }\n  input { margin:4px; color:blue; }\n  ", "inhead": "", "html": "<div>\n    <button>Feed</button>\n    <button>the</button>\n    <button>Input</button>\n  </div>\n  <input type=\"text\" value=\"click a button\" />", "exampleId": "83iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      var text = $(this).text();\n      $(\"input\").val(text);\n    });\n\n  });\n</script>\n<style>\n\n  button { margin:4px; cursor:pointer; }\n  input { margin:4px; color:blue; }\n  \n</style>\n</head>\n<body>\n<div>\n    <button>Feed</button>\n    <button>the</button>\n    <button>Input</button>\n  </div>\n  <input type=\"text\" value=\"click a button\" />\n</body>\n</html>"}]}, "val84": {"id": 84, "searchname": "val", "name": "val", "type": "function", "category": "Attributes", "subcategory": "Value", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Checks, or selects, all the radio buttons, checkboxes, and select options that match the set of values.", "longdesc": "", "params": [{"optional": false, "name": "val", "type": "Array&lt;String&gt;", "desc": "The set of values to check/select."}], "examples": [{"code": "\n    $(\"#single\").val(\"Single2\");\n    $(\"#multiple\").val([\"Multiple2\", \"Multiple3\"]);\n    $(\"input\").val([\"check1\",\"check2\", \"radio1\" ]);\n", "htmlCode": "\n    $(\"#single\").val(\"Single2\");\n    $(\"#multiple\").val([\"Multiple2\", \"Multiple3\"]);\n    $(\"input\").val([\"check1\",\"check2\", \"radio1\" ]);\n", "desc": "Set a single select and a multiple select .", "css": "\n  body { color:blue; }\n  ", "inhead": "", "html": "<select id=\"single\">\n    <option>Single</option>\n    <option>Single2</option>\n  </select>\n  <select id=\"multiple\" multiple=\"multiple\">\n    <option selected=\"selected\">Multiple</option>\n    <option>Multiple2</option>\n    <option selected=\"selected\">Multiple3</option>\n  </select><br/>\n  <input type=\"checkbox\" name=\"checkboxname\" value=\"check1\"/> check1\n  <input type=\"checkbox\" name=\"checkboxname\" value=\"check2\"/> check2\n  <input type=\"radio\"  name=\"r\" value=\"radio1\"/> radio1\n  <input type=\"radio\"  name=\"r\" value=\"radio2\"/> radio2", "exampleId": "84iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#single\").val(\"Single2\");\n    $(\"#multiple\").val([\"Multiple2\", \"Multiple3\"]);\n    $(\"input\").val([\"check1\",\"check2\", \"radio1\" ]);\n\n  });\n</script>\n<style>\n\n  body { color:blue; }\n  \n</style>\n</head>\n<body>\n<select id=\"single\">\n    <option>Single</option>\n    <option>Single2</option>\n  </select>\n  <select id=\"multiple\" multiple=\"multiple\">\n    <option selected=\"selected\">Multiple</option>\n    <option>Multiple2</option>\n    <option selected=\"selected\">Multiple3</option>\n  </select><br/>\n  <input type=\"checkbox\" name=\"checkboxname\" value=\"check1\"/> check1\n  <input type=\"checkbox\" name=\"checkboxname\" value=\"check2\"/> check2\n  <input type=\"radio\"  name=\"r\" value=\"radio1\"/> radio1\n  <input type=\"radio\"  name=\"r\" value=\"radio2\"/> radio2\n</body>\n</html>"}]}, "eq85": {"id": 85, "searchname": "eq", "name": "eq", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.1.2", "sample": "", "desc": "Reduce the set of matched elements to a single element. ", "longdesc": "<p>The position of the element in the set of matched elements starts at 0 and goes to length - 1.</p>", "params": [{"optional": false, "name": "index", "type": "Integer", "desc": "The index of the element in the jQuery object."}], "examples": [{"code": "\n    $(\"div\").eq(2).addClass(\"blue\");\n", "htmlCode": "\n    $(\"div\").eq(2).addClass(\"blue\");\n", "desc": "Turn the div with index 2 blue by adding an appropriate class.", "css": "\n  div { width:60px; height:60px; margin:10px; float:left;\n        border:2px solid blue; }\n  .blue { background:blue; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "85iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").eq(2).addClass(\"blue\");\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:10px; float:left;\n        border:2px solid blue; }\n  .blue { background:blue; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "hasclass86": {"id": 86, "searchname": "hasclass", "name": "hasClass", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "Boolean", "added": "1.2", "sample": "", "desc": "Checks the current selection against a class and returns true, if at least one element of the selection has the given class.", "longdesc": "<p>This is an alternative to is(\".\" + class).</p>", "params": [{"optional": false, "name": "class", "type": "String", "desc": "The class to match."}], "examples": [{"code": "\n    $(\"div\").click(function(){\n      if ( $(this).hasClass(\"protected\") )\n        $(this).animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: 0 }, 75);\n    });\n", "htmlCode": "\n    $(\"div\").click(function(){\n      if ( $(this).hasClass(\"protected\") )\n        $(this).animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: 0 }, 75);\n    });\n", "desc": "Check to see if an element has a specific class, and if so, perform an action.", "css": "\n  div { width: 80px; height: 80px; background: #abc; \n        position: relative; border: 2px solid black; \n        margin: 20px 0px; float: left; left:0 }\n  div.protected { border-color: red; }\n  span { display:block; float:left; width:20px; \n         height:20px; }\n  ", "inhead": "", "html": "<span></span><div class=\"protected\"></div>\n  <span></span><div></div>\n  <span></span><div></div>\n  <span></span><div class=\"protected\"></div>", "exampleId": "86iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").click(function(){\n      if ( $(this).hasClass(\"protected\") )\n        $(this).animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: -10 }, 75)\n               .animate({ left: 10 }, 75)\n               .animate({ left: 0 }, 75);\n    });\n\n  });\n</script>\n<style>\n\n  div { width: 80px; height: 80px; background: #abc; \n        position: relative; border: 2px solid black; \n        margin: 20px 0px; float: left; left:0 }\n  div.protected { border-color: red; }\n  span { display:block; float:left; width:20px; \n         height:20px; }\n  \n</style>\n</head>\n<body>\n<span></span><div class=\"protected\"></div>\n  <span></span><div></div>\n  <span></span><div></div>\n  <span></span><div class=\"protected\"></div>\n</body>\n</html>"}]}, "filter87": {"id": 87, "searchname": "filter", "name": "filter", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Removes all elements from the set of matched elements that do not match the specified expression(s). ", "longdesc": "<p>This method is used to narrow down the results of a search.</p><p>Provide a comma-separated list of expressions to apply multiple filters at once.</p>", "params": [{"optional": false, "name": "expr", "type": "Expression", "desc": "An expression to pass into the filter"}], "examples": [{"code": "\n    $(\"div\").css(\"background\", \"#c8ebcc\")\n            .filter(\".middle\")\n            .css(\"border-color\", \"red\");\n", "htmlCode": "\n    $(\"div\").css(\"background\", \"#c8ebcc\")\n            .filter(\".middle\")\n            .css(\"border-color\", \"red\");\n", "desc": "Change the color of all divs then put a border around only some of them.", "css": "\n  div { width:60px; height:60px; margin:5px; float:left; \n        border:2px white solid;}\n  ", "inhead": "", "html": "<div></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div></div>", "exampleId": "87iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").css(\"background\", \"#c8ebcc\")\n            .filter(\".middle\")\n            .css(\"border-color\", \"red\");\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:5px; float:left; \n        border:2px white solid;}\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div class=\"middle\"></div>\n  <div></div>\n</body>\n</html>"}, {"code": "$(\"p\").filter(\".selected\")", "htmlCode": "$(\"p\").filter(\".selected\")", "desc": "Selects all paragraphs and removes those without a class \"selected\".", "css": "", "inhead": "", "html": "", "exampleId": "87iframeExample1", "runCode": ""}, {"code": "$(\"p\").filter(\".selected, :first\")", "htmlCode": "$(\"p\").filter(\".selected, :first\")", "desc": "Selects all paragraphs and removes those that aren't of class \"selected\" or the first one.", "css": "", "inhead": "", "html": "", "exampleId": "87iframeExample2", "runCode": ""}]}, "filter88": {"id": 88, "searchname": "filter", "name": "filter", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Removes all elements from the set of matched elements that does not match the specified function. ", "longdesc": "<p>The function is called with a context equal to the current element (just like <a href='Core/each'>$.each</a>). If the function returns false, then the element is removed - anything else and the element is kept.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to pass into the filter\n<pre>function callback(indexInJQueryObject) {\n  var keepItBoolean = true;\n\n  this; // dom element\n\n  return keepItBoolean;\n}\n</pre>"}], "examples": [{"code": "\n    $(\"div\").css(\"background\", \"#b4b0da\")\n            .filter(function (index) {\n                  return index == 1 || $(this).attr(\"id\") == \"fourth\";\n                })\n            .css(\"border\", \"3px double red\");\n", "htmlCode": "\n    $(\"div\").css(\"background\", \"#b4b0da\")\n            .filter(function (index) {\n                  return index == 1 || $(this).attr(\"id\") == \"fourth\";\n                })\n            .css(\"border\", \"3px double red\");\n", "desc": "Change the color of all divs then put a border two specific ones.", "css": "\n  div { width:60px; height:60px; margin:5px; float:left; \n        border:3px white solid; }\n  ", "inhead": "", "html": "<div id=\"first\"></div>\n  <div id=\"second\"></div>\n  <div id=\"third\"></div>\n  <div id=\"fourth\"></div>\n  <div id=\"fifth\"></div>\n  <div id=\"sixth\"></div>", "exampleId": "88iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").css(\"background\", \"#b4b0da\")\n            .filter(function (index) {\n                  return index == 1 || $(this).attr(\"id\") == \"fourth\";\n                })\n            .css(\"border\", \"3px double red\");\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:5px; float:left; \n        border:3px white solid; }\n  \n</style>\n</head>\n<body>\n<div id=\"first\"></div>\n  <div id=\"second\"></div>\n  <div id=\"third\"></div>\n  <div id=\"fourth\"></div>\n  <div id=\"fifth\"></div>\n  <div id=\"sixth\"></div>\n</body>\n</html>"}, {"code": " $(\"p\").filter(function(index) {\n   return $(\"ol\", this).length == 0;\n });", "htmlCode": " $(\"p\").filter(function(index) {\n   return $(\"ol\", this).length == 0;\n });", "desc": "Remove all elements that have a descendant ol element", "css": "", "inhead": "", "html": "", "exampleId": "88iframeExample1", "runCode": ""}]}, "is89": {"id": 89, "searchname": "is", "name": "is", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "Boolean", "added": "1.0", "sample": "", "desc": "Checks the current selection against an expression and returns true, if at least one element of the selection fits the given expression.", "longdesc": "<p>If no element fits, or the expression is not valid, then the response will be 'false'. Note that only simple expressions are supported. Complex expressions, such as those containing hierarchy selectors (such as +, ~, and >) will always return 'true'.</p><p><a href='Traversing/filter'>filter</a> is used internally, therefore all rules that apply there apply here, as well. </p>", "params": [{"optional": false, "name": "expr", "type": "String", "desc": "The expression with which to filter"}], "examples": [{"code": "\n    $(\"div\").one('click', function () {\n      if ($(this).is(\":first-child\")) {\n        $(\"p\").text(\"It's the first div.\");\n      } else if ($(this).is(\".blue,.red\")) {\n        $(\"p\").text(\"It's a blue or red div.\");\n      } else if ($(this).is(\":contains('Peter')\")) {\n        $(\"p\").text(\"It's Peter!\");\n      } else {\n        $(\"p\").html(\"It's nothing <em>special</em>.\");\n      }\n      $(\"p\").hide().slideDown(\"slow\");\n      $(this).css({\"border-style\": \"inset\", cursor:\"default\"});\n    });\n", "htmlCode": "\n    $(\"div\").one('click', function () {\n      if ($(this).is(\":first-child\")) {\n        $(\"p\").text(\"It's the first div.\");\n      } else if ($(this).is(\".blue,.red\")) {\n        $(\"p\").text(\"It's a blue or red div.\");\n      } else if ($(this).is(\":contains('Peter')\")) {\n        $(\"p\").text(\"It's Peter!\");\n      } else {\n        $(\"p\").html(\"It's nothing &lt;em&gt;special&lt;/em&gt;.\");\n      }\n      $(\"p\").hide().slideDown(\"slow\");\n      $(this).css({\"border-style\": \"inset\", cursor:\"default\"});\n    });\n", "desc": "Shows a few ways is() can be used inside an event handler.", "css": "\n  div { width:60px; height:60px; margin:5px; float:left;\n        border:4px outset; background:green; text-align:center; \n        font-weight:bolder; cursor:pointer; }\n  .blue { background:blue; }\n  .red { background:red; }\n  span { color:white; font-size:16px; }\n  p { color:red; font-weight:bolder; background:yellow; \n      margin:3px; clear:left; display:none; }\n  ", "inhead": "", "html": "<div></div>\n  <div class=\"blue\"></div>\n  <div></div>\n  <div class=\"red\"></div>\n  <div><br/><span>Peter</span></div>\n  <div class=\"blue\"></div>\n  <p>&nbsp;</p>", "exampleId": "89iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").one('click', function () {\n      if ($(this).is(\":first-child\")) {\n        $(\"p\").text(\"It's the first div.\");\n      } else if ($(this).is(\".blue,.red\")) {\n        $(\"p\").text(\"It's a blue or red div.\");\n      } else if ($(this).is(\":contains('Peter')\")) {\n        $(\"p\").text(\"It's Peter!\");\n      } else {\n        $(\"p\").html(\"It's nothing <em>special</em>.\");\n      }\n      $(\"p\").hide().slideDown(\"slow\");\n      $(this).css({\"border-style\": \"inset\", cursor:\"default\"});\n    });\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:5px; float:left;\n        border:4px outset; background:green; text-align:center; \n        font-weight:bolder; cursor:pointer; }\n  .blue { background:blue; }\n  .red { background:red; }\n  span { color:white; font-size:16px; }\n  p { color:red; font-weight:bolder; background:yellow; \n      margin:3px; clear:left; display:none; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div class=\"blue\"></div>\n  <div></div>\n  <div class=\"red\"></div>\n  <div><br/><span>Peter</span></div>\n  <div class=\"blue\"></div>\n  <p>&nbsp;</p>\n</body>\n</html>"}, {"code": "\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n", "htmlCode": "\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n", "desc": "Returns true, because the parent of the input is a form element", "css": "div { color:red; }", "inhead": "", "html": "<form><input type=\"checkbox\" /></form>\n  <div></div>", "exampleId": "89iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n\n  });\n</script>\n<style>\ndiv { color:red; }\n</style>\n</head>\n<body>\n<form><input type=\"checkbox\" /></form>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n", "htmlCode": "\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n", "desc": "Returns false, because the parent of the input is a p element", "css": "div { color:red; }", "inhead": "", "html": "<form><p><input type=\"checkbox\" /></p></form>\n  <div></div>", "exampleId": "89iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var isFormParent = $(\"input[@type='checkbox']\").parent().is(\"form\")\n    $(\"div\").text(\"isFormParent = \" + isFormParent);\n\n  });\n</script>\n<style>\ndiv { color:red; }\n</style>\n</head>\n<body>\n<form><p><input type=\"checkbox\" /></p></form>\n  <div></div>\n</body>\n</html>"}]}, "map90": {"id": 90, "searchname": "map", "name": "map", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Translate a set of elements in the jQuery object into another set of values in an array (which may, or may not, be elements).", "longdesc": "<p>You could use this to build lists of values, attributes, css values - or even perform special, custom, selector transformations.</p><p>This is provided as a convenience method for using <a href='Utilities/jQuery.map'>$.map()</a>.</p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute on each element in the set.\n<pre>function callback(index, domElement) {\n  var replacement;\n\n  this; // also dom element\n\n  // replacement == null : delete spot\n  // replacement == array : insert the elements of the array\n  // else replace the spot with replacement\n  return replacement;\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").append( $(\"input\").map(function(){\n      return $(this).val();\n    }).get().join(\", \") );\n", "htmlCode": "\n    $(\"p\").append( $(\"input\").map(function(){\n      return $(this).val();\n    }).get().join(\", \") );\n", "desc": "Build a list of all the values within a form.", "css": "\n  p { color:red; }\n  ", "inhead": "", "html": "<p><b>Values: </b></p>\n  <form>\n    <input type=\"text\" name=\"name\" value=\"John\"/>\n    <input type=\"text\" name=\"password\" value=\"password\"/>\n    <input type=\"text\" name=\"url\" value=\"http://ejohn.org/\"/>\n  </form>", "exampleId": "90iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").append( $(\"input\").map(function(){\n      return $(this).val();\n    }).get().join(\", \") );\n\n  });\n</script>\n<style>\n\n  p { color:red; }\n  \n</style>\n</head>\n<body>\n<p><b>Values: </b></p>\n  <form>\n    <input type=\"text\" name=\"name\" value=\"John\"/>\n    <input type=\"text\" name=\"password\" value=\"password\"/>\n    <input type=\"text\" name=\"url\" value=\"http://ejohn.org/\"/>\n  </form>\n</body>\n</html>"}, {"code": "\n    var mappedItems = $(\"li\").map(function (index) {\n      var replacement = $(\"<li>\").text($(this).text()).get(0);\n      if (index == 0) {\n        // make the first item all caps\n        $(replacement).text($(replacement).text().toUpperCase());\n      } else if (index == 1 || index == 3) {\n        // delete the second and fourth items\n        replacement = null;\n      } else if (index == 2) {\n        // make two of the third item and add some text\n        replacement = [replacement,$(\"<li>\").get(0)];\n        $(replacement[0]).append(\"<b> - A</b>\");\n        $(replacement[1]).append(\"Extra <b> - B</b>\");\n      }\n\n      // replacment will be an dom element, null, \n      // or an array of dom elements\n      return replacement;\n    });\n    $(\"#results\").append(mappedItems);\n", "htmlCode": "\n    var mappedItems = $(\"li\").map(function (index) {\n      var replacement = $(\"&lt;li&gt;\").text($(this).text()).get(0);\n      if (index == 0) {\n        // make the first item all caps\n        $(replacement).text($(replacement).text().toUpperCase());\n      } else if (index == 1 || index == 3) {\n        // delete the second and fourth items\n        replacement = null;\n      } else if (index == 2) {\n        // make two of the third item and add some text\n        replacement = [replacement,$(\"&lt;li&gt;\").get(0)];\n        $(replacement[0]).append(\"&lt;b&gt; - A&lt;/b&gt;\");\n        $(replacement[1]).append(\"Extra &lt;b&gt; - B&lt;/b&gt;\");\n      }\n\n      // replacment will be an dom element, null, \n      // or an array of dom elements\n      return replacement;\n    });\n    $(\"#results\").append(mappedItems);\n", "desc": "A contrived example to show some functionality.", "css": "\n  body { font-size:16px; }\n  ul { float:left; margin:0 30px; color:blue; }\n  #results { color:red; }\n  ", "inhead": "", "html": "<ul>\n    <li>First</li>\n    <li>Second</li>\n    <li>Third</li>\n    <li>Fourth</li>\n    <li>Fifth</li>\n  </ul>\n  <ul id=\"results\">\n  </ul>", "exampleId": "90iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var mappedItems = $(\"li\").map(function (index) {\n      var replacement = $(\"<li>\").text($(this).text()).get(0);\n      if (index == 0) {\n        // make the first item all caps\n        $(replacement).text($(replacement).text().toUpperCase());\n      } else if (index == 1 || index == 3) {\n        // delete the second and fourth items\n        replacement = null;\n      } else if (index == 2) {\n        // make two of the third item and add some text\n        replacement = [replacement,$(\"<li>\").get(0)];\n        $(replacement[0]).append(\"<b> - A</b>\");\n        $(replacement[1]).append(\"Extra <b> - B</b>\");\n      }\n\n      // replacment will be an dom element, null, \n      // or an array of dom elements\n      return replacement;\n    });\n    $(\"#results\").append(mappedItems);\n\n  });\n</script>\n<style>\n\n  body { font-size:16px; }\n  ul { float:left; margin:0 30px; color:blue; }\n  #results { color:red; }\n  \n</style>\n</head>\n<body>\n<ul>\n    <li>First</li>\n    <li>Second</li>\n    <li>Third</li>\n    <li>Fourth</li>\n    <li>Fifth</li>\n  </ul>\n  <ul id=\"results\">\n  </ul>\n</body>\n</html>"}]}, "not91": {"id": 91, "searchname": "not", "name": "not", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Removes elements matching the specified expression from the set of matched elements.", "longdesc": "", "params": [{"optional": false, "name": "expr", "type": "String, DOMElement, Array&lt;DOMElement&gt;", "desc": "An expression with which to remove matching elements, an element to remove from the set or a set of elements to remove from the jQuery set of matched elements."}], "examples": [{"code": "\n    $(\"div\").not(\".green, #blueone\")\n            .css(\"border-color\", \"red\");\n", "htmlCode": "\n    $(\"div\").not(\".green, #blueone\")\n            .css(\"border-color\", \"red\");\n", "desc": "Adds a border to divs that are not green or blue.", "css": "\n  div { width:60px; height:60px; margin:10px; float:left;\n        background:yellow; border:2px solid white; }\n  .green { background:#8f8; }\n  .gray { background:#ccc; }\n  #blueone { background:#99f; }\n  ", "inhead": "", "html": "<div></div>\n  <div id=\"blueone\"></div>\n  <div></div>\n  <div class=\"green\"></div>\n  <div class=\"green\"></div>\n  <div class=\"gray\"></div>\n  <div></div>", "exampleId": "91iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").not(\".green, #blueone\")\n            .css(\"border-color\", \"red\");\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:10px; float:left;\n        background:yellow; border:2px solid white; }\n  .green { background:#8f8; }\n  .gray { background:#ccc; }\n  #blueone { background:#99f; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div id=\"blueone\"></div>\n  <div></div>\n  <div class=\"green\"></div>\n  <div class=\"green\"></div>\n  <div class=\"gray\"></div>\n  <div></div>\n</body>\n</html>"}, {"code": "$(\"p\").not( $(\"#selected\")[0] )", "htmlCode": "$(\"p\").not( $(\"#selected\")[0] )", "desc": "Removes the element with the ID \"selected\" from the set of all paragraphs.", "css": "", "inhead": "", "html": "", "exampleId": "91iframeExample1", "runCode": ""}, {"code": "$(\"p\").not(\"#selected\")", "htmlCode": "$(\"p\").not(\"#selected\")", "desc": "Removes the element with the ID \"selected\" from the set of all paragraphs.", "css": "", "inhead": "", "html": "", "exampleId": "91iframeExample2", "runCode": ""}, {"code": "$(\"p\").not($(\"div p.selected\"))", "htmlCode": "$(\"p\").not($(\"div p.selected\"))", "desc": "Removes all elements that match \"div p.selected\" from the total set of all paragraphs.", "css": "", "inhead": "", "html": "", "exampleId": "91iframeExample3", "runCode": ""}]}, "slice92": {"id": 92, "searchname": "slice", "name": "slice", "type": "function", "category": "Traversing", "subcategory": "Filtering", "return": "jQuery", "added": "1.1.4", "sample": "", "desc": "Selects a subset of the matched elements.", "longdesc": "<p>Behaves exactly like the built-in Array slice method. </p>", "params": [{"optional": false, "name": "start", "type": "Integer", "desc": "Where to start the subset. The first element is at zero. Can be negative to start from the end of the selection."}, {"optional": true, "name": "end", "type": "Integer", "desc": "Where to end the subset. If unspecified, ends at the end of the selection."}], "examples": [{"code": "\n    function colorEm() {\n      var $div = $(\"div\");\n      var start = Math.floor(Math.random() *\n                             $div.length);\n      var end = Math.floor(Math.random() *\n                           ($div.length - start)) +\n                           start + 1;\n      if (end == $div.length) end = undefined;\n      $div.css(\"background\", \"\");\n      if (end) \n        $div.slice(start, end).css(\"background\", \"yellow\");   \n       else\n        $div.slice(start).css(\"background\", \"yellow\");\n      \n      $(\"span\").text('$(\"div\").slice(' + start +\n                     (end ? ', ' + end : '') +\n                     ').css(\"background\", \"yellow\");');\n    }\n\n    $(\"button\").click(colorEm);\n", "htmlCode": "\n    function colorEm() {\n      var $div = $(\"div\");\n      var start = Math.floor(Math.random() *\n                             $div.length);\n      var end = Math.floor(Math.random() *\n                           ($div.length - start)) +\n                           start + 1;\n      if (end == $div.length) end = undefined;\n      $div.css(\"background\", \"\");\n      if (end) \n        $div.slice(start, end).css(\"background\", \"yellow\");   \n       else\n        $div.slice(start).css(\"background\", \"yellow\");\n      \n      $(\"span\").text('$(\"div\").slice(' + start +\n                     (end ? ', ' + end : '') +\n                     ').css(\"background\", \"yellow\");');\n    }\n\n    $(\"button\").click(colorEm);\n", "desc": "Turns divs yellow based on a random slice.", "css": "\n  div { width:40px; height:40px; margin:10px; float:left;\n        border:2px solid blue; }\n  span { color:red; font-weight:bold; }\n  button { margin:5px; }\n  ", "inhead": "", "html": "<button>Turn slice yellow</button>\n  <span>Click the button!</span>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "92iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function colorEm() {\n      var $div = $(\"div\");\n      var start = Math.floor(Math.random() *\n                             $div.length);\n      var end = Math.floor(Math.random() *\n                           ($div.length - start)) +\n                           start + 1;\n      if (end == $div.length) end = undefined;\n      $div.css(\"background\", \"\");\n      if (end) \n        $div.slice(start, end).css(\"background\", \"yellow\");   \n       else\n        $div.slice(start).css(\"background\", \"yellow\");\n      \n      $(\"span\").text('$(\"div\").slice(' + start +\n                     (end ? ', ' + end : '') +\n                     ').css(\"background\", \"yellow\");');\n    }\n\n    $(\"button\").click(colorEm);\n\n  });\n</script>\n<style>\n\n  div { width:40px; height:40px; margin:10px; float:left;\n        border:2px solid blue; }\n  span { color:red; font-weight:bold; }\n  button { margin:5px; }\n  \n</style>\n</head>\n<body>\n<button>Turn slice yellow</button>\n  <span>Click the button!</span>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "$(\"p\").slice(0, 1).wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").slice(0, 1).wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs, then slices the selection to include only the first element.", "css": "", "inhead": "", "html": "", "exampleId": "92iframeExample1", "runCode": ""}, {"code": "$(\"p\").slice(0, 2).wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").slice(0, 2).wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs, then slices the selection to include only the first and second element.", "css": "", "inhead": "", "html": "", "exampleId": "92iframeExample2", "runCode": ""}, {"code": "$(\"p\").slice(1, 2).wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").slice(1, 2).wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs, then slices the selection to include only the second element.", "css": "", "inhead": "", "html": "", "exampleId": "92iframeExample3", "runCode": ""}, {"code": "$(\"p\").slice(1).wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").slice(1).wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs, then slices the selection to include only the second and third element.", "css": "", "inhead": "", "html": "", "exampleId": "92iframeExample4", "runCode": ""}, {"code": "$(\"p\").slice(-1).wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").slice(-1).wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs, then slices the selection to include only the third element.", "css": "", "inhead": "", "html": "", "exampleId": "92iframeExample5", "runCode": ""}]}, "add93": {"id": 93, "searchname": "add", "name": "add", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Adds more elements, matched by the given expression, to the set of matched elements.", "longdesc": "", "params": [{"optional": false, "name": "expr", "type": "String, DOMElement, Array&lt;DOMElement&gt;", "desc": "An expression whose matched elements are added for String, a string of HTML to create on the fly for DOMElement or one or more Elements to add if an Array."}], "examples": [{"code": "\n    $(\"div\").css(\"border\", \"2px solid red\")\n            .add(\"p\")\n            .css(\"background\", \"yellow\");\n", "htmlCode": "\n    $(\"div\").css(\"border\", \"2px solid red\")\n            .add(\"p\")\n            .css(\"background\", \"yellow\");\n", "desc": "Finds all divs and makes a border.  Then adds all paragraphs to the jQuery object to set their backgrounds yellow.", "css": "\n  div { width:60px; height:60px; margin:10px; float:left; }\n  p { clear:left; font-weight:bold; font-size:16px; \n      color:blue; margin:0 10px; padding:2px; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <p>Added this... (notice no border)</p>", "exampleId": "93iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").css(\"border\", \"2px solid red\")\n            .add(\"p\")\n            .css(\"background\", \"yellow\");\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:10px; float:left; }\n  p { clear:left; font-weight:bold; font-size:16px; \n      color:blue; margin:0 10px; padding:2px; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <p>Added this... (notice no border)</p>\n</body>\n</html>"}, {"code": "$(\"p\").add(\"span\").css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").add(\"span\").css(\"background\", \"yellow\");", "desc": "Adds more elements, matched by the given expression, to the set of matched elements.", "css": "", "inhead": "", "html": "<p>Hello</p><span>Hello Again</span>", "exampleId": "93iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").add(\"span\").css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p><span>Hello Again</span>\n</body>\n</html>"}, {"code": "$(\"p\").clone().add(\"&lt;span>Again&lt;/span>\").appendTo(document.body);", "htmlCode": "$(\"p\").clone().add(\"&lt;span&gt;Again&lt;/span&gt;\").appendTo(document.body);", "desc": "Adds more elements, created on the fly, to the set of matched elements.", "css": "", "inhead": "", "html": "<p>Hello</p>", "exampleId": "93iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").clone().add(\"&lt;span>Again&lt;/span>\").appendTo(document.body);\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p>\n</body>\n</html>"}, {"code": "$(\"p\").add(document.getElementById(\"a\")).css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").add(document.getElementById(\"a\")).css(\"background\", \"yellow\");", "desc": "Adds one or more Elements to the set of matched elements.", "css": "", "inhead": "", "html": "<p>Hello</p><span id=\"a\">Hello Again</span>", "exampleId": "93iframeExample3", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").add(document.getElementById(\"a\")).css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p><span id=\"a\">Hello Again</span>\n</body>\n</html>"}]}, "children94": {"id": 94, "searchname": "children", "name": "children", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing all of the unique immediate children of each of the matched set of elements.", "longdesc": "<p>This set can be filtered with an optional expression that will cause only elements matching the selector to be collected. Also note: while parents() will look at all ancestors, children() will only consider immediate child elements.</p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the child Elements with."}], "examples": [{"code": "\n    $(\"#container\").click(function (e) {\n      $(\"*\").removeClass(\"hilite\");\n      var $kids = $(e.target).children();\n      var len = $kids.addClass(\"hilite\").length;\n\n      $(\"#results span:first\").text(len);\n      $(\"#results span:last\").text(e.target.tagName);\n\n      e.preventDefault();\n      return false;\n    });\n", "htmlCode": "\n    $(\"#container\").click(function (e) {\n      $(\"*\").removeClass(\"hilite\");\n      var $kids = $(e.target).children();\n      var len = $kids.addClass(\"hilite\").length;\n\n      $(\"#results span:first\").text(len);\n      $(\"#results span:last\").text(e.target.tagName);\n\n      e.preventDefault();\n      return false;\n    });\n", "desc": "Find all children of the clicked element.", "css": "\n  body { font-size:16px; font-weight:bolder; }\n  div { width:130px; height:82px; margin:10px; float:left;\n        border:1px solid blue; padding:4px; }\n  #container { width:auto; height:105px; margin:0; float:none;\n        border:none; }\n  .hilite { border-color:red; }\n  #results { display:block; color:red; }\n  p { margin:10px; border:1px solid transparent; }\n  span { color:blue; border:1px solid transparent; }\n  input { width:100px; }\n  em { border:1px solid transparent; }\n  a { border:1px solid transparent; }\n  b { border:1px solid transparent; }\n  button { border:1px solid transparent; }\n  ", "inhead": "", "html": "<div id=\"container\">\n    <div>\n      <p>This <span>is the <em>way</em> we</span> \n      write <em>the</em> demo,</p>\n    </div>\n    <div>\n      <a href=\"#\"><b>w</b>rit<b>e</b></a> the <span>demo,</span> <button>write \n      the</button> demo,\n    </div>\n    <div>\n      This <span>the way we <em>write</em> the <em>demo</em> so</span>\n      <input type=\"text\" value=\"early\" /> in\n    </div>\n    <p>\n      <span>t</span>he <span>m</span>orning.\n      <span id=\"results\">Found <span>0</span> children in <span>TAG</span>.</span>\n    </p>\n  </div>", "exampleId": "94iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#container\").click(function (e) {\n      $(\"*\").removeClass(\"hilite\");\n      var $kids = $(e.target).children();\n      var len = $kids.addClass(\"hilite\").length;\n\n      $(\"#results span:first\").text(len);\n      $(\"#results span:last\").text(e.target.tagName);\n\n      e.preventDefault();\n      return false;\n    });\n\n  });\n</script>\n<style>\n\n  body { font-size:16px; font-weight:bolder; }\n  div { width:130px; height:82px; margin:10px; float:left;\n        border:1px solid blue; padding:4px; }\n  #container { width:auto; height:105px; margin:0; float:none;\n        border:none; }\n  .hilite { border-color:red; }\n  #results { display:block; color:red; }\n  p { margin:10px; border:1px solid transparent; }\n  span { color:blue; border:1px solid transparent; }\n  input { width:100px; }\n  em { border:1px solid transparent; }\n  a { border:1px solid transparent; }\n  b { border:1px solid transparent; }\n  button { border:1px solid transparent; }\n  \n</style>\n</head>\n<body>\n<div id=\"container\">\n    <div>\n      <p>This <span>is the <em>way</em> we</span> \n      write <em>the</em> demo,</p>\n    </div>\n    <div>\n      <a href=\"#\"><b>w</b>rit<b>e</b></a> the <span>demo,</span> <button>write \n      the</button> demo,\n    </div>\n    <div>\n      This <span>the way we <em>write</em> the <em>demo</em> so</span>\n      <input type=\"text\" value=\"early\" /> in\n    </div>\n    <p>\n      <span>t</span>he <span>m</span>orning.\n      <span id=\"results\">Found <span>0</span> children in <span>TAG</span>.</span>\n    </p>\n  </div>\n</body>\n</html>"}, {"code": "$(\"div\").children().css(\"border-bottom\", \"3px double red\");", "htmlCode": "$(\"div\").children().css(\"border-bottom\", \"3px double red\");", "desc": "Find all children of each div.", "css": "\n  body { font-size:16px; font-weight:bolder; }\n  span { color:blue; }\n  p { margin:5px 0; }\n  ", "inhead": "", "html": "<p>Hello (this is a paragraph)</p>\n  <div><span>Hello Again (this span is a child of the a div)</span></div>\n  <p>And <span>Again</span> (in another paragraph)</p>\n  <div>And One Last <span>Time</span> (most text directly in a div)</div>", "exampleId": "94iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div\").children().css(\"border-bottom\", \"3px double red\");\n  });\n</script>\n<style>\n\n  body { font-size:16px; font-weight:bolder; }\n  span { color:blue; }\n  p { margin:5px 0; }\n  \n</style>\n</head>\n<body>\n<p>Hello (this is a paragraph)</p>\n  <div><span>Hello Again (this span is a child of the a div)</span></div>\n  <p>And <span>Again</span> (in another paragraph)</p>\n  <div>And One Last <span>Time</span> (most text directly in a div)</div>\n</body>\n</html>"}, {"code": "$(\"div\").children(\".selected\").css(\"color\", \"blue\");", "htmlCode": "$(\"div\").children(\".selected\").css(\"color\", \"blue\");", "desc": "Find all children with a class \"selected\" of each div.", "css": "\n  body { font-size:16px; font-weight:bolder; }\n  p { margin:5px 0; }\n  ", "inhead": "", "html": "<div>\n    <span>Hello</span>\n    <p class=\"selected\">Hello Again</p>\n    <div class=\"selected\">And Again</div>\n    <p>And One Last Time</p>\n  </div>", "exampleId": "94iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div\").children(\".selected\").css(\"color\", \"blue\");\n  });\n</script>\n<style>\n\n  body { font-size:16px; font-weight:bolder; }\n  p { margin:5px 0; }\n  \n</style>\n</head>\n<body>\n<div>\n    <span>Hello</span>\n    <p class=\"selected\">Hello Again</p>\n    <div class=\"selected\">And Again</div>\n    <p>And One Last Time</p>\n  </div>\n</body>\n</html>"}]}, "contents95": {"id": 95, "searchname": "contents", "name": "contents", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Find all the child nodes inside the matched elements (including text nodes), or the content document, if the element is an iframe.", "longdesc": "", "params": [], "examples": [{"code": "$(\"p\").contents().not(\"[nodeType=1]\").wrap(\"<b/>\");", "htmlCode": "$(\"p\").contents().not(\"[nodeType=1]\").wrap(\"&lt;b/&gt;\");", "desc": "Find all the text nodes inside a paragraph and wrap them with a bold tag.", "css": "", "inhead": "", "html": "<p>Hello <a href=\"http://ejohn.org/\">John</a>, how are you doing?</p>", "exampleId": "95iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").contents().not(\"[nodeType=1]\").wrap(\"<b/>\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello <a href=\"http://ejohn.org/\">John</a>, how are you doing?</p>\n</body>\n</html>"}, {"code": "$(\"iframe\").contents().find(\"body\").append(\"I'm in an iframe!\");", "htmlCode": "$(\"iframe\").contents().find(\"body\").append(\"I'm in an iframe!\");", "desc": "Append some new content into an empty iframe.", "css": "", "inhead": "", "html": "<iframe src=\"/index-blank.html\" width=\"300\" height=\"100\"></iframe>", "exampleId": "95iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"iframe\").contents().find(\"body\").append(\"I'm in an iframe!\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<iframe src=\"/index-blank.html\" width=\"300\" height=\"100\"></iframe>\n</body>\n</html>"}]}, "find96": {"id": 96, "searchname": "find", "name": "find", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Searches for all elements that match the specified <a href='Selectors'>expression</a>. This method is a good way to find additional descendant elements with which to process.", "longdesc": "<p>All searching is done using a <a href='Selectors'>jQuery expression</a>. The expression can be written using CSS 1-3 Selector syntax. </p>", "params": [{"optional": false, "name": "expr", "type": "String", "desc": "An expression to search with."}], "examples": [{"code": "$(\"p\").find(\"span\").css('color','red');", "htmlCode": "$(\"p\").find(\"span\").css('color','red');", "desc": "Starts with all paragraphs and searches for descendant span elements, same as $(\"p span\")", "css": "", "inhead": "", "html": "<p><span>Hello</span>, how are you?</p>\n  <p>Me? I'm <span>good</span>.</p>", "exampleId": "96iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").find(\"span\").css('color','red');\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p><span>Hello</span>, how are you?</p>\n  <p>Me? I'm <span>good</span>.</p>\n</body>\n</html>"}, {"code": "\n    var newText = $(\"p\").text().split(\" \").join(\"</span> <span>\");\n    newText = \"<span>\" + newText + \"</span>\";\n\n    $(\"p\").html(newText)\n          .find(\"span\")\n            .hover(function () { $(this).addClass(\"hilite\"); },\n                   function () { $(this).removeClass(\"hilite\"); })\n          .end()\n          .find(\":contains('t')\")\n            .css({\"font-style\":\"italic\", \"font-weight\":\"bolder\"});\n", "htmlCode": "\n    var newText = $(\"p\").text().split(\" \").join(\"&lt;/span&gt; &lt;span&gt;\");\n    newText = \"&lt;span&gt;\" + newText + \"&lt;/span&gt;\";\n\n    $(\"p\").html(newText)\n          .find(\"span\")\n            .hover(function () { $(this).addClass(\"hilite\"); },\n                   function () { $(this).removeClass(\"hilite\"); })\n          .end()\n          .find(\":contains('t')\")\n            .css({\"font-style\":\"italic\", \"font-weight\":\"bolder\"});\n", "desc": "Add spans around each word then add a hover and italicize words with the letter <strong>t</strong>.", "css": "\n  p { font-size:20px; width:200px; cursor:default; \n      color:blue; font-weight:bold; margin:0 10px; }\n  .hilite { background:yellow; }\n  ", "inhead": "", "html": "<p>\n    When the day is short\n    find that which matters to you\n    or stop believing\n  </p>", "exampleId": "96iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var newText = $(\"p\").text().split(\" \").join(\"</span> <span>\");\n    newText = \"<span>\" + newText + \"</span>\";\n\n    $(\"p\").html(newText)\n          .find(\"span\")\n            .hover(function () { $(this).addClass(\"hilite\"); },\n                   function () { $(this).removeClass(\"hilite\"); })\n          .end()\n          .find(\":contains('t')\")\n            .css({\"font-style\":\"italic\", \"font-weight\":\"bolder\"});\n\n  });\n</script>\n<style>\n\n  p { font-size:20px; width:200px; cursor:default; \n      color:blue; font-weight:bold; margin:0 10px; }\n  .hilite { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>\n    When the day is short\n    find that which matters to you\n    or stop believing\n  </p>\n</body>\n</html>"}]}, "next97": {"id": 97, "searchname": "next", "name": "next", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing the unique next siblings of each of the given set of elements.", "longdesc": "<p>next only returns the very next sibling for each element, not all next siblings (see nextAll).</p><p>You may provide an optional expression to filter the returned set. </p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression with which to filter the returned set."}], "examples": [{"code": "$(\"button[disabled]\").next().text(\"this button is disabled\");", "htmlCode": "$(\"button[disabled]\").next().text(\"this button is disabled\");", "desc": "Find the very next sibling of each disabled button and change its text \"this button is disabled\".", "css": "\n  span { color:blue; font-weight:bold; }\n  button { width:100px; }\n  ", "inhead": "", "html": "<div><button disabled=\"disabled\">First</button> - <span></span></div>\n  <div><button>Second</button> - <span></span></div>\n  <div><button disabled=\"disabled\">Third</button> - <span></span></div>", "exampleId": "97iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"button[disabled]\").next().text(\"this button is disabled\");\n  });\n</script>\n<style>\n\n  span { color:blue; font-weight:bold; }\n  button { width:100px; }\n  \n</style>\n</head>\n<body>\n<div><button disabled=\"disabled\">First</button> - <span></span></div>\n  <div><button>Second</button> - <span></span></div>\n  <div><button disabled=\"disabled\">Third</button> - <span></span></div>\n</body>\n</html>"}, {"code": "$(\"p\").next(\".selected\").css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").next(\".selected\").css(\"background\", \"yellow\");", "desc": "Find the very next sibling of each paragraph that has a class \"selected\".", "css": "", "inhead": "", "html": "<p>Hello</p>\n  <p class=\"selected\">Hello Again</p>\n  <div><span>And Again</span></div>", "exampleId": "97iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").next(\".selected\").css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p class=\"selected\">Hello Again</p>\n  <div><span>And Again</span></div>\n</body>\n</html>"}]}, "nextall98": {"id": 98, "searchname": "nextall", "name": "nextAll", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Find all sibling elements after the current element.", "longdesc": "<p>Use an optional expression to filter the matched set. </p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the next Elements with."}], "examples": [{"code": "$(\"div:first\").nextAll().addClass(\"after\");", "htmlCode": "$(\"div:first\").nextAll().addClass(\"after\");", "desc": "Locate all the divs after the first and give them a class.", "css": "\n  div { width: 80px; height: 80px; background: #abc; \n        border: 2px solid black; margin: 10px; float: left; }\n  div.after { border-color: red; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "98iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div:first\").nextAll().addClass(\"after\");\n  });\n</script>\n<style>\n\n  div { width: 80px; height: 80px; background: #abc; \n        border: 2px solid black; margin: 10px; float: left; }\n  div.after { border-color: red; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    $(\":nth-child(1)\").nextAll(\"p\").addClass(\"after\");\n", "htmlCode": "\n    $(\":nth-child(1)\").nextAll(\"p\").addClass(\"after\");\n", "desc": "Locate all the paragraphs after the second child in the body and give them a class.", "css": "\n  div, p { width: 60px; height: 60px; background: #abc;\n           border: 2px solid black; margin: 10px; float: left; }\n  .after { border-color: red; }\n  ", "inhead": "", "html": "<p>p</p>\n  <div>div</div>\n  <p>p</p>\n  <p>p</p>\n  <div>div</div>\n  <p>p</p>\n  <div>div</div>", "exampleId": "98iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\":nth-child(1)\").nextAll(\"p\").addClass(\"after\");\n\n  });\n</script>\n<style>\n\n  div, p { width: 60px; height: 60px; background: #abc;\n           border: 2px solid black; margin: 10px; float: left; }\n  .after { border-color: red; }\n  \n</style>\n</head>\n<body>\n<p>p</p>\n  <div>div</div>\n  <p>p</p>\n  <p>p</p>\n  <div>div</div>\n  <p>p</p>\n  <div>div</div>\n</body>\n</html>"}]}, "parent99": {"id": 99, "searchname": "parent", "name": "parent", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing the unique parents of the matched set of elements.", "longdesc": "<p>You may use an optional expression to filter the set of parent elements that will match. </p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the parents with."}], "examples": [{"code": "\n    $(\"*\", document.body).each(function () {\n      var parentTag = $(this).parent().get(0).tagName;\n      $(this).prepend(document.createTextNode(parentTag + \" > \"));\n    });\n", "htmlCode": "\n    $(\"*\", document.body).each(function () {\n      var parentTag = $(this).parent().get(0).tagName;\n      $(this).prepend(document.createTextNode(parentTag + \" &gt; \"));\n    });\n", "desc": "Shows the parent of each element as (parent &gt; child).  Check the View Source to see the raw html.", "css": "\n  div,p { margin:10px; }\n  ", "inhead": "", "html": "<div>div, \n    <span>span, </span>\n    <b>b </b>\n  </div>\n  <p>p, \n    <span>span, \n      <em>em </em>\n    </span>\n  </p>\n  <div>div, \n    <strong>strong, \n      <span>span, </span>\n      <em>em, \n        <b>b, </b>\n      </em>\n    </strong>\n    <b>b </b>\n  </div>", "exampleId": "99iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"*\", document.body).each(function () {\n      var parentTag = $(this).parent().get(0).tagName;\n      $(this).prepend(document.createTextNode(parentTag + \" > \"));\n    });\n\n  });\n</script>\n<style>\n\n  div,p { margin:10px; }\n  \n</style>\n</head>\n<body>\n<div>div, \n    <span>span, </span>\n    <b>b </b>\n  </div>\n  <p>p, \n    <span>span, \n      <em>em </em>\n    </span>\n  </p>\n  <div>div, \n    <strong>strong, \n      <span>span, </span>\n      <em>em, \n        <b>b, </b>\n      </em>\n    </strong>\n    <b>b </b>\n  </div>\n</body>\n</html>"}, {"code": "$(\"p\").parent(\".selected\").css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").parent(\".selected\").css(\"background\", \"yellow\");", "desc": "Find the parent element of each paragraph with a class \"selected\".", "css": "", "inhead": "", "html": "<div><p>Hello</p></div>\n  <div class=\"selected\"><p>Hello Again</p></div>\n", "exampleId": "99iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").parent(\".selected\").css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div><p>Hello</p></div>\n  <div class=\"selected\"><p>Hello Again</p></div>\n\n</body>\n</html>"}]}, "parents100": {"id": 100, "searchname": "parents", "name": "parents", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing the unique ancestors of the matched set of elements (except for the root element).\n\nThe matched elements can be filtered with an optional expression. ", "longdesc": "", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the ancestors with"}], "examples": [{"code": "\n    var parentEls = $(\"b\").parents()\n                          .map(function () { \n                                return this.tagName; \n                              })\n                          .get().join(\", \");\n    $(\"b\").append(\"<strong>\" + parentEls + \"</strong>\");\n", "htmlCode": "\n    var parentEls = $(\"b\").parents()\n                          .map(function () { \n                                return this.tagName; \n                              })\n                          .get().join(\", \");\n    $(\"b\").append(\"&lt;strong&gt;\" + parentEls + \"&lt;/strong&gt;\");\n", "desc": "Find all parent elements of each span.", "css": "\n  b { color:blue; }\n  strong { color:red; }\n  ", "inhead": "", "html": "<div>\n    <p>\n      <span>\n        <b>My parents are: </b>\n      </span>\n    </p>\n  </div>", "exampleId": "100iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var parentEls = $(\"b\").parents()\n                          .map(function () { \n                                return this.tagName; \n                              })\n                          .get().join(\", \");\n    $(\"b\").append(\"<strong>\" + parentEls + \"</strong>\");\n\n  });\n</script>\n<style>\n\n  b { color:blue; }\n  strong { color:red; }\n  \n</style>\n</head>\n<body>\n<div>\n    <p>\n      <span>\n        <b>My parents are: </b>\n      </span>\n    </p>\n  </div>\n</body>\n</html>"}, {"code": "\n    function showParents() {\n      $(\"div\").css(\"border-color\", \"white\");\n      var len = $(\"span.selected\")\n                       .parents(\"div\")\n                       .css(\"border\", \"2px red solid\")\n                       .length;\n      $(\"b\").text(\"Unique div parents: \" + len);\n    }\n    $(\"span\").click(function () {\n      $(this).toggleClass(\"selected\");\n      showParents();\n    });\n", "htmlCode": "\n    function showParents() {\n      $(\"div\").css(\"border-color\", \"white\");\n      var len = $(\"span.selected\")\n                       .parents(\"div\")\n                       .css(\"border\", \"2px red solid\")\n                       .length;\n      $(\"b\").text(\"Unique div parents: \" + len);\n    }\n    $(\"span\").click(function () {\n      $(this).toggleClass(\"selected\");\n      showParents();\n    });\n", "desc": "Click to find all unique div parent elements of each span.", "css": "\n  p, div, span {margin:2px; padding:1px; }\n  div { border:2px white solid; }\n  span { cursor:pointer; font-size:12px; }\n  .selected { color:blue; }\n  b { color:red; display:block; font-size:14px; }\n  ", "inhead": "", "html": "<p>\n    <div>\n      <div><span>Hello</span></div>\n      <span>Hello Again</span>\n    </div>\n    <div>\n      <span>And Hello Again</span>\n    </div>\n  </p>\n  <b>Click Hellos to toggle their parents.</b>", "exampleId": "100iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function showParents() {\n      $(\"div\").css(\"border-color\", \"white\");\n      var len = $(\"span.selected\")\n                       .parents(\"div\")\n                       .css(\"border\", \"2px red solid\")\n                       .length;\n      $(\"b\").text(\"Unique div parents: \" + len);\n    }\n    $(\"span\").click(function () {\n      $(this).toggleClass(\"selected\");\n      showParents();\n    });\n\n  });\n</script>\n<style>\n\n  p, div, span {margin:2px; padding:1px; }\n  div { border:2px white solid; }\n  span { cursor:pointer; font-size:12px; }\n  .selected { color:blue; }\n  b { color:red; display:block; font-size:14px; }\n  \n</style>\n</head>\n<body>\n<p>\n    <div>\n      <div><span>Hello</span></div>\n      <span>Hello Again</span>\n    </div>\n    <div>\n      <span>And Hello Again</span>\n    </div>\n  </p>\n  <b>Click Hellos to toggle their parents.</b>\n</body>\n</html>"}]}, "prev101": {"id": 101, "searchname": "prev", "name": "prev", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing the unique previous siblings of each of the matched set of elements.", "longdesc": "<p>Use an optional expression to filter the matched set.</p><p>Only the immediately previous sibling is returned, not all previous siblings. </p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the previous Elements with."}], "examples": [{"code": "\n    var $curr = $(\"#start\");\n    $curr.css(\"background\", \"#f99\");\n    $(\"button\").click(function () {\n      $curr = $curr.prev();\n      $(\"div\").css(\"background\", \"\");\n      $curr.css(\"background\", \"#f99\");\n    });\n", "htmlCode": "\n    var $curr = $(\"#start\");\n    $curr.css(\"background\", \"#f99\");\n    $(\"button\").click(function () {\n      $curr = $curr.prev();\n      $(\"div\").css(\"background\", \"\");\n      $curr.css(\"background\", \"#f99\");\n    });\n", "desc": "Find the very previous sibling of each div.", "css": "\n  div { width:40px; height:40px; margin:10px;\n        float:left; border:2px blue solid; \n        padding:2px; }\n  span { font-size:14px; }\n  p { clear:left; margin:10px; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div><span>has child</span></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div id=\"start\"></div>\n  <div></div>\n  <p><button>Go to Prev</button></p>", "exampleId": "101iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var $curr = $(\"#start\");\n    $curr.css(\"background\", \"#f99\");\n    $(\"button\").click(function () {\n      $curr = $curr.prev();\n      $(\"div\").css(\"background\", \"\");\n      $curr.css(\"background\", \"#f99\");\n    });\n\n  });\n</script>\n<style>\n\n  div { width:40px; height:40px; margin:10px;\n        float:left; border:2px blue solid; \n        padding:2px; }\n  span { font-size:14px; }\n  p { clear:left; margin:10px; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div><span>has child</span></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div id=\"start\"></div>\n  <div></div>\n  <p><button>Go to Prev</button></p>\n</body>\n</html>"}, {"code": "$(\"p\").prev(\".selected\").css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").prev(\".selected\").css(\"background\", \"yellow\");", "desc": "Find the very previous sibling of each paragraph that has a class \"selected\".", "css": "", "inhead": "", "html": "<div><span>Hello</span></div>\n  <p class=\"selected\">Hello Again</p>\n  <p>And Again</p>", "exampleId": "101iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").prev(\".selected\").css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div><span>Hello</span></div>\n  <p class=\"selected\">Hello Again</p>\n  <p>And Again</p>\n</body>\n</html>"}]}, "prevall102": {"id": 102, "searchname": "prevall", "name": "prevAll", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Find all sibling elements before the current element.", "longdesc": "<p>Use an optional expression to filter the matched set. </p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the previous Elements with."}], "examples": [{"code": "$(\"div:last\").prevAll().addClass(\"before\");", "htmlCode": "$(\"div:last\").prevAll().addClass(\"before\");", "desc": "Locate all the divs before the last and give them a class.", "css": "\n  div { width:70px; height:70px; background:#abc; \n        border:2px solid black; margin:10px; float:left; }\n  div.before { border-color: red; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "102iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div:last\").prevAll().addClass(\"before\");\n  });\n</script>\n<style>\n\n  div { width:70px; height:70px; background:#abc; \n        border:2px solid black; margin:10px; float:left; }\n  div.before { border-color: red; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "siblings103": {"id": 103, "searchname": "siblings", "name": "siblings", "type": "function", "category": "Traversing", "subcategory": "Finding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Get a set of elements containing all of the unique siblings of each of the matched set of elements.\n\nCan be filtered with an optional expressions. ", "longdesc": "", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "An expression to filter the sibling Elements with"}], "examples": [{"code": "\n    var len = $(\".hilite\").siblings()\n                          .css(\"color\", \"red\")\n                          .length;\n    $(\"b\").text(len);\n", "htmlCode": "\n    var len = $(\".hilite\").siblings()\n                          .css(\"color\", \"red\")\n                          .length;\n    $(\"b\").text(len);\n", "desc": "Find the unique siblings of all yellow li elements in the 3 lists (including other yellow li elements if appropriate).", "css": "\n  ul { float:left; margin:5px; font-size:16px; font-weight:bold; }\n  p { color:blue; margin:10px 20px; font-size:16px; padding:5px; \n      font-weight:bolder; }\n  .hilite { background:yellow; }\n", "inhead": "", "html": "<ul>\n    <li>One</li>\n    <li>Two</li>\n    <li class=\"hilite\">Three</li>\n    <li>Four</li>\n  </ul>\n  <ul>\n    <li>Five</li>\n    <li>Six</li>\n    <li>Seven</li>\n  </ul>\n  <ul>\n    <li>Eight</li>\n    <li class=\"hilite\">Nine</li>\n    <li>Ten</li>\n    <li class=\"hilite\">Eleven</li>\n  </ul>\n  <p>Unique siblings: <b></b></p>", "exampleId": "103iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var len = $(\".hilite\").siblings()\n                          .css(\"color\", \"red\")\n                          .length;\n    $(\"b\").text(len);\n\n  });\n</script>\n<style>\n\n  ul { float:left; margin:5px; font-size:16px; font-weight:bold; }\n  p { color:blue; margin:10px 20px; font-size:16px; padding:5px; \n      font-weight:bolder; }\n  .hilite { background:yellow; }\n\n</style>\n</head>\n<body>\n<ul>\n    <li>One</li>\n    <li>Two</li>\n    <li class=\"hilite\">Three</li>\n    <li>Four</li>\n  </ul>\n  <ul>\n    <li>Five</li>\n    <li>Six</li>\n    <li>Seven</li>\n  </ul>\n  <ul>\n    <li>Eight</li>\n    <li class=\"hilite\">Nine</li>\n    <li>Ten</li>\n    <li class=\"hilite\">Eleven</li>\n  </ul>\n  <p>Unique siblings: <b></b></p>\n</body>\n</html>"}, {"code": "$(\"p\").siblings(\".selected\").css(\"background\", \"yellow\");", "htmlCode": "$(\"p\").siblings(\".selected\").css(\"background\", \"yellow\");", "desc": "Find all siblings with a class \"selected\" of each div.", "css": "", "inhead": "", "html": "<div><span>Hello</span></div>\n  <p class=\"selected\">Hello Again</p>\n  <p>And Again</p>", "exampleId": "103iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").siblings(\".selected\").css(\"background\", \"yellow\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<div><span>Hello</span></div>\n  <p class=\"selected\">Hello Again</p>\n  <p>And Again</p>\n</body>\n</html>"}]}, "andself104": {"id": 104, "searchname": "andself", "name": "andSelf", "type": "function", "category": "Traversing", "subcategory": "Chaining", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Add the previous selection to the current selection.", "longdesc": "<p>Useful for traversing elements, and then adding something that was matched before the last traversion.</p>", "params": [], "examples": [{"code": "\n    $(\"div\").find(\"p\").andSelf().addClass(\"border\");\n    $(\"div\").find(\"p\").addClass(\"background\");\n", "htmlCode": "\n    $(\"div\").find(\"p\").andSelf().addClass(\"border\");\n    $(\"div\").find(\"p\").addClass(\"background\");\n", "desc": "Find all divs, and all the paragraphs inside of them, and give them both classnames.  Notice the div doesn't have the yellow background color since it didn't use andSelf().", "css": "\n  p, div { margin:5px; padding:5px; }\n  .border { border: 2px solid red; }\n  .background { background:yellow; }\n  ", "inhead": "", "html": "<div>\n    <p>First Paragraph</p>\n    <p>Second Paragraph</p>\n  </div>", "exampleId": "104iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").find(\"p\").andSelf().addClass(\"border\");\n    $(\"div\").find(\"p\").addClass(\"background\");\n\n  });\n</script>\n<style>\n\n  p, div { margin:5px; padding:5px; }\n  .border { border: 2px solid red; }\n  .background { background:yellow; }\n  \n</style>\n</head>\n<body>\n<div>\n    <p>First Paragraph</p>\n    <p>Second Paragraph</p>\n  </div>\n</body>\n</html>"}]}, "end105": {"id": 105, "searchname": "end", "name": "end", "type": "function", "category": "Traversing", "subcategory": "Chaining", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Revert the most recent 'destructive' operation, changing the set of matched elements to its previous state (right before the destructive operation).", "longdesc": "<p>If there was no destructive operation before, an empty set is returned.</p><p>A 'destructive' operation is any operation that changes the set of matched jQuery elements, which means any Traversing function that returns a jQuery object - including <a href='Traversing/add'>add</a>, <a href='Traversing/andSelf'>andSelf</a>, <a href='Traversing/children'>children</a>, <a href='Traversing/filter'>filter</a>, <a href='Traversing/find'>find</a>, <a href='Traversing/map'>map</a>, <a href='Traversing/next'>next</a>, <a href='Traversing/nextAll'>nextAll</a>, <a href='Traversing/not'>not</a>, <a href='Traversing/parent'>parent</a>, <a href='Traversing/parents'>parents</a>, <a href='Traversing/prev'>prev</a>, <a href='Traversing/prevAll'>prevAll</a>, <a href='Traversing/siblings'>siblings</a> and <a href='Traversing/slice'>slice</a> - plus the <a href='Manipulation/clone'>clone</a> function (from Manipulation). </p>", "params": [], "examples": [{"code": "\n    jQuery.fn.showTags = function (n) {\n      var tags = this.map(function () { \n                              return this.tagName; \n                            })\n                        .get().join(\", \");\n      $(\"b:eq(\" + n + \")\").text(tags);\n      return this;\n    };\n\n    $(\"p\").showTags(0)\n          .find(\"span\")\n          .showTags(1)\n          .css(\"background\", \"yellow\")\n          .end()\n          .showTags(2)\n          .css(\"font-style\", \"italic\");\n", "htmlCode": "\n    jQuery.fn.showTags = function (n) {\n      var tags = this.map(function () { \n                              return this.tagName; \n                            })\n                        .get().join(\", \");\n      $(\"b:eq(\" + n + \")\").text(tags);\n      return this;\n    };\n\n    $(\"p\").showTags(0)\n          .find(\"span\")\n          .showTags(1)\n          .css(\"background\", \"yellow\")\n          .end()\n          .showTags(2)\n          .css(\"font-style\", \"italic\");\n", "desc": "Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs.", "css": "\n  p, div { margin:1px; padding:1px; font-weight:bold; \n           font-size:16px; }\n  div { color:blue; }\n  b { color:red; }\n  ", "inhead": "", "html": "<p>\n    Hi there <span>how</span> are you <span>doing</span>?\n  </p>\n  <p>\n    This <span>span</span> is one of \n    several <span>spans</span> in this\n    <span>sentence</span>.\n  </p>\n  <div>\n    Tags in jQuery object initially: <b></b>\n  </div>\n  <div>\n    Tags in jQuery object after find: <b></b>\n  </div>\n  <div>\n    Tags in jQuery object after end: <b></b>\n  </div>", "exampleId": "105iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    jQuery.fn.showTags = function (n) {\n      var tags = this.map(function () { \n                              return this.tagName; \n                            })\n                        .get().join(\", \");\n      $(\"b:eq(\" + n + \")\").text(tags);\n      return this;\n    };\n\n    $(\"p\").showTags(0)\n          .find(\"span\")\n          .showTags(1)\n          .css(\"background\", \"yellow\")\n          .end()\n          .showTags(2)\n          .css(\"font-style\", \"italic\");\n\n  });\n</script>\n<style>\n\n  p, div { margin:1px; padding:1px; font-weight:bold; \n           font-size:16px; }\n  div { color:blue; }\n  b { color:red; }\n  \n</style>\n</head>\n<body>\n<p>\n    Hi there <span>how</span> are you <span>doing</span>?\n  </p>\n  <p>\n    This <span>span</span> is one of \n    several <span>spans</span> in this\n    <span>sentence</span>.\n  </p>\n  <div>\n    Tags in jQuery object initially: <b></b>\n  </div>\n  <div>\n    Tags in jQuery object after find: <b></b>\n  </div>\n  <div>\n    Tags in jQuery object after end: <b></b>\n  </div>\n</body>\n</html>"}, {"code": "$(\"p\").find(\"span\").end().css(\"border\", \"2px red solid\");", "htmlCode": "$(\"p\").find(\"span\").end().css(\"border\", \"2px red solid\");", "desc": "Selects all paragraphs, finds span elements inside these, and reverts the selection back to the paragraphs.", "css": "p { margin:10px; padding:10px; }", "inhead": "", "html": "<p><span>Hello</span>, how are you?</p>", "exampleId": "105iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").find(\"span\").end().css(\"border\", \"2px red solid\");\n  });\n</script>\n<style>\np { margin:10px; padding:10px; }\n</style>\n</head>\n<body>\n<p><span>Hello</span>, how are you?</p>\n</body>\n</html>"}]}, "html106": {"id": 106, "searchname": "html", "name": "html", "type": "function", "category": "Attributes", "subcategory": "Changing Contents", "return": "String", "added": "", "sample": "", "desc": "Get the html contents (innerHTML) of the first matched element. This property is not available on XML documents (although it will work for XHTML documents).", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n", "htmlCode": "\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n", "desc": "Click a paragraph to convert it from html to text.", "css": "\n  p { margin:8px; font-size:20px; color:blue; \n      cursor:pointer; }\n  b { text-decoration:underline; }\n  button { cursor:pointer; }\n  ", "inhead": "", "html": "<p>\n    <b>Click</b> to change the <span id=\"tag\">html</span>\n  </p>\n  <p>\n    to a <span id=\"text\">text</span> node.\n  </p>\n  <p>\n    This <button name=\"nada\">button</button> does nothing.\n  </p>", "exampleId": "106iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () {\n      var htmlStr = $(this).html();\n      $(this).text(htmlStr);\n    });\n\n  });\n</script>\n<style>\n\n  p { margin:8px; font-size:20px; color:blue; \n      cursor:pointer; }\n  b { text-decoration:underline; }\n  button { cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<p>\n    <b>Click</b> to change the <span id=\"tag\">html</span>\n  </p>\n  <p>\n    to a <span id=\"text\">text</span> node.\n  </p>\n  <p>\n    This <button name=\"nada\">button</button> does nothing.\n  </p>\n</body>\n</html>"}]}, "html107": {"id": 107, "searchname": "html", "name": "html", "type": "function", "category": "Attributes", "subcategory": "Changing Contents", "return": "jQuery", "added": "", "sample": "", "desc": "Set the html contents of every matched element. This property is not available on XML documents (although it will work for XHTML documents).", "longdesc": "", "params": [{"optional": false, "name": "val", "type": "String", "desc": "Set the html contents to the specified value."}], "examples": [{"code": "$(\"div\").html(\"<span class='red'>Hello <b>Again</b></span>\");", "htmlCode": "$(\"div\").html(\"&lt;span class='red'&gt;Hello &lt;b&gt;Again&lt;/b&gt;&lt;/span&gt;\");", "desc": "Add some html to each div.", "css": "\n  .red { color:red; }\n  ", "inhead": "", "html": "<span>Hello</span>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "107iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"div\").html(\"<span class='red'>Hello <b>Again</b></span>\");\n  });\n</script>\n<style>\n\n  .red { color:red; }\n  \n</style>\n</head>\n<body>\n<span>Hello</span>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    $(\"div\").html(\"<b>Wow!</b> Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n", "htmlCode": "\n    $(\"div\").html(\"&lt;b&gt;Wow!&lt;/b&gt; Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n", "desc": "Add some html to each div then immediately do further manipulations to the inserted html.", "css": "\n  div { color:blue; font-size:18px; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>", "exampleId": "107iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").html(\"<b>Wow!</b> Such excitement...\");\n    $(\"div b\").append(document.createTextNode(\"!!!\"))\n              .css(\"color\", \"red\");\n\n  });\n</script>\n<style>\n\n  div { color:blue; font-size:18px; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "text108": {"id": 108, "searchname": "text", "name": "text", "type": "function", "category": "Attributes", "subcategory": "Changing Contents", "return": "String", "added": "", "sample": "", "desc": "Get the combined text contents of all matched elements.", "longdesc": "<p>The result is a string that contains the combined text contents of all matched elements. This method works on both HTML and XML documents.</p>", "params": [], "examples": [{"code": "\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n", "htmlCode": "\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n", "desc": "Find the text in the first paragraph (stripping out the html), then set the html of the last paragraph to show it is just text (the red bold is gone).", "css": "\n  p { color:blue; margin:8px; }\n  b { color:red; }\n  ", "inhead": "", "html": "<p><b>Test</b> Paragraph.</p>\n  <p></p>", "exampleId": "108iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var str = $(\"p:first\").text();\n    $(\"p:last\").html(str);\n\n  });\n</script>\n<style>\n\n  p { color:blue; margin:8px; }\n  b { color:red; }\n  \n</style>\n</head>\n<body>\n<p><b>Test</b> Paragraph.</p>\n  <p></p>\n</body>\n</html>"}]}, "text109": {"id": 109, "searchname": "text", "name": "text", "type": "function", "category": "Attributes", "subcategory": "Changing Contents", "return": "jQuery", "added": "", "sample": "", "desc": "Set the text contents of all matched elements.", "longdesc": "<p>Similar to html(), but escapes HTML (replace \"<\" and \">\" with their HTML entities).</p>", "params": [{"optional": false, "name": "val", "type": "String", "desc": "The text value to set the contents of the element to."}], "examples": [{"code": "$(\"p\").text(\"<b>Some</b> new text.\");", "htmlCode": "$(\"p\").text(\"&lt;b&gt;Some&lt;/b&gt; new text.\");", "desc": "Add text to the paragraph (notice the bold tag is escaped).", "css": "\n  p { color:blue; margin:8px; }\n  ", "inhead": "", "html": "<p>Test Paragraph.</p>", "exampleId": "109iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").text(\"<b>Some</b> new text.\");\n  });\n</script>\n<style>\n\n  p { color:blue; margin:8px; }\n  \n</style>\n</head>\n<body>\n<p>Test Paragraph.</p>\n</body>\n</html>"}]}, "append110": {"id": 110, "searchname": "append", "name": "append", "type": "function", "category": "Manipulation", "subcategory": "Inserting Inside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Append content to the inside of every matched element.", "longdesc": "<p>This operation is similar to doing an appendChild to all the specified elements, adding them into the document.</p>", "params": [{"optional": false, "name": "content", "type": "String, Element, jQuery", "desc": "Content to append to the target."}], "examples": [{"code": "$(\"p\").append(\"<b>Hello</b>\");", "htmlCode": "$(\"p\").append(\"&lt;b&gt;Hello&lt;/b&gt;\");", "desc": "Appends some HTML to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>I would like to say: </p>", "exampleId": "110iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").append(\"<b>Hello</b>\");\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>I would like to say: </p>\n</body>\n</html>"}, {"code": "$(\"p\").append(document.createTextNode(\"Hello\"));", "htmlCode": "$(\"p\").append(document.createTextNode(\"Hello\"));", "desc": "Appends an Element to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>I would like to say: </p>", "exampleId": "110iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").append(document.createTextNode(\"Hello\"));\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>I would like to say: </p>\n</body>\n</html>"}, {"code": "$(\"p\").append( $(\"b\") );", "htmlCode": "$(\"p\").append( $(\"b\") );", "desc": "Appends a jQuery object (similar to an Array of DOM Elements) to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<b>Hello</b><p>I would like to say: </p>", "exampleId": "110iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").append( $(\"b\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<b>Hello</b><p>I would like to say: </p>\n</body>\n</html>"}]}, "appendto111": {"id": 111, "searchname": "appendto", "name": "appendTo", "type": "function", "category": "Manipulation", "subcategory": "Inserting Inside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Append all of the matched elements to another, specified, set of elements.", "longdesc": "<p>This operation is, essentially, the reverse of doing a regular $(A).append(B), in that instead of appending B to A, you're appending A to B.</p>", "params": [{"optional": false, "name": "content", "type": "String", "desc": "target to which the content will be appended."}], "examples": [{"code": "$(\"span\").appendTo(\"#foo\"); // check append() examples", "htmlCode": "$(\"span\").appendTo(\"#foo\"); // check append() examples", "desc": "Appends all spans to the element with the ID \"foo\"", "css": "#foo { background:yellow; }", "inhead": "", "html": "<span>I have nothing more to say... </span>\n  <div id=\"foo\">FOO! </div>", "exampleId": "111iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"span\").appendTo(\"#foo\"); // check append() examples\n  });\n</script>\n<style>\n#foo { background:yellow; }\n</style>\n</head>\n<body>\n<span>I have nothing more to say... </span>\n  <div id=\"foo\">FOO! </div>\n</body>\n</html>"}]}, "prepend112": {"id": 112, "searchname": "prepend", "name": "prepend", "type": "function", "category": "Manipulation", "subcategory": "Inserting Inside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Prepend content to the inside of every matched element.", "longdesc": "<p>This operation is the best way to insert elements inside, at the beginning, of all matched elements.</p>", "params": [{"optional": false, "name": "content", "type": "String, Element, jQuery", "desc": "Content to prepend to the target."}], "examples": [{"code": "$(\"p\").prepend(\"<b>Hello </b>\");", "htmlCode": "$(\"p\").prepend(\"&lt;b&gt;Hello &lt;/b&gt;\");", "desc": "Prepends some HTML to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>there friend!</p>\n  <p>amigo!</p>", "exampleId": "112iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").prepend(\"<b>Hello </b>\");\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>there friend!</p>\n  <p>amigo!</p>\n</body>\n</html>"}, {"code": "$(\"p\").prepend(document.createTextNode(\"Hello \"));", "htmlCode": "$(\"p\").prepend(document.createTextNode(\"Hello \"));", "desc": "Prepends a DOM Element to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>is what I'd say</p>\n  <p>is what I said</p>", "exampleId": "112iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").prepend(document.createTextNode(\"Hello \"));\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>is what I'd say</p>\n  <p>is what I said</p>\n</body>\n</html>"}, {"code": "$(\"p\").prepend( $(\"b\") );", "htmlCode": "$(\"p\").prepend( $(\"b\") );", "desc": "Prepends a jQuery object (similar to an Array of DOM Elements) to all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p> is what was said.</p><b>Hello</b>", "exampleId": "112iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").prepend( $(\"b\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p> is what was said.</p><b>Hello</b>\n</body>\n</html>"}]}, "prependto113": {"id": 113, "searchname": "prependto", "name": "prependTo", "type": "function", "category": "Manipulation", "subcategory": "Inserting Inside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Prepend all of the matched elements to another, specified, set of elements.", "longdesc": "<p>This operation is, essentially, the reverse of doing a regular $(A).prepend(B), in that instead of prepending B to A, you're prepending A to B.</p>", "params": [{"optional": false, "name": "content", "type": "String", "desc": "target to which the content will be prepended."}], "examples": [{"code": "$(\"span\").prependTo(\"#foo\"); // check prepend() examples", "htmlCode": "$(\"span\").prependTo(\"#foo\"); // check prepend() examples", "desc": "Prepends all spans to the element with the ID \"foo\"", "css": "div { background:yellow; }", "inhead": "", "html": "<div id=\"foo\">FOO!</div>\n  <span>I have something to say... </span>", "exampleId": "113iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"span\").prependTo(\"#foo\"); // check prepend() examples\n  });\n</script>\n<style>\ndiv { background:yellow; }\n</style>\n</head>\n<body>\n<div id=\"foo\">FOO!</div>\n  <span>I have something to say... </span>\n</body>\n</html>"}]}, "after114": {"id": 114, "searchname": "after", "name": "after", "type": "function", "category": "Manipulation", "subcategory": "Inserting Outside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Insert content after each of the matched elements.", "longdesc": "", "params": [{"optional": false, "name": "content", "type": "String, Element, jQuery", "desc": "Content to insert after each target."}], "examples": [{"code": "$(\"p\").after(\"<b>Hello</b>\");", "htmlCode": "$(\"p\").after(\"&lt;b&gt;Hello&lt;/b&gt;\");", "desc": "Inserts some HTML after all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>I would like to say: </p>", "exampleId": "114iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").after(\"<b>Hello</b>\");\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>I would like to say: </p>\n</body>\n</html>"}, {"code": "$(\"p\").after( document.createTextNode(\"Hello\") );", "htmlCode": "$(\"p\").after( document.createTextNode(\"Hello\") );", "desc": "Inserts a DOM element after all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p>I would like to say: </p>", "exampleId": "114iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").after( document.createTextNode(\"Hello\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p>I would like to say: </p>\n</body>\n</html>"}, {"code": "$(\"p\").after( $(\"b\") );", "htmlCode": "$(\"p\").after( $(\"b\") );", "desc": "Inserts a jQuery object (similar to an Array of DOM Elements) after all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<b>Hello</b>\n  <p>I would like to say: </p>", "exampleId": "114iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").after( $(\"b\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<b>Hello</b>\n  <p>I would like to say: </p>\n</body>\n</html>"}]}, "before115": {"id": 115, "searchname": "before", "name": "before", "type": "function", "category": "Manipulation", "subcategory": "Inserting Outside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Insert content before each of the matched elements.", "longdesc": "", "params": [{"optional": false, "name": "content", "type": "String, Element, jQuery", "desc": "Content to insert before each target."}], "examples": [{"code": "$(\"p\").before(\"<b>Hello</b>\");", "htmlCode": "$(\"p\").before(\"&lt;b&gt;Hello&lt;/b&gt;\");", "desc": "Inserts some HTML before all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p> is what I said...</p>", "exampleId": "115iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").before(\"<b>Hello</b>\");\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p> is what I said...</p>\n</body>\n</html>"}, {"code": "$(\"p\").before( document.createTextNode(\"Hello\") );", "htmlCode": "$(\"p\").before( document.createTextNode(\"Hello\") );", "desc": "Inserts a DOM element before all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p> is what I said...</p>", "exampleId": "115iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").before( document.createTextNode(\"Hello\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p> is what I said...</p>\n</body>\n</html>"}, {"code": "$(\"p\").before( $(\"b\") );", "htmlCode": "$(\"p\").before( $(\"b\") );", "desc": "Inserts a jQuery object (similar to an Array of DOM Elements) before all paragraphs.", "css": "p { background:yellow; }", "inhead": "", "html": "<p> is what I said...</p><b>Hello</b>", "exampleId": "115iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").before( $(\"b\") );\n  });\n</script>\n<style>\np { background:yellow; }\n</style>\n</head>\n<body>\n<p> is what I said...</p><b>Hello</b>\n</body>\n</html>"}]}, "insertafter116": {"id": 116, "searchname": "insertafter", "name": "insertAfter", "type": "function", "category": "Manipulation", "subcategory": "Inserting Outside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Insert all of the matched elements after another, specified, set of elements.", "longdesc": "<p>This operation is, essentially, the reverse of doing a regular $(A).after(B), in that instead of inserting B after A, you're inserting A after B.</p>", "params": [{"optional": false, "name": "content", "type": "String", "desc": "Content after which the selected element(s) is inserted."}], "examples": [{"code": "$(\"p\").insertAfter(\"#foo\"); // check after() examples", "htmlCode": "$(\"p\").insertAfter(\"#foo\"); // check after() examples", "desc": "Inserts all paragraphs after an element with id of \"foo\". Same as $(\"#foo\").after(\"p\")", "css": "#foo { background:yellow; }", "inhead": "", "html": "<p> is what I said... </p><div id=\"foo\">FOO!</div>", "exampleId": "116iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").insertAfter(\"#foo\"); // check after() examples\n  });\n</script>\n<style>\n#foo { background:yellow; }\n</style>\n</head>\n<body>\n<p> is what I said... </p><div id=\"foo\">FOO!</div>\n</body>\n</html>"}]}, "insertbefore117": {"id": 117, "searchname": "insertbefore", "name": "insertBefore", "type": "function", "category": "Manipulation", "subcategory": "Inserting Outside", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Insert all of the matched elements before another, specified, set of elements.", "longdesc": "<p>This operation is, essentially, the reverse of doing a regular $(A).before(B), in that instead of inserting B before A, you're inserting A before B.</p>", "params": [{"optional": false, "name": "content", "type": "String", "desc": "Content after which the selected element(s) is inserted."}], "examples": [{"code": "$(\"p\").insertBefore(\"#foo\"); // check before() examples", "htmlCode": "$(\"p\").insertBefore(\"#foo\"); // check before() examples", "desc": "Inserts all paragraphs before an element with id of \"foo\". Same as $(\"#foo\").before(\"p\")", "css": "#foo { background:yellow; }", "inhead": "", "html": "<div id=\"foo\">FOO!</div><p>I would like to say: </p>", "exampleId": "117iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").insertBefore(\"#foo\"); // check before() examples\n  });\n</script>\n<style>\n#foo { background:yellow; }\n</style>\n</head>\n<body>\n<div id=\"foo\">FOO!</div><p>I would like to say: </p>\n</body>\n</html>"}]}, "wrap118": {"id": 118, "searchname": "wrap", "name": "wrap", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "", "sample": "", "desc": "Wrap each matched element with the specified HTML content.", "longdesc": "<p>This wrapping process is most useful for injecting additional structure into a document, without ruining the original semantic qualities of a document.</p><p>This works by going through the first element provided (which is generated, on the fly, from the provided HTML) and finds the deepest ancestor element within its structure -- it is that element that will enwrap everything else.</p>", "params": [{"optional": false, "name": "html", "type": "String", "desc": "A string of HTML that will be created on the fly and wrapped around each target."}], "examples": [{"code": "$(\"p\").wrap(\"<div></div>\");", "htmlCode": "$(\"p\").wrap(\"&lt;div&gt;&lt;/div&gt;\");", "desc": "Wrap a new div around all of the paragraphs.", "css": "\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "118iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrap(\"<div></div>\");\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"span\").wrap(\"<div><div><p><em><b></b></em></p></div></div>\");", "htmlCode": "$(\"span\").wrap(\"&lt;div&gt;&lt;div&gt;&lt;p&gt;&lt;em&gt;&lt;b&gt;&lt;/b&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;\");", "desc": "Wraps a newly created tree of objects around the spans.  Notice anything in between the spans gets left out like the &lt;strong&gt; (red text) in this example.  Even the white space between spans is left out.  Click View Source to see the original html.", "css": "\n  div { border:2px blue solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  strong { color:red; }\n  ", "inhead": "", "html": "<span>Span Text</span>\n  <strong>What about me?</strong>\n  <span>Another One</span>", "exampleId": "118iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"span\").wrap(\"<div><div><p><em><b></b></em></p></div></div>\");\n  });\n</script>\n<style>\n\n  div { border:2px blue solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  strong { color:red; }\n  \n</style>\n</head>\n<body>\n<span>Span Text</span>\n  <strong>What about me?</strong>\n  <span>Another One</span>\n</body>\n</html>"}]}, "wrap119": {"id": 119, "searchname": "wrap", "name": "wrap", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Wrap each matched element with the specified element.", "longdesc": "", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "A DOM element that will be wrapped around each target."}], "examples": [{"code": "$(\"p\").wrap(document.createElement(\"div\"));", "htmlCode": "$(\"p\").wrap(document.createElement(\"div\"));", "desc": "Wrap a new div around all of the paragraphs.", "css": "\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "119iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrap(document.createElement(\"div\"));\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"p\").wrap($(\".doublediv\"));", "htmlCode": "$(\"p\").wrap($(\".doublediv\"));", "desc": "Wrap a jQuery object double depth div around all of the paragraphs.  Notice it doesn't move the object but just clones it to wrap around its target.", "css": "\n  div { border: 2px solid blue; margin:2px; padding:2px; }\n  .doublediv { border-color:red; }\n  p { background:yellow; margin:4px; font-size:14px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div class=\"doublediv\"><div></div></div>", "exampleId": "119iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrap($(\".doublediv\"));\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; margin:2px; padding:2px; }\n  .doublediv { border-color:red; }\n  p { background:yellow; margin:4px; font-size:14px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div class=\"doublediv\"><div></div></div>\n</body>\n</html>"}]}, "wrapall120": {"id": 120, "searchname": "wrapall", "name": "wrapAll", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Wrap all the elements in the matched set into a single wrapper element.", "longdesc": "<p>This is different from <a href='Manipulation/wrap'>.wrap()</a> where each element in the matched set would get wrapped with an element.</p><p>This wrapping process is most useful for injecting additional structure into a document, without ruining the original semantic qualities of a document.</p><p>This works by going through the first element provided (which is generated, on the fly, from the provided HTML) and finds the deepest ancestor element within its structure -- it is that element that will enwrap everything else.</p>", "params": [{"optional": false, "name": "html", "type": "String", "desc": "A string of HTML that will be created on the fly and wrapped around the target."}], "examples": [{"code": "$(\"p\").wrapAll(\"<div></div>\");", "htmlCode": "$(\"p\").wrapAll(\"&lt;div&gt;&lt;/div&gt;\");", "desc": "Wrap a new div around all of the paragraphs.", "css": "\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "120iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapAll(\"<div></div>\");\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"span\").wrapAll(\"<div><div><p><em><b></b></em></p></div></div>\");", "htmlCode": "$(\"span\").wrapAll(\"&lt;div&gt;&lt;div&gt;&lt;p&gt;&lt;em&gt;&lt;b&gt;&lt;/b&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;\");", "desc": "Wraps a newly created tree of objects around the spans.  Notice anything in between the spans gets left out like the &lt;strong&gt; (red text) in this example.  Even the white space between spans is left out.  Click View Source to see the original html.", "css": "\n  div { border:2px blue solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  strong { color:red; }\n  ", "inhead": "", "html": "<span>Span Text</span>\n  <strong>What about me?</strong>\n  <span>Another One</span>", "exampleId": "120iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"span\").wrapAll(\"<div><div><p><em><b></b></em></p></div></div>\");\n  });\n</script>\n<style>\n\n  div { border:2px blue solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  strong { color:red; }\n  \n</style>\n</head>\n<body>\n<span>Span Text</span>\n  <strong>What about me?</strong>\n  <span>Another One</span>\n</body>\n</html>"}]}, "wrapall121": {"id": 121, "searchname": "wrapall", "name": "wrapAll", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Wrap all the elements in the matched set into a single wrapper element.", "longdesc": "<p>This is different from <a href='Manipulation/wrap'>.wrap()</a> where each element in the matched set would get wrapped with an element.</p>", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "A DOM element that will be wrapped around the target."}], "examples": [{"code": "$(\"p\").wrapAll(document.createElement(\"div\"));", "htmlCode": "$(\"p\").wrapAll(document.createElement(\"div\"));", "desc": "Wrap a new div around all of the paragraphs.", "css": "\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "121iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapAll(document.createElement(\"div\"));\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; }\n  p { background:yellow; margin:4px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"p\").wrapAll($(\".doublediv\"));", "htmlCode": "$(\"p\").wrapAll($(\".doublediv\"));", "desc": "Wrap a jQuery object double depth div around all of the paragraphs.  Notice it doesn't move the object but just clones it to wrap around its target.", "css": "\n  div { border: 2px solid blue; margin:2px; padding:2px; }\n  .doublediv { border-color:red; }\n  p { background:yellow; margin:4px; font-size:14px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div class=\"doublediv\"><div></div></div>", "exampleId": "121iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapAll($(\".doublediv\"));\n  });\n</script>\n<style>\n\n  div { border: 2px solid blue; margin:2px; padding:2px; }\n  .doublediv { border-color:red; }\n  p { background:yellow; margin:4px; font-size:14px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div class=\"doublediv\"><div></div></div>\n</body>\n</html>"}]}, "wrapinner122": {"id": 122, "searchname": "wrapinner", "name": "wrapInner", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Wrap the inner child contents of each matched element (including text nodes) with an HTML structure.", "longdesc": "<p>This wrapping process is most useful for injecting additional structure into a document, without ruining the original semantic qualities of a document.</p><p>This works by going through the first element provided (which is generated, on the fly, from the provided HTML) and finds the deepest ancestor element within its structure -- it is that element that will enwrap everything else.</p>", "params": [{"optional": false, "name": "html", "type": "String", "desc": "A string of HTML that will be created on the fly and wrapped around the target."}], "examples": [{"code": "$(\"p\").wrapInner(\"<b></b>\");", "htmlCode": "$(\"p\").wrapInner(\"&lt;b&gt;&lt;/b&gt;\");", "desc": "Selects all paragraphs and wraps a bold tag around each of its contents.", "css": "p { background:#bbf; }", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "122iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapInner(\"<b></b>\");\n  });\n</script>\n<style>\np { background:#bbf; }\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"body\").wrapInner(\"<div><div><p><em><b></b></em></p></div></div>\");", "htmlCode": "$(\"body\").wrapInner(\"&lt;div&gt;&lt;div&gt;&lt;p&gt;&lt;em&gt;&lt;b&gt;&lt;/b&gt;&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;\");", "desc": "Wraps a newly created tree of objects around the inside of the body.", "css": "\n  div { border:2px green solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  ", "inhead": "", "html": "Plain old text, or is it?", "exampleId": "122iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"body\").wrapInner(\"<div><div><p><em><b></b></em></p></div></div>\");\n  });\n</script>\n<style>\n\n  div { border:2px green solid; margin:2px; padding:2px; }\n  p { background:yellow; margin:2px; padding:2px; }\n  \n</style>\n</head>\n<body>\nPlain old text, or is it?\n</body>\n</html>"}]}, "wrapinner123": {"id": 123, "searchname": "wrapinner", "name": "wrapInner", "type": "function", "category": "Manipulation", "subcategory": "Inserting Around", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Wrap the inner child contents of each matched element (including text nodes) with a DOM element.", "longdesc": "", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "A DOM element that will be wrapped around the target."}], "examples": [{"code": "$(\"p\").wrapInner(document.createElement(\"b\"));", "htmlCode": "$(\"p\").wrapInner(document.createElement(\"b\"));", "desc": "Selects all paragraphs and wraps a bold tag around each of its contents.", "css": "p { background:#9f9; }", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "123iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapInner(document.createElement(\"b\"));\n  });\n</script>\n<style>\np { background:#9f9; }\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"p\").wrapInner($(\"<span class='red'></span>\"));", "htmlCode": "$(\"p\").wrapInner($(\"&lt;span class='red'&gt;&lt;/span&gt;\"));", "desc": "Selects all paragraphs and wraps a jQuery object around each of its contents.", "css": "\n  p { background:#9f9; }\n  .red { color:red; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "123iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").wrapInner($(\"<span class='red'></span>\"));\n  });\n</script>\n<style>\n\n  p { background:#9f9; }\n  .red { color:red; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}]}, "replacewith124": {"id": 124, "searchname": "replacewith", "name": "replaceWith", "type": "function", "category": "Manipulation", "subcategory": "Replacing", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Replaces all matched elements with the specified HTML or DOM elements.", "longdesc": "", "params": [{"optional": false, "name": "content", "type": "String, Element, jQuery", "desc": "Content to replace the matched elements with."}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(this).replaceWith(\"<div>\" + $(this).text() + \"</div>\");\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(this).replaceWith(\"&lt;div&gt;\" + $(this).text() + \"&lt;/div&gt;\");\n    });\n", "desc": "On click, replace the button with a div containing the same word.", "css": "\n  button { display:block; margin:3px; color:red; width:200px; }\n  div { color:red; border:2px solid blue; width:200px; \n        margin:3px; text-align:center; }\n  ", "inhead": "", "html": "<button>First</button>\n  <button>Second</button>\n  <button>Third</button>", "exampleId": "124iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(this).replaceWith(\"<div>\" + $(this).text() + \"</div>\");\n    });\n\n  });\n</script>\n<style>\n\n  button { display:block; margin:3px; color:red; width:200px; }\n  div { color:red; border:2px solid blue; width:200px; \n        margin:3px; text-align:center; }\n  \n</style>\n</head>\n<body>\n<button>First</button>\n  <button>Second</button>\n  <button>Third</button>\n</body>\n</html>"}, {"code": "$(\"p\").replaceWith(\"<b>Paragraph. </b>\");", "htmlCode": "$(\"p\").replaceWith(\"&lt;b&gt;Paragraph. &lt;/b&gt;\");", "desc": "Replace all the paragraphs with bold words.", "css": "", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "124iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").replaceWith(\"<b>Paragraph. </b>\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "$(\"p\").replaceWith(document.createElement(\"div\"));", "htmlCode": "$(\"p\").replaceWith(document.createElement(\"div\"));", "desc": "Replace all the paragraphs with empty div elements.", "css": "\n  div { border:2px solid blue; margin:3px; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "124iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").replaceWith(document.createElement(\"div\"));\n  });\n</script>\n<style>\n\n  div { border:2px solid blue; margin:3px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}, {"code": "\n    $(\"p\").click(function () {\n      $(this).replaceWith($(\"div\"));\n    });\n", "htmlCode": "\n    $(\"p\").click(function () {\n      $(this).replaceWith($(\"div\"));\n    });\n", "desc": "On click, replace each paragraph with a jQuery div object that is already in the DOM.  Notice it doesn't clone the object but rather moves it to replace the paragraph.", "css": "\n  div { border:2px solid blue; color:red; margin:3px; }\n  p { border:2px solid red; color:blue; margin:3px; cursor:pointer; }\n  ", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div>Replaced!</div>", "exampleId": "124iframeExample3", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () {\n      $(this).replaceWith($(\"div\"));\n    });\n\n  });\n</script>\n<style>\n\n  div { border:2px solid blue; color:red; margin:3px; }\n  p { border:2px solid red; color:blue; margin:3px; cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n  <div>Replaced!</div>\n</body>\n</html>"}]}, "replaceall125": {"id": 125, "searchname": "replaceall", "name": "replaceAll", "type": "function", "category": "Manipulation", "subcategory": "Replacing", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Replaces the elements matched by the specified selector with the matched elements.", "longdesc": "<p>This function is the complement to replaceWith() which does the same task with the parameters reversed.</p>", "params": [{"optional": false, "name": "selector", "type": "Selector", "desc": "The elements to find and replace the matched elements with."}], "examples": [{"code": "$(\"<b>Paragraph. </b>\").replaceAll(\"p\"); // check replaceWith() examples", "htmlCode": "$(\"&lt;b&gt;Paragraph. &lt;/b&gt;\").replaceAll(\"p\"); // check replaceWith() examples", "desc": "Replace all the paragraphs with bold words.", "css": "", "inhead": "", "html": "<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>", "exampleId": "125iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"<b>Paragraph. </b>\").replaceAll(\"p\"); // check replaceWith() examples\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <p>cruel</p>\n  <p>World</p>\n</body>\n</html>"}]}, "empty126": {"id": 126, "searchname": "empty", "name": "empty", "type": "function", "category": "Manipulation", "subcategory": "Removing", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Remove all child nodes from the set of matched elements.", "longdesc": "<p>Note that this function starting with 1.2.2 will also remove all event handlers and internally cached data.</p>", "params": [], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").empty();\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").empty();\n    });\n", "desc": "Removes all child nodes (including text nodes) from all paragraphs", "css": "\n  p { background:yellow; }\n  ", "inhead": "", "html": "<p>\n    Hello, <span>Person</span> <a href=\"javascript:;\">and person</a>\n  </p>\n  <button>Call empty() on above paragraph</button>", "exampleId": "126iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").empty();\n    });\n\n  });\n</script>\n<style>\n\n  p { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>\n    Hello, <span>Person</span> <a href=\"javascript:;\">and person</a>\n  </p>\n  <button>Call empty() on above paragraph</button>\n</body>\n</html>"}]}, "remove127": {"id": 127, "searchname": "remove", "name": "remove", "type": "function", "category": "Manipulation", "subcategory": "Removing", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Removes all matched elements from the DOM. ", "longdesc": "<p>This does NOT remove them from the jQuery object, allowing you to use the matched elements further.  Note that this function starting with 1.2.2 will also remove all event handlers and internally cached data.  So:</p><p><code>\n$(\"#foo\").remove().appendTo(\"#bar\");\n</code></p><p>should be written as</p><p><code>\n$(\"#foo\").appendTo(\"#bar\");\n</code></p><p>to avoid losing the event handlers.</p><p>Can be filtered with an optional expression.</p>", "params": [{"optional": true, "name": "expr", "type": "String", "desc": "A jQuery expression to filter the set of elements to be removed."}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").remove();\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").remove();\n    });\n", "desc": "Removes all paragraphs from the DOM", "css": "p { background:yellow; margin:6px 0; }", "inhead": "", "html": "<p>Hello</p> \n  how are \n  <p>you?</p>\n  <button>Call remove() on paragraphs", "exampleId": "127iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").remove();\n    });\n\n  });\n</script>\n<style>\np { background:yellow; margin:6px 0; }\n</style>\n</head>\n<body>\n<p>Hello</p> \n  how are \n  <p>you?</p>\n  <button>Call remove() on paragraphs\n</body>\n</html>"}, {"code": "\n    $(\"button\").click(function () {\n      $(\"p\").remove(\":contains('Hello')\");\n    });\n\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").remove(\":contains('Hello')\");\n    });\n\n", "desc": "Removes all paragraphs that contain \"Hello\" from the DOM", "css": "p { background:yellow; margin:6px 0; }", "inhead": "", "html": "<p class=\"hello\">Hello</p>\n  how are \n  <p>you?</p>\n  <button>Call remove(\":contains('Hello')\") on paragraphs", "exampleId": "127iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").remove(\":contains('Hello')\");\n    });\n\n\n  });\n</script>\n<style>\np { background:yellow; margin:6px 0; }\n</style>\n</head>\n<body>\n<p class=\"hello\">Hello</p>\n  how are \n  <p>you?</p>\n  <button>Call remove(\":contains('Hello')\") on paragraphs\n</body>\n</html>"}]}, "clone128": {"id": 128, "searchname": "clone", "name": "clone", "type": "function", "category": "Manipulation", "subcategory": "Copying", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Clone matched DOM Elements and select the clones.", "longdesc": "<p>This is useful for moving copies of the elements to another location in the DOM.</p>", "params": [], "examples": [{"code": "$(\"b\").clone().prependTo(\"p\");", "htmlCode": "$(\"b\").clone().prependTo(\"p\");", "desc": "Clones all b elements (and selects the clones) and prepends them to all paragraphs.", "css": "", "inhead": "", "html": "<b>Hello</b><p>, how are you?</p>", "exampleId": "128iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"b\").clone().prependTo(\"p\");\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<b>Hello</b><p>, how are you?</p>\n</body>\n</html>"}]}, "clone129": {"id": 129, "searchname": "clone", "name": "clone", "type": "function", "category": "Manipulation", "subcategory": "Copying", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Clone matched DOM Elements, and all their event handlers, and select the clones.", "longdesc": "<p>This is useful for moving copies of the elements, and their events, to another location in the DOM.</p>", "params": [{"optional": false, "name": "true", "type": "Boolean", "desc": "Set to true to enable cloning of event handlers."}], "examples": [{"code": "\n    $(\"button\").click(function(){\n      $(this).clone(true).insertAfter(this);\n    });\n", "htmlCode": "\n    $(\"button\").click(function(){\n      $(this).clone(true).insertAfter(this);\n    });\n", "desc": "Create a button that's able to clone itself - and have the clones themselves be clonable.", "css": "", "inhead": "", "html": "<button>Clone Me!</button>", "exampleId": "129iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function(){\n      $(this).clone(true).insertAfter(this);\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<button>Clone Me!</button>\n</body>\n</html>"}]}, "css130": {"id": 130, "searchname": "css", "name": "css", "type": "function", "category": "CSS", "subcategory": "CSS", "return": "String", "added": "1.0", "sample": "", "desc": "Return a style property on the first matched element.", "longdesc": "", "params": [{"optional": false, "name": "name", "type": "String", "desc": "The name of the property to access."}], "examples": [{"code": "\n    $(\"div\").click(function () {\n      var color = $(this).css(\"background-color\");\n      $(\"#result\").html(\"That div is <span style='color:\" +\n                         color + \";'>\" + color + \"</span>.\");\n    });\n", "htmlCode": "\n    $(\"div\").click(function () {\n      var color = $(this).css(\"background-color\");\n      $(\"#result\").html(\"That div is &lt;span style='color:\" +\n                         color + \";'&gt;\" + color + \"&lt;/span&gt;.\");\n    });\n", "desc": "To access the background color of a clicked div.", "css": "\n  div { width:60px; height:60px; margin:5px; float:left; }\n  ", "inhead": "", "html": "<span id=\"result\">&nbsp;</span>\n  <div style=\"background-color:blue;\"></div>\n  <div style=\"background-color:rgb(15,99,30);\"></div>\n  <div style=\"background-color:#123456;\"></div>\n  <div style=\"background-color:#f11;\"></div>", "exampleId": "130iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").click(function () {\n      var color = $(this).css(\"background-color\");\n      $(\"#result\").html(\"That div is <span style='color:\" +\n                         color + \";'>\" + color + \"</span>.\");\n    });\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:5px; float:left; }\n  \n</style>\n</head>\n<body>\n<span id=\"result\">&nbsp;</span>\n  <div style=\"background-color:blue;\"></div>\n  <div style=\"background-color:rgb(15,99,30);\"></div>\n  <div style=\"background-color:#123456;\"></div>\n  <div style=\"background-color:#f11;\"></div>\n</body>\n</html>"}]}, "css131": {"id": 131, "searchname": "css", "name": "css", "type": "function", "category": "CSS", "subcategory": "CSS", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Set a key/value object as style properties to all matched elements.", "longdesc": "<p>This is the best way to set several style properties on all matched elements.</p>", "params": [{"optional": false, "name": "properties", "type": "Map", "desc": "Key/value pairs to set as style properties."}], "examples": [{"code": "\n    $(\"p\").hover(function () {\n      $(this).css({ backgroundColor:\"yellow\", fontWeight:\"bolder\" });\n    }, function () {\n      var cssObj = {\n        backgroundColor: \"#ddd\",\n        fontWeight: \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n", "htmlCode": "\n    $(\"p\").hover(function () {\n      $(this).css({ backgroundColor:\"yellow\", fontWeight:\"bolder\" });\n    }, function () {\n      var cssObj = {\n        backgroundColor: \"#ddd\",\n        fontWeight: \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n", "desc": "To set the color of all paragraphs to red and background to blue:", "css": "\n  p { color:green; }\n  ", "inhead": "", "html": "<p>\n    Move the mouse over a paragraph.\n  </p>\n  <p>\n    Like this one or the one above.\n  </p>", "exampleId": "131iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").hover(function () {\n      $(this).css({ backgroundColor:\"yellow\", fontWeight:\"bolder\" });\n    }, function () {\n      var cssObj = {\n        backgroundColor: \"#ddd\",\n        fontWeight: \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n\n  });\n</script>\n<style>\n\n  p { color:green; }\n  \n</style>\n</head>\n<body>\n<p>\n    Move the mouse over a paragraph.\n  </p>\n  <p>\n    Like this one or the one above.\n  </p>\n</body>\n</html>"}, {"code": "\n    $(\"p\").hover(function () {\n      $(this).css({ \"background-color\":\"yellow\", \"font-weight\":\"bolder\" });\n    }, function () {\n      var cssObj = {\n        \"background-color\": \"#ddd\",\n        \"font-weight\": \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n", "htmlCode": "\n    $(\"p\").hover(function () {\n      $(this).css({ \"background-color\":\"yellow\", \"font-weight\":\"bolder\" });\n    }, function () {\n      var cssObj = {\n        \"background-color\": \"#ddd\",\n        \"font-weight\": \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n", "desc": "If the property name includes a \"-\", put it between quotation marks:", "css": "\n  p { color:green; }\n  ", "inhead": "", "html": "<p>\n    Move the mouse over a paragraph.\n  </p>\n  <p>\n    Like this one or the one above.\n  </p>", "exampleId": "131iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").hover(function () {\n      $(this).css({ \"background-color\":\"yellow\", \"font-weight\":\"bolder\" });\n    }, function () {\n      var cssObj = {\n        \"background-color\": \"#ddd\",\n        \"font-weight\": \"\",\n        color: \"rgb(0,40,244)\"\n      }\n      $(this).css(cssObj);\n    });\n\n  });\n</script>\n<style>\n\n  p { color:green; }\n  \n</style>\n</head>\n<body>\n<p>\n    Move the mouse over a paragraph.\n  </p>\n  <p>\n    Like this one or the one above.\n  </p>\n</body>\n</html>"}]}, "css132": {"id": 132, "searchname": "css", "name": "css", "type": "function", "category": "CSS", "subcategory": "CSS", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Set a single style property to a value on all matched elements.", "longdesc": "<p>If a number is provided, it is automatically converted into a pixel value.</p>", "params": [{"optional": false, "name": "name", "type": "String", "desc": "The name of the property to set."}, {"optional": false, "name": "value", "type": "String, Number", "desc": "The value to set the property to."}], "examples": [{"code": "\n    $(\"p\").mouseover(function () {\n      $(this).css(\"color\",\"red\");\n    });\n", "htmlCode": "\n    $(\"p\").mouseover(function () {\n      $(this).css(\"color\",\"red\");\n    });\n", "desc": "To change the color of any paragraph to red on mouseover event.", "css": "\n  p { color:blue; width:200px; font-size:14px; }\n  ", "inhead": "", "html": "<p>\n    Just roll the mouse over me.\n  </p>\n  <p>\n    Or me to see a color change.\n  </p>", "exampleId": "132iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").mouseover(function () {\n      $(this).css(\"color\",\"red\");\n    });\n\n  });\n</script>\n<style>\n\n  p { color:blue; width:200px; font-size:14px; }\n  \n</style>\n</head>\n<body>\n<p>\n    Just roll the mouse over me.\n  </p>\n  <p>\n    Or me to see a color change.\n  </p>\n</body>\n</html>"}, {"code": "\n    var words = $(\"p:first\").text().split(\" \");\n    var text = words.join(\"</span> <span>\");\n    $(\"p:first\").html(\"<span>\" + text + \"</span>\");\n    $(\"span\").click(function () {\n      $(this).css(\"background-color\",\"yellow\");\n    });\n", "htmlCode": "\n    var words = $(\"p:first\").text().split(\" \");\n    var text = words.join(\"&lt;/span&gt; &lt;span&gt;\");\n    $(\"p:first\").html(\"&lt;span&gt;\" + text + \"&lt;/span&gt;\");\n    $(\"span\").click(function () {\n      $(this).css(\"background-color\",\"yellow\");\n    });\n", "desc": "To highlight a clicked word in the paragraph.", "css": "\n  p { color:blue; font-weight:bold; cursor:pointer; }\n  ", "inhead": "", "html": "<p>\n    Once upon a time there was a man\n    who lived in a pizza parlor. This\n    man just loved pizza and ate it all \n    the time.  He went on to be the\n    happiest man in the world.  The end.\n  </p>", "exampleId": "132iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var words = $(\"p:first\").text().split(\" \");\n    var text = words.join(\"</span> <span>\");\n    $(\"p:first\").html(\"<span>\" + text + \"</span>\");\n    $(\"span\").click(function () {\n      $(this).css(\"background-color\",\"yellow\");\n    });\n\n  });\n</script>\n<style>\n\n  p { color:blue; font-weight:bold; cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<p>\n    Once upon a time there was a man\n    who lived in a pizza parlor. This\n    man just loved pizza and ate it all \n    the time.  He went on to be the\n    happiest man in the world.  The end.\n  </p>\n</body>\n</html>"}]}, "offset133": {"id": 133, "searchname": "offset", "name": "offset", "type": "function", "category": "CSS", "subcategory": "Positioning", "return": "Object{top,left}", "added": "1.2", "sample": "", "desc": "Get the current offset of the first matched element relative to the viewport.", "longdesc": "<p>The returned object contains two <a href='Types#Integer'>Integer</a> properties, top and left. The method works only with visible elements. </p>", "params": [], "examples": [{"code": "var p = $(\"p:last\");\nvar offset = p.offset();\np.html( \"left: \" + offset.left + \", top: \" + offset.top );", "htmlCode": "var p = $(\"p:last\");\nvar offset = p.offset();\np.html( \"left: \" + offset.left + \", top: \" + offset.top );", "desc": "Access the offset of the second paragraph:", "css": "\n  p { margin-left:10px; }\n  ", "inhead": "", "html": "<p>Hello</p><p>2nd Paragraph</p>", "exampleId": "133iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\nvar p = $(\"p:last\");\nvar offset = p.offset();\np.html( \"left: \" + offset.left + \", top: \" + offset.top );\n  });\n</script>\n<style>\n\n  p { margin-left:10px; }\n  \n</style>\n</head>\n<body>\n<p>Hello</p><p>2nd Paragraph</p>\n</body>\n</html>"}, {"code": "\n    $(\"*\", document.body).click(function (e) {\n      var offset = $(this).offset();\n      e.stopPropagation();\n      $(\"#result\").text(this.tagName + \" coords ( \" + offset.left + \", \" +\n                                      offset.top + \" )\");\n    });\n", "htmlCode": "\n    $(\"*\", document.body).click(function (e) {\n      var offset = $(this).offset();\n      e.stopPropagation();\n      $(\"#result\").text(this.tagName + \" coords ( \" + offset.left + \", \" +\n                                      offset.top + \" )\");\n    });\n", "desc": "Click to see the offset.", "css": "\n  p { margin-left:10px; color:blue; width:200px; \n      cursor:pointer; }\n  span { color:red; cursor:pointer; }\n  div.abs { width:50px; height:50px; position:absolute;\n            left:220px; top:35px; background-color:green; \n            cursor:pointer; }\n  ", "inhead": "", "html": "<div id=\"result\">Click an element.</div>\n  <p>\n    This is the best way to <span>find</span> an offset.\n  </p>\n  <div class=\"abs\">\n  </dov>\n  ", "exampleId": "133iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"*\", document.body).click(function (e) {\n      var offset = $(this).offset();\n      e.stopPropagation();\n      $(\"#result\").text(this.tagName + \" coords ( \" + offset.left + \", \" +\n                                      offset.top + \" )\");\n    });\n\n  });\n</script>\n<style>\n\n  p { margin-left:10px; color:blue; width:200px; \n      cursor:pointer; }\n  span { color:red; cursor:pointer; }\n  div.abs { width:50px; height:50px; position:absolute;\n            left:220px; top:35px; background-color:green; \n            cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<div id=\"result\">Click an element.</div>\n  <p>\n    This is the best way to <span>find</span> an offset.\n  </p>\n  <div class=\"abs\">\n  </dov>\n  \n</body>\n</html>"}]}, "height134": {"id": 134, "searchname": "height", "name": "height", "type": "function", "category": "CSS", "subcategory": "Height and Width", "return": "Integer", "added": "1.0", "sample": "", "desc": "Get the current computed, pixel, height of the first matched element.", "longdesc": "<p>In jQuery 1.2, this method is able to find the height of the window and document.</p>", "params": [], "examples": [{"code": "\n    function showHeight(ele, h) {\n      $(\"div\").text(\"The height for the \" + ele + \n                    \" is \" + h + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showHeight(\"paragraph\", $(\"p\").height()); \n    });\n    $(\"#getd\").click(function () { \n      showHeight(\"document\", $(document).height()); \n    });\n    $(\"#getw\").click(function () { \n      showHeight(\"window\", $(window).height()); \n    });\n", "htmlCode": "\n    function showHeight(ele, h) {\n      $(\"div\").text(\"The height for the \" + ele + \n                    \" is \" + h + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showHeight(\"paragraph\", $(\"p\").height()); \n    });\n    $(\"#getd\").click(function () { \n      showHeight(\"document\", $(document).height()); \n    });\n    $(\"#getw\").click(function () { \n      showHeight(\"window\", $(window).height()); \n    });\n", "desc": "Show various heights.  Note the values are from the iframe so might be smaller than you expected.  The yellow highlight shows the iframe body.", "css": "\n  body { background:yellow; }\n  button { font-size:12px; margin:2px; }\n  p { width:150px; border:1px red solid; }\n  div { color:red; font-weight:bold; }\n  ", "inhead": "", "html": "<button id=\"getp\">Get Paragraph Height</button>\n  <button id=\"getd\">Get Document Height</button>\n  <button id=\"getw\">Get Window Height</button>\n  <div>&nbsp;</div>\n  <p>\n    Sample paragraph to test height\n  </p>", "exampleId": "134iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function showHeight(ele, h) {\n      $(\"div\").text(\"The height for the \" + ele + \n                    \" is \" + h + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showHeight(\"paragraph\", $(\"p\").height()); \n    });\n    $(\"#getd\").click(function () { \n      showHeight(\"document\", $(document).height()); \n    });\n    $(\"#getw\").click(function () { \n      showHeight(\"window\", $(window).height()); \n    });\n\n  });\n</script>\n<style>\n\n  body { background:yellow; }\n  button { font-size:12px; margin:2px; }\n  p { width:150px; border:1px red solid; }\n  div { color:red; font-weight:bold; }\n  \n</style>\n</head>\n<body>\n<button id=\"getp\">Get Paragraph Height</button>\n  <button id=\"getd\">Get Document Height</button>\n  <button id=\"getw\">Get Window Height</button>\n  <div>&nbsp;</div>\n  <p>\n    Sample paragraph to test height\n  </p>\n</body>\n</html>"}]}, "height135": {"id": 135, "searchname": "height", "name": "height", "type": "function", "category": "CSS", "subcategory": "Height and Width", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Set the CSS height of every matched element.", "longdesc": "<p>If no explicit unit was specified (like 'em' or '%') then \"px\" is concatenated to the value.</p>", "params": [{"optional": false, "name": "val", "type": "String, Number", "desc": "Set the CSS 'height' property to the specified value."}], "examples": [{"code": "\n    $(\"div\").one('click', function () {\n      $(this).height(30)\n             .css({cursor:\"auto\", backgroundColor:\"green\"});\n    });\n", "htmlCode": "\n    $(\"div\").one('click', function () {\n      $(this).height(30)\n             .css({cursor:\"auto\", backgroundColor:\"green\"});\n    });\n", "desc": "To set the height of each div on click to 30px plus a color change.", "css": "\n  div { width:50px; height:70px; float:left; margin:5px;\n        background:rgb(255,140,0); cursor:pointer; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "135iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").one('click', function () {\n      $(this).height(30)\n             .css({cursor:\"auto\", backgroundColor:\"green\"});\n    });\n\n  });\n</script>\n<style>\n\n  div { width:50px; height:70px; float:left; margin:5px;\n        background:rgb(255,140,0); cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}]}, "width136": {"id": 136, "searchname": "width", "name": "width", "type": "function", "category": "CSS", "subcategory": "Height and Width", "return": "Integer", "added": "1.0", "sample": "", "desc": "Get the current computed, pixel, width of the first matched element.", "longdesc": "<p>In jQuery 1.2, this method is able to find the width of the window and document.</p>", "params": [], "examples": [{"code": "\n    function showWidth(ele, w) {\n      $(\"div\").text(\"The width for the \" + ele + \n                    \" is \" + w + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showWidth(\"paragraph\", $(\"p\").width()); \n    });\n    $(\"#getd\").click(function () { \n      showWidth(\"document\", $(document).width()); \n    });\n    $(\"#getw\").click(function () { \n      showWidth(\"window\", $(window).width()); \n    });\n", "htmlCode": "\n    function showWidth(ele, w) {\n      $(\"div\").text(\"The width for the \" + ele + \n                    \" is \" + w + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showWidth(\"paragraph\", $(\"p\").width()); \n    });\n    $(\"#getd\").click(function () { \n      showWidth(\"document\", $(document).width()); \n    });\n    $(\"#getw\").click(function () { \n      showWidth(\"window\", $(window).width()); \n    });\n", "desc": "Show various widths.  Note the values are from the iframe so might be smaller than you expected.  The yellow highlight shows the iframe body.", "css": "\n  body { background:yellow; }\n  button { font-size:12px; margin:2px; }\n  p { width:150px; border:1px red solid; }\n  div { color:red; font-weight:bold;  }\n  ", "inhead": "", "html": "<button id=\"getp\">Get Paragraph Width</button>\n  <button id=\"getd\">Get Document Width</button>\n  <button id=\"getw\">Get Window Width</button>\n  <div>&nbsp;</div>\n  <p>\n    Sample paragraph to test width\n  </p>", "exampleId": "136iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function showWidth(ele, w) {\n      $(\"div\").text(\"The width for the \" + ele + \n                    \" is \" + w + \"px.\");\n    }\n    $(\"#getp\").click(function () { \n      showWidth(\"paragraph\", $(\"p\").width()); \n    });\n    $(\"#getd\").click(function () { \n      showWidth(\"document\", $(document).width()); \n    });\n    $(\"#getw\").click(function () { \n      showWidth(\"window\", $(window).width()); \n    });\n\n  });\n</script>\n<style>\n\n  body { background:yellow; }\n  button { font-size:12px; margin:2px; }\n  p { width:150px; border:1px red solid; }\n  div { color:red; font-weight:bold;  }\n  \n</style>\n</head>\n<body>\n<button id=\"getp\">Get Paragraph Width</button>\n  <button id=\"getd\">Get Document Width</button>\n  <button id=\"getw\">Get Window Width</button>\n  <div>&nbsp;</div>\n  <p>\n    Sample paragraph to test width\n  </p>\n</body>\n</html>"}]}, "width137": {"id": 137, "searchname": "width", "name": "width", "type": "function", "category": "CSS", "subcategory": "Height and Width", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Set the CSS width of every matched element.", "longdesc": "<p>If no explicit unit was specified (like 'em' or '%') then \"px\" is concatenated to the value.</p>", "params": [{"optional": false, "name": "val", "type": "String, Number", "desc": "Set the CSS 'width' property to the specified value."}], "examples": [{"code": "\n    $(\"div\").one('click', function () {\n      $(this).width(30)\n             .css({cursor:\"auto\", \"background-color\":\"blue\"});\n    });\n", "htmlCode": "\n    $(\"div\").one('click', function () {\n      $(this).width(30)\n             .css({cursor:\"auto\", \"background-color\":\"blue\"});\n    });\n", "desc": "To set the width of each div on click to 30px plus a color change.", "css": "\n  div { width:70px; height:50px; float:left; margin:5px;\n        background:red; cursor:pointer; }\n  ", "inhead": "", "html": "<div></div>\n  <div>d</div>\n  <div>d</div>\n  <div>d</div>\n  <div>d</div>", "exampleId": "137iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").one('click', function () {\n      $(this).width(30)\n             .css({cursor:\"auto\", \"background-color\":\"blue\"});\n    });\n\n  });\n</script>\n<style>\n\n  div { width:70px; height:50px; float:left; margin:5px;\n        background:red; cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div>d</div>\n  <div>d</div>\n  <div>d</div>\n  <div>d</div>\n</body>\n</html>"}]}, "ready138": {"id": 138, "searchname": "ready", "name": "ready", "type": "function", "category": "Events", "subcategory": "Page Load", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to be executed whenever the DOM is ready to be traversed and manipulated.", "longdesc": "<p>This is probably the most important function included in the event module, as it can greatly improve the response times of your web applications.</p><p>In a nutshell, this is a solid replacement for using window.onload, and attaching a function to that. By using this method, your bound function will be called the instant the DOM is ready to be read and manipulated, which is when what 99.99% of all JavaScript code needs to run.</p><p>There is one argument passed to the ready event handler: A reference to the jQuery function. You can name that argument whatever you like, and can therefore stick with the $ alias without risk of naming collisions.</p><p>Please ensure you have no code in your &lt;body&gt; onload event handler, otherwise $(document).ready() may not fire.</p><p>You can have as many $(document).ready events on your page as you like. The functions are then executed in the order they were added.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "The function to be executed when the DOM is ready.\n<pre>function callback(jQueryReference) {\n  this; // document\n}\n</pre>"}], "examples": [{"code": "$(\"p\").text(\"The DOM is now loaded and can be manipulated.\");", "htmlCode": "$(\"p\").text(\"The DOM is now loaded and can be manipulated.\");", "desc": "Display a message when the DOM is loaded.", "css": "p { color:red; }", "inhead": "", "html": "<p>\n  </p>", "exampleId": "138iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").text(\"The DOM is now loaded and can be manipulated.\");\n  });\n</script>\n<style>\np { color:red; }\n</style>\n</head>\n<body>\n<p>\n  </p>\n</body>\n</html>"}, {"code": "$(document).ready(function(){\n  // Your code here...\n});", "htmlCode": "$(document).ready(function(){\n  // Your code here...\n});", "desc": "To run code when the DOM loads, write:", "css": "", "inhead": "", "html": "", "exampleId": "138iframeExample1", "runCode": ""}, {"code": "jQuery(function($) {\n  // Your code using failsafe $ alias here...\n});", "htmlCode": "jQuery(function($) {\n  // Your code using failsafe $ alias here...\n});", "desc": "To use both the shortcut for $(document).ready() and the argument to write failsafe jQuery code using the $ alias, without relying on the global alias, write:", "css": "", "inhead": "", "html": "", "exampleId": "138iframeExample2", "runCode": ""}, {"code": "$(function() {\n  // Your code here...\n});", "htmlCode": "$(function() {\n  // Your code here...\n});", "desc": "Commonly written as:", "css": "", "inhead": "", "html": "", "exampleId": "138iframeExample3", "runCode": ""}]}, "bind139": {"id": 139, "searchname": "bind", "name": "bind", "type": "function", "category": "Events", "subcategory": "Event Handling", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Binds a handler to one or more events (like click) for each matched element.  Can also bind custom events.", "longdesc": "<p><strong>Possible event values:</strong> <code>blur</code>, <code>focus</code>, <code>load</code>, <code>resize</code>, <code>scroll</code>, <code>unload</code>, <code>click</code>, <code>dblclick</code>, <code> mousedown</code>, <code>mouseup</code>, <code>mousemove</code>, <code>mouseover</code>, <code>mouseout</code>, <code>mouseenter</code>, <code>mouseleave</code>, <code>change</code>, <code>select</code>, <code> submit</code>, <code>keydown</code>, <code>keypress</code>, <code>keyup</code>, <code>error</code></p><p>The event handler is passed an event object that you can use to prevent default behaviour. To stop both default action and event bubbling, your handler has to return false. Note that this will prevent handlers on parent elements from running but not other jQuery handlers on the same element.</p><p>In most cases, you can define your event handlers as anonymous functions (see first example). In cases where that is not possible, you can pass additional data as the second parameter (and the handler function as the third), see second example.</p>", "params": [{"optional": false, "name": "type", "type": "String", "desc": "One or more event types separated by a space"}, {"optional": true, "name": "data", "type": "Object", "desc": "Additional data passed to the event handler as event.data"}, {"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the event on each of the set of matched elements\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").bind(\"click\", function(e){\n      var str = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      $(\"span\").text(\"Click happened! \" + str);\n    });\n    $(\"p\").bind(\"dblclick\", function(){\n      $(\"span\").text(\"Double-click happened in \" + this.tagName);\n    });\n    $(\"p\").bind(\"mouseenter mouseleave\", function(e){\n        $(this).toggleClass(\"over\");\n    });\n", "htmlCode": "\n    $(\"p\").bind(\"click\", function(e){\n      var str = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      $(\"span\").text(\"Click happened! \" + str);\n    });\n    $(\"p\").bind(\"dblclick\", function(){\n      $(\"span\").text(\"Double-click happened in \" + this.tagName);\n    });\n    $(\"p\").bind(\"mouseenter mouseleave\", function(e){\n        $(this).toggleClass(\"over\");\n    });\n", "desc": "Handle click and double-click for the paragraph.  Note: the coordinates are window relative so in this case relative to the demo iframe.", "css": "\n  p { background:yellow; font-weight:bold; cursor:pointer; \n      padding:5px; }\n  p.over { background: #ccc; }\n  span { color:red; }\n  ", "inhead": "", "html": "<p>Click or double click here.</p>\n  <span></span>", "exampleId": "139iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").bind(\"click\", function(e){\n      var str = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      $(\"span\").text(\"Click happened! \" + str);\n    });\n    $(\"p\").bind(\"dblclick\", function(){\n      $(\"span\").text(\"Double-click happened in \" + this.tagName);\n    });\n    $(\"p\").bind(\"mouseenter mouseleave\", function(e){\n        $(this).toggleClass(\"over\");\n    });\n\n  });\n</script>\n<style>\n\n  p { background:yellow; font-weight:bold; cursor:pointer; \n      padding:5px; }\n  p.over { background: #ccc; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<p>Click or double click here.</p>\n  <span></span>\n</body>\n</html>"}, {"code": "$(\"p\").bind(\"click\", function(){\n  alert( $(this).text() );\n});", "htmlCode": "$(\"p\").bind(\"click\", function(){\n  alert( $(this).text() );\n});", "desc": "To display each paragraph's text in an alert box whenever it is clicked:", "css": "", "inhead": "", "html": "", "exampleId": "139iframeExample1", "runCode": ""}, {"code": "function handler(event) {\n  alert(event.data.foo);\n}\n$(\"p\").bind(\"click\", {foo: \"bar\"}, handler)", "htmlCode": "function handler(event) {\n  alert(event.data.foo);\n}\n$(\"p\").bind(\"click\", {foo: \"bar\"}, handler)", "desc": "You can pass some extra data before the event handler:", "css": "", "inhead": "", "html": "", "exampleId": "139iframeExample2", "runCode": ""}, {"code": "$(\"form\").bind(\"submit\", function() { return false; })", "htmlCode": "$(\"form\").bind(\"submit\", function() { return false; })", "desc": "To cancel a default action and prevent it from bubbling up, return false:", "css": "", "inhead": "", "html": "", "exampleId": "139iframeExample3", "runCode": ""}, {"code": "$(\"form\").bind(\"submit\", function(event){\n  event.preventDefault();\n});", "htmlCode": "$(\"form\").bind(\"submit\", function(event){\n  event.preventDefault();\n});", "desc": "To cancel only the default action by using the preventDefault method.", "css": "", "inhead": "", "html": "", "exampleId": "139iframeExample4", "runCode": ""}, {"code": "$(\"form\").bind(\"submit\", function(event){\n  event.stopPropagation();\n});", "htmlCode": "$(\"form\").bind(\"submit\", function(event){\n  event.stopPropagation();\n});", "desc": "Stop only an event from bubbling by using the stopPropagation method.", "css": "", "inhead": "", "html": "", "exampleId": "139iframeExample5", "runCode": ""}, {"code": "\n    $(\"p\").bind(\"myCustomEvent\", function(e, myName, myValue){\n      $(this).text(myName + \", hi there!\");\n      $(\"span\").stop().css(\"opacity\", 1)\n               .text(\"myName = \" + myName)\n               .fadeIn(30).fadeOut(1000);\n    });\n    $(\"button\").click(function () {\n      $(\"p\").trigger(\"myCustomEvent\", [ \"John\" ]);\n    });\n", "htmlCode": "\n    $(\"p\").bind(\"myCustomEvent\", function(e, myName, myValue){\n      $(this).text(myName + \", hi there!\");\n      $(\"span\").stop().css(\"opacity\", 1)\n               .text(\"myName = \" + myName)\n               .fadeIn(30).fadeOut(1000);\n    });\n    $(\"button\").click(function () {\n      $(\"p\").trigger(\"myCustomEvent\", [ \"John\" ]);\n    });\n", "desc": "Can bind custom events too.", "css": "\n  p { color:red; }\n  span { color:blue; }\n  ", "inhead": "", "html": "<p>Has an attached custom event.</p>\n  <button>Trigger custom event</button>\n  <span style=\"display:none;\"></span>", "exampleId": "139iframeExample6", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").bind(\"myCustomEvent\", function(e, myName, myValue){\n      $(this).text(myName + \", hi there!\");\n      $(\"span\").stop().css(\"opacity\", 1)\n               .text(\"myName = \" + myName)\n               .fadeIn(30).fadeOut(1000);\n    });\n    $(\"button\").click(function () {\n      $(\"p\").trigger(\"myCustomEvent\", [ \"John\" ]);\n    });\n\n  });\n</script>\n<style>\n\n  p { color:red; }\n  span { color:blue; }\n  \n</style>\n</head>\n<body>\n<p>Has an attached custom event.</p>\n  <button>Trigger custom event</button>\n  <span style=\"display:none;\"></span>\n</body>\n</html>"}]}, "one140": {"id": 140, "searchname": "one", "name": "one", "type": "function", "category": "Events", "subcategory": "Event Handling", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a handler to one or more events to be executed <i>once</i> for each matched element.", "longdesc": "<p>The handler is executed only once for each element. Otherwise, the same rules as described in <a href='Events/bind'>bind</a>() apply. The event handler is passed an event object that you can use to prevent default behaviour. To stop both default action and event bubbling, your handler should return false.</p><p>In most cases, you can define your event handlers as anonymous functions (see first example). In cases where that is not possible, you can pass additional data as the second paramter (and the handler function as the third), see second example.</p>", "params": [{"optional": false, "name": "type", "type": "String", "desc": "An event type"}, {"optional": true, "name": "data", "type": "Object", "desc": "Additional data passed to the event handler as event.data"}, {"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the specified event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    var n = 0;\n    $(\"div\").one(\"click\", function(){\n      var index = $(\"div\").index(this);\n      $(this).css({ borderStyle:\"inset\",\n                    cursor:\"auto\" });\n      $(\"p\").text(\"Div at index #\" + index + \" clicked.\" +\n                  \"  That's \" + ++n + \" total clicks.\");\n    });\n", "htmlCode": "\n    var n = 0;\n    $(\"div\").one(\"click\", function(){\n      var index = $(\"div\").index(this);\n      $(this).css({ borderStyle:\"inset\",\n                    cursor:\"auto\" });\n      $(\"p\").text(\"Div at index #\" + index + \" clicked.\" +\n                  \"  That's \" + ++n + \" total clicks.\");\n    });\n", "desc": "Tie a one-time click to each div.", "css": "\n  div { width:60px; height:60px; margin:5px; float:left;\n        background:green; border:10px outset; \n        cursor:pointer; }\n  p { color:red; margin:0; clear:left; }\n  ", "inhead": "", "html": "<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <p>Click a green square...</p>", "exampleId": "140iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var n = 0;\n    $(\"div\").one(\"click\", function(){\n      var index = $(\"div\").index(this);\n      $(this).css({ borderStyle:\"inset\",\n                    cursor:\"auto\" });\n      $(\"p\").text(\"Div at index #\" + index + \" clicked.\" +\n                  \"  That's \" + ++n + \" total clicks.\");\n    });\n\n  });\n</script>\n<style>\n\n  div { width:60px; height:60px; margin:5px; float:left;\n        background:green; border:10px outset; \n        cursor:pointer; }\n  p { color:red; margin:0; clear:left; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <p>Click a green square...</p>\n</body>\n</html>"}, {"code": "$(\"p\").one(\"click\", function(){\n  alert( $(this).text() );\n});", "htmlCode": "$(\"p\").one(\"click\", function(){\n  alert( $(this).text() );\n});", "desc": "To display the text of all paragraphs in an alert box the first time each of them is clicked:", "css": "", "inhead": "", "html": "", "exampleId": "140iframeExample1", "runCode": ""}]}, "trigger141": {"id": 141, "searchname": "trigger", "name": "trigger", "type": "function", "category": "Events", "subcategory": "Event Handling", "return": "jQuery", "added": "", "sample": "", "desc": "Trigger a type of event on every matched element.", "longdesc": "<p>This will also cause the default action of the browser with the same name (if one exists) to be executed. For example, passing 'submit' to the trigger() function will also cause the browser to submit the form. This default action can be prevented by returning false from one of the functions bound to the event.</p><p>If a native event is triggered and a suitable event object is not passed as the first element of 'data', then a fake event object is added before all supplied 'data' arguments.  This element contains appropriate 'type' and 'target' fields and null-op 'preventDefault' and 'stopPropagation' methods, but none of the clientXY/pageXY/keyCode fields specific to mouse and keyboard events.  A \"suitable\" event object is judged by the presence of the 'preventDefault' field.</p><p>You can also trigger custom events registered with bind.</p>", "params": [{"optional": false, "name": "type ", "type": "String", "desc": "An event type to trigger."}, {"optional": true, "name": "data ", "type": "Array", "desc": "Additional data to pass as arguments (after the event object) to the event handler."}], "examples": [{"code": "\n    $(\"button:first\").click(function () {\n      update($(\"span:first\"));\n    });\n    $(\"button:last\").click(function () {\n      $(\"button:first\").trigger('click');\n\n      update($(\"span:last\"));\n    });\n\n    function update(j) {\n      var n = parseInt(j.text(), 0);\n      j.text(n + 1);\n    }\n", "htmlCode": "\n    $(\"button:first\").click(function () {\n      update($(\"span:first\"));\n    });\n    $(\"button:last\").click(function () {\n      $(\"button:first\").trigger('click');\n\n      update($(\"span:last\"));\n    });\n\n    function update(j) {\n      var n = parseInt(j.text(), 0);\n      j.text(n + 1);\n    }\n", "desc": "Clicks to button #2 also trigger a click for button #1.", "css": "\n  button { margin:10px; }\n  div { color:blue; font-weight:bold; }\n  span { color:red; }\n  ", "inhead": "", "html": "<button>Button #1</button>\n  <button>Button #2</button>\n  <div><span>0</span> button #1 clicks.</div>\n  <div><span>0</span> button #2 clicks.</div>", "exampleId": "141iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button:first\").click(function () {\n      update($(\"span:first\"));\n    });\n    $(\"button:last\").click(function () {\n      $(\"button:first\").trigger('click');\n\n      update($(\"span:last\"));\n    });\n\n    function update(j) {\n      var n = parseInt(j.text(), 0);\n      j.text(n + 1);\n    }\n\n  });\n</script>\n<style>\n\n  button { margin:10px; }\n  div { color:blue; font-weight:bold; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<button>Button #1</button>\n  <button>Button #2</button>\n  <div><span>0</span> button #1 clicks.</div>\n  <div><span>0</span> button #2 clicks.</div>\n</body>\n</html>"}, {"code": "$(\"form:first\").trigger(\"submit\")", "htmlCode": "$(\"form:first\").trigger(\"submit\")", "desc": "To submit the first form without using the submit() function, try:", "css": "", "inhead": "", "html": "", "exampleId": "141iframeExample1", "runCode": ""}, {"code": "$(\"p\").click( function (event, a, b) {\n  // when a normal click fires, a and b are undefined\n  // for a trigger like below a refers too \"foo\" and b refers to \"bar\"\n} ).trigger(\"click\", [\"foo\", \"bar\"]);", "htmlCode": "$(\"p\").click( function (event, a, b) {\n  // when a normal click fires, a and b are undefined\n  // for a trigger like below a refers too \"foo\" and b refers to \"bar\"\n} ).trigger(\"click\", [\"foo\", \"bar\"]);", "desc": "To pass arbitrary data to an event:", "css": "", "inhead": "", "html": "", "exampleId": "141iframeExample2", "runCode": ""}, {"code": "$(\"p\").bind(\"myEvent\", function (event, message1, message2) {\n  alert(message1 + ' ' + message2);\n});\n$(\"p\").trigger(\"myEvent\", [\"Hello\",\"World!\"]);", "htmlCode": "$(\"p\").bind(\"myEvent\", function (event, message1, message2) {\n  alert(message1 + ' ' + message2);\n});\n$(\"p\").trigger(\"myEvent\", [\"Hello\",\"World!\"]);", "desc": "This would display a \"Hello World!\" alert box.", "css": "", "inhead": "", "html": "", "exampleId": "141iframeExample3", "runCode": ""}]}, "triggerhandler142": {"id": 142, "searchname": "triggerhandler", "name": "triggerHandler", "type": "function", "category": "Events", "subcategory": "Event Handling", "return": "jQuery", "added": "", "sample": "", "desc": "This particular method triggers all bound event handlers on an element (for a specific event type) WITHOUT executing the browsers default actions.", "longdesc": "<p>The event is only triggered on the first element within the JQuery collection.  Also, if the JQuery collection is empty, this method returns 'undefined' instead of an empty JQuery collection.</p>", "params": [{"optional": false, "name": "type ", "type": "String", "desc": "An event type to trigger."}, {"optional": true, "name": "data ", "type": "Array", "desc": "Additional data to pass as arguments (after the event object) to the event handler."}], "examples": [{"code": "\n    $(\"#old\").click(function(){\n      $(\"input\").trigger(\"focus\");\n    });\n    $(\"#new\").click(function(){\n      $(\"input\").triggerHandler(\"focus\");\n    });\n    $(\"input\").focus(function(){\n      $(\"<span>Focused!</span>\").appendTo(\"body\").fadeOut(1000);\n    });\n", "htmlCode": "\n    $(\"#old\").click(function(){\n      $(\"input\").trigger(\"focus\");\n    });\n    $(\"#new\").click(function(){\n      $(\"input\").triggerHandler(\"focus\");\n    });\n    $(\"input\").focus(function(){\n      $(\"&lt;span&gt;Focused!&lt;/span&gt;\").appendTo(\"body\").fadeOut(1000);\n    });\n", "desc": "If you called .triggerHandler() on a focus event - the browsers default focus action would not be triggered, only the event handlers bound to the focus event.", "css": "", "inhead": "", "html": "<button id=\"old\">.trigger(\"focus\")</button>\n  <button id=\"new\">.triggerHandler(\"focus\")</button><br/><br/>\n  <input type=\"text\" value=\"To Be Focused\"/>", "exampleId": "142iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#old\").click(function(){\n      $(\"input\").trigger(\"focus\");\n    });\n    $(\"#new\").click(function(){\n      $(\"input\").triggerHandler(\"focus\");\n    });\n    $(\"input\").focus(function(){\n      $(\"<span>Focused!</span>\").appendTo(\"body\").fadeOut(1000);\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<button id=\"old\">.trigger(\"focus\")</button>\n  <button id=\"new\">.triggerHandler(\"focus\")</button><br/><br/>\n  <input type=\"text\" value=\"To Be Focused\"/>\n</body>\n</html>"}]}, "unbind143": {"id": 143, "searchname": "unbind", "name": "unbind", "type": "function", "category": "Events", "subcategory": "Event Handling", "return": "jQuery", "added": "", "sample": "", "desc": "This does the opposite of bind, it removes bound events from each of the matched elements.", "longdesc": "<p>Without any arguments, all bound events are removed.</p><p>You can also unbind custom events registered with bind.</p><p>If the type is provided, all bound events of that type are removed.</p><p>If the function that was passed to bind is provided as the second argument, only that specific event handler is removed.</p>", "params": [{"optional": true, "name": "type ", "type": "String", "desc": "An event type to unbind."}, {"optional": true, "name": "data ", "type": "Function", "desc": "A function to unbind from the event on each of the set of matched elements."}], "examples": [{"code": "\n    function aClick() {\n      $(\"div\").show().fadeOut(\"slow\");\n    }\n    $(\"#bind\").click(function () {\n      // could use .bind('click', aClick) instead but for variety...\n      $(\"#theone\").click(aClick)\n                  .text(\"Can Click!\");\n    });\n    $(\"#unbind\").click(function () {\n      $(\"#theone\").unbind('click', aClick)\n                  .text(\"Does nothing...\");\n    });\n", "htmlCode": "\n    function aClick() {\n      $(\"div\").show().fadeOut(\"slow\");\n    }\n    $(\"#bind\").click(function () {\n      // could use .bind('click', aClick) instead but for variety...\n      $(\"#theone\").click(aClick)\n                  .text(\"Can Click!\");\n    });\n    $(\"#unbind\").click(function () {\n      $(\"#theone\").unbind('click', aClick)\n                  .text(\"Does nothing...\");\n    });\n", "desc": "Can bind and unbind events to the colored button.", "css": "\n  button { margin:5px; }\n  button#theone { color:red; background:yellow; }\n  ", "inhead": "", "html": "<button id=\"theone\">Does nothing...</button>\n  <button id=\"bind\">Bind Click</button>\n  <button id=\"unbind\">Unbind Click</button>\n  <div style=\"display:none;\">Click!</div>", "exampleId": "143iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function aClick() {\n      $(\"div\").show().fadeOut(\"slow\");\n    }\n    $(\"#bind\").click(function () {\n      // could use .bind('click', aClick) instead but for variety...\n      $(\"#theone\").click(aClick)\n                  .text(\"Can Click!\");\n    });\n    $(\"#unbind\").click(function () {\n      $(\"#theone\").unbind('click', aClick)\n                  .text(\"Does nothing...\");\n    });\n\n  });\n</script>\n<style>\n\n  button { margin:5px; }\n  button#theone { color:red; background:yellow; }\n  \n</style>\n</head>\n<body>\n<button id=\"theone\">Does nothing...</button>\n  <button id=\"bind\">Bind Click</button>\n  <button id=\"unbind\">Unbind Click</button>\n  <div style=\"display:none;\">Click!</div>\n</body>\n</html>"}, {"code": "$(\"p\").unbind()", "htmlCode": "$(\"p\").unbind()", "desc": "To unbind all events from all paragraphs, write:", "css": "", "inhead": "", "html": "", "exampleId": "143iframeExample1", "runCode": ""}, {"code": "$(\"p\").unbind( \"click\" )", "htmlCode": "$(\"p\").unbind( \"click\" )", "desc": "To unbind all click events from all paragraphs, write:", "css": "", "inhead": "", "html": "", "exampleId": "143iframeExample2", "runCode": ""}, {"code": "var foo = function () {\n  // code to handle some kind of event\n};\n\n$(\"p\").bind(\"click\", foo); // ... now foo will be called when paragraphs are clicked ...\n\n$(\"p\").unbind(\"click\", foo); // ... foo will no longer be called.", "htmlCode": "var foo = function () {\n  // code to handle some kind of event\n};\n\n$(\"p\").bind(\"click\", foo); // ... now foo will be called when paragraphs are clicked ...\n\n$(\"p\").unbind(\"click\", foo); // ... foo will no longer be called.", "desc": "To unbind just one previously bound handler, pass the function in as the second argument:", "css": "", "inhead": "", "html": "", "exampleId": "143iframeExample3", "runCode": ""}]}, "hover144": {"id": 144, "searchname": "hover", "name": "hover", "type": "function", "category": "Events", "subcategory": "Interaction Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Simulates hovering (moving the mouse on, and off, an object). This is a custom method which provides an 'in' to a frequent task.", "longdesc": "<p>Whenever the mouse cursor is moved over a matched element, the first specified function is fired. Whenever the mouse moves off of the element, the second specified function fires. Additionally, checks are in place to see if the mouse is still within the specified element itself (for example, an image inside of a div), and if it is, it will continue to 'hover', and not move out (a common error in using a mouseout event handler).</p>", "params": [{"optional": false, "name": "over", "type": "Function", "desc": "The function to fire when the mouse is moved over a matched element.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}, {"optional": false, "name": "out", "type": "Function", "desc": "The function to fire when the mouse is moved off of a matched element.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"li\").hover(\n      function () {\n        $(this).append($(\"<span> ***</span>\"));\n      }, \n      function () {\n        $(this).find(\"span:last\").remove();\n      }\n    );\n", "htmlCode": "\n    $(\"li\").hover(\n      function () {\n        $(this).append($(\"&lt;span&gt; ***&lt;/span&gt;\"));\n      }, \n      function () {\n        $(this).find(\"span:last\").remove();\n      }\n    );\n", "desc": "To add a special style to table cells that are being hovered over, try:", "css": "\n  ul { margin-left:20px; color:blue; }\n  li { cursor:default; }\n  span { color:red; }\n  ", "inhead": "", "html": "<ul>\n    <li>Milk</li>\n    <li>Bread</li>\n    <li>Chips</li>\n    <li>Socks</li>\n  </ul>", "exampleId": "144iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"li\").hover(\n      function () {\n        $(this).append($(\"<span> ***</span>\"));\n      }, \n      function () {\n        $(this).find(\"span:last\").remove();\n      }\n    );\n\n  });\n</script>\n<style>\n\n  ul { margin-left:20px; color:blue; }\n  li { cursor:default; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<ul>\n    <li>Milk</li>\n    <li>Bread</li>\n    <li>Chips</li>\n    <li>Socks</li>\n  </ul>\n</body>\n</html>"}, {"code": "$(\"td\").hover(\n  function () {\n    $(this).addClass(\"hover\");\n  },\n  function () {\n    $(this).removeClass(\"hover\");\n  }\n);", "htmlCode": "$(\"td\").hover(\n  function () {\n    $(this).addClass(\"hover\");\n  },\n  function () {\n    $(this).removeClass(\"hover\");\n  }\n);", "desc": "To add a special style to table cells that are being hovered over, try:", "css": "", "inhead": "", "html": "", "exampleId": "144iframeExample1", "runCode": ""}]}, "toggle145": {"id": 145, "searchname": "toggle", "name": "toggle", "type": "function", "category": "Events", "subcategory": "Interaction Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Toggle between two function calls every other click.", "longdesc": "<p>Whenever a matched element is clicked, the first specified function is fired, when clicked again, the second is fired. All subsequent clicks continue to rotate through the two functions.</p><p>Use unbind(\"click\") to remove.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "The function to execute on every even click.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}, {"optional": false, "name": "fn1", "type": "Function", "desc": "The function to execute on every odd click.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"li\").toggle(\n      function () {\n        $(this).css(\"list-style-type\", \"disc\")\n               .css(\"color\", \"blue\");\n      },\n      function () {\n        $(this).css({\"list-style-type\":\"\", \"color\":\"\"});\n      }\n    );\n", "htmlCode": "\n    $(\"li\").toggle(\n      function () {\n        $(this).css(\"list-style-type\", \"disc\")\n               .css(\"color\", \"blue\");\n      },\n      function () {\n        $(this).css({\"list-style-type\":\"\", \"color\":\"\"});\n      }\n    );\n", "desc": "Click to toggle highlight on the list item.", "css": "\n  ul { margin:10px; list-style:inside circle; font-weight:bold; }\n  li { cursor:pointer; }\n  ", "inhead": "", "html": "<ul>\n    <li>Go to the store</li>\n    <li>Pick up dinner</li>\n    <li>Debug crash</li>\n    <li>Take a jog</li>\n  </ul>", "exampleId": "145iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"li\").toggle(\n      function () {\n        $(this).css(\"list-style-type\", \"disc\")\n               .css(\"color\", \"blue\");\n      },\n      function () {\n        $(this).css({\"list-style-type\":\"\", \"color\":\"\"});\n      }\n    );\n\n  });\n</script>\n<style>\n\n  ul { margin:10px; list-style:inside circle; font-weight:bold; }\n  li { cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<ul>\n    <li>Go to the store</li>\n    <li>Pick up dinner</li>\n    <li>Debug crash</li>\n    <li>Take a jog</li>\n  </ul>\n</body>\n</html>"}, {"code": "$(\"td\").toggle(\n  function () {\n    $(this).addClass(\"selected\");\n  },\n  function () {\n    $(this).removeClass(\"selected\");\n  }\n);", "htmlCode": "$(\"td\").toggle(\n  function () {\n    $(this).addClass(\"selected\");\n  },\n  function () {\n    $(this).removeClass(\"selected\");\n  }\n);", "desc": "To toggle a style on table cells:", "css": "", "inhead": "", "html": "", "exampleId": "145iframeExample1", "runCode": ""}]}, "blur146": {"id": 146, "searchname": "blur", "name": "blur", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Triggers the blur event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that blur event to be executed, and calls the browser's default blur action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the blur event. The blur event usually fires when an element loses focus either via the pointing device or by tabbing navigation</p>", "params": [], "examples": [{"code": "$(\"p\").blur();", "htmlCode": "$(\"p\").blur();", "desc": "To triggers the blur event on all paragraphs:", "css": "", "inhead": "", "html": "", "exampleId": "146iframeExample0", "runCode": ""}]}, "blur147": {"id": 147, "searchname": "blur", "name": "blur", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Bind a function to the blur event of each matched element.", "longdesc": "<p>The blur event fires when an element loses focus either via the pointing device or by tabbing navigation.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the blur event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(\"p\").blur( function () { alert(\"Hello World!\"); } );", "htmlCode": "$(\"p\").blur( function () { alert(\"Hello World!\"); } );", "desc": "To pop up an alert saying \"Hello World!\" every time any paragraph's blur event triggers:", "css": "", "inhead": "", "html": "", "exampleId": "147iframeExample0", "runCode": ""}]}, "change148": {"id": 148, "searchname": "change", "name": "change", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Triggers the change event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that change event to be executed, and calls the browser's default change action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the change event. The change event usually fires when a control loses the input focus and its value has been modified since gaining focus.</p>", "params": [], "examples": []}, "change149": {"id": 149, "searchname": "change", "name": "change", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Binds a function to the change event of each matched element.", "longdesc": "<p>The change event fires when a control loses the input focus and its value has been modified since gaining focus.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the change event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .change();\n", "htmlCode": "\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .change();\n", "desc": "Attaches a change event to the select that gets the text for each selected option and writes them in the div.  It then triggers the event for the initial text draw.", "css": "\n  div { color:red; }\n  ", "inhead": "", "html": "<select name=\"sweets\" multiple=\"multiple\">\n    <option>Chocolate</option>\n    <option selected=\"selected\">Candy</option>\n    <option>Taffy</option>\n    <option selected=\"selected\">Caramel</option>\n    <option>Fudge</option>\n    <option>Cookie</option>\n  </select>\n  <div></div>", "exampleId": "149iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"select\").change(function () {\n          var str = \"\";\n          $(\"select option:selected\").each(function () {\n                str += $(this).text() + \" \";\n              });\n          $(\"div\").text(str);\n        })\n        .change();\n\n  });\n</script>\n<style>\n\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<select name=\"sweets\" multiple=\"multiple\">\n    <option>Chocolate</option>\n    <option selected=\"selected\">Candy</option>\n    <option>Taffy</option>\n    <option selected=\"selected\">Caramel</option>\n    <option>Fudge</option>\n    <option>Cookie</option>\n  </select>\n  <div></div>\n</body>\n</html>"}, {"code": "$(\"input[@type='text']\").change( function() {\n  // check input for validity here\n});", "htmlCode": "$(\"input[@type='text']\").change( function() {\n  // check input for validity here\n});", "desc": "To add a validity test to all text input elements:", "css": "", "inhead": "", "html": "", "exampleId": "149iframeExample1", "runCode": ""}]}, "click150": {"id": 150, "searchname": "click", "name": "click", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Triggers the click event of each matched element.", "longdesc": "<p>Causes all of the functions that have been bound to that click event to be executed.</p>", "params": [], "examples": [{"code": "$(\"p\").click();", "htmlCode": "$(\"p\").click();", "desc": "To trigger the click event on all of the paragraphs on the page:", "css": "", "inhead": "", "html": "", "exampleId": "150iframeExample0", "runCode": ""}]}, "click151": {"id": 151, "searchname": "click", "name": "click", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Binds a function to the click event of each matched element.", "longdesc": "<p>The click event fires when the pointing device button is clicked over an element. A click is defined as a mousedown and mouseup over the same screen location. The sequence of these events is:<ul><li>mousedown</li><li>mouseup</li><li>click</li></ul></p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the click event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").click(function () { \n      $(this).slideUp(); \n    });\n    $(\"p\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n", "htmlCode": "\n    $(\"p\").click(function () { \n      $(this).slideUp(); \n    });\n    $(\"p\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n", "desc": "To hide paragraphs on a page when they are clicked:", "css": "\n  p { color:red; margin:5px; cursor:pointer; }\n  p.hilite { background:yellow; }\n  ", "inhead": "", "html": "<p>First Paragraph</p>\n  <p>Second Paragraph</p>\n  <p>Yet one more Paragraph</p>", "exampleId": "151iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () { \n      $(this).slideUp(); \n    });\n    $(\"p\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n\n  });\n</script>\n<style>\n\n  p { color:red; margin:5px; cursor:pointer; }\n  p.hilite { background:yellow; }\n  \n</style>\n</head>\n<body>\n<p>First Paragraph</p>\n  <p>Second Paragraph</p>\n  <p>Yet one more Paragraph</p>\n</body>\n</html>"}]}, "dblclick152": {"id": 152, "searchname": "dblclick", "name": "dblclick", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Triggers the dblclick event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that dblclick event to be executed, and calls the browser's default dblclick action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the dblclick event. The dblclick event usually fires when the pointing device button is double clicked over an element.</p>", "params": [], "examples": []}, "dblclick153": {"id": 153, "searchname": "dblclick", "name": "dblclick", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Binds a function to the dblclick event of each matched element.", "longdesc": "<p>The dblclick event fires when the pointing device button is double clicked over an element</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "The function to bind to the dblclick event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(\"p\").dblclick( function () { alert(\"Hello World!\"); });", "htmlCode": "$(\"p\").dblclick( function () { alert(\"Hello World!\"); });", "desc": "To bind a \"Hello World!\" alert box the dblclick event on every paragraph on the page:", "css": "", "inhead": "", "html": "", "exampleId": "153iframeExample0", "runCode": ""}, {"code": "\n    var divdbl = $(\"div:first\");\n    divdbl.dblclick(function () { \n      divdbl.toggleClass('dbl'); \n    });\n\n", "htmlCode": "\n    var divdbl = $(\"div:first\");\n    divdbl.dblclick(function () { \n      divdbl.toggleClass('dbl'); \n    });\n\n", "desc": "Double click to toggle background color.", "css": "\n  div { background:blue;\n        color:white;\n        height:100px;\n        width:150px;\n }\n  div.dbl { background:yellow;color:black; }\n  ", "inhead": "", "html": "<div></div><span>Double click the block</span>", "exampleId": "153iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var divdbl = $(\"div:first\");\n    divdbl.dblclick(function () { \n      divdbl.toggleClass('dbl'); \n    });\n\n\n  });\n</script>\n<style>\n\n  div { background:blue;\n        color:white;\n        height:100px;\n        width:150px;\n }\n  div.dbl { background:yellow;color:black; }\n  \n</style>\n</head>\n<body>\n<div></div><span>Double click the block</span>\n</body>\n</html>"}]}, "error154": {"id": 154, "searchname": "error", "name": "error", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Triggers the error event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that error event to be executed, and calls the browser's default error action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the error event. The error event usually fires when an element loses focus either via the pointing device or by tabbing navigation.</p>", "params": [], "examples": []}, "error155": {"id": 155, "searchname": "error", "name": "error", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the error event of each matched element.", "longdesc": "<p>There is no public standard for the error event. In most browsers, the window object's error event is triggered when a JavaScript error occurs on the page. An image object's error event is triggered when it is set an invalid src attribute - either a non-existent file, or one with corrupt image data.</p><p>If the event is thrown by the window object, the event handler will be passed three parameters: <ol><li>A message describing the event (\"varName is not defined\", \"missing operator in expression\", etc.),</li><li>the full URL of the document containing the error, and</li><li>the line number on which the error occured.</li></ol></p>\n<p>If the event handler returns true, it signifies that the event was handled, and the browser raises no errors.</p><p>For more information, see: <ul><li><a href=\"http://msdn2.microsoft.com/en-us/library/ms536930.aspx\">http://msdn2.microsoft.com/en-us/library/ms536930.aspx</a></li><li>[http://developer.mozilla.org/en/docs/DOM:window.onerror Gecko DOM Reference - onerror Event]</li><li>[http://developer.mozilla.org/en/docs/DOM:event Gecko DOM Reference - Event object]</li><li>[http://en.wikipedia.org/wiki/DOM_Events Wikipedia: DOM Events]</ul></p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "An event handler function to bind to the error event.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(window).error(function(msg, url, line){\n  jQuery.post(\"js_error_log.php\", { msg: msg, url: url, line: line });\n});", "htmlCode": "$(window).error(function(msg, url, line){\n  jQuery.post(\"js_error_log.php\", { msg: msg, url: url, line: line });\n});", "desc": "To keep a server-side log of JavaScript errors, you might want to:", "css": "", "inhead": "", "html": "", "exampleId": "155iframeExample0", "runCode": ""}, {"code": "$(window).error(function(){\n  return true;\n});", "htmlCode": "$(window).error(function(){\n  return true;\n});", "desc": "To hide JavaScript errors from the user, you can try:", "css": "", "inhead": "", "html": "", "exampleId": "155iframeExample1", "runCode": ""}, {"code": "$(\"img\").error(function(){\n  $(this).hide();\n});", "htmlCode": "$(\"img\").error(function(){\n  $(this).hide();\n});", "desc": "To hide the \"broken image\" icons for your IE users, you can try:", "css": "", "inhead": "", "html": "", "exampleId": "155iframeExample2", "runCode": ""}]}, "focus156": {"id": 156, "searchname": "focus", "name": "focus", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Triggers the focus event of each matched element. ", "longdesc": "<p>This causes all of the functions that have been bound to the focus event to be executed. Note that this does not execute the focus method of the underlying elements.</p>", "params": [], "examples": [{"code": "$(document).ready(function(){\n  $(\"#login\").focus();\n});", "htmlCode": "$(document).ready(function(){\n  $(\"#login\").focus();\n});", "desc": "To focus on a login input box with id 'login' on page startup, try:", "css": "", "inhead": "", "html": "", "exampleId": "156iframeExample0", "runCode": ""}]}, "focus157": {"id": 157, "searchname": "focus", "name": "focus", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the focus event of each matched element.", "longdesc": "<p>The focus event fires when an element receives focus either via the pointing device or by tab navigation.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the focus event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"input\").focus(function () {\n         $(this).next(\"span\").css('display','inline').fadeOut(1000);\n    });\n", "htmlCode": "\n    $(\"input\").focus(function () {\n         $(this).next(\"span\").css('display','inline').fadeOut(1000);\n    });\n", "desc": "Fire focus.", "css": "span {display:none;}", "inhead": "", "html": "<p><input type=\"text\" /> <span>focus fire</span></p>\n<p><input type=\"password\" /> <span>focus fire</span></p>", "exampleId": "157iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"input\").focus(function () {\n         $(this).next(\"span\").css('display','inline').fadeOut(1000);\n    });\n\n  });\n</script>\n<style>\nspan {display:none;}\n</style>\n</head>\n<body>\n<p><input type=\"text\" /> <span>focus fire</span></p>\n<p><input type=\"password\" /> <span>focus fire</span></p>\n</body>\n</html>"}, {"code": "$(\"input[@type=text]\").focus(function(){\n  $(this).blur();\n});", "htmlCode": "$(\"input[@type=text]\").focus(function(){\n  $(this).blur();\n});", "desc": "To stop people from writing in text input boxes, try:", "css": "", "inhead": "", "html": "", "exampleId": "157iframeExample1", "runCode": ""}]}, "keydown158": {"id": 158, "searchname": "keydown", "name": "keydown", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Triggers the keydown event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to the keydown event to be executed, and calls the browser's default keydown action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the keydown event. The keydown event usually fires when a key on the keyboard is pressed.</p>", "params": [], "examples": []}, "keydown159": {"id": 159, "searchname": "keydown", "name": "keydown", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the keydown event of each matched element.", "longdesc": "<p>The keydown event fires when a key on the keyboard is pressed.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the keydown event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(window).keydown(function(event){\n  switch (event.keyCode) {\n    // ...\n    // different keys do different things\n    // Different browsers provide different codes\n    // see here for details: http://unixpapa.com/js/key.html    \n    // ...\n  }\n});", "htmlCode": "$(window).keydown(function(event){\n  switch (event.keyCode) {\n    // ...\n    // different keys do different things\n    // Different browsers provide different codes\n    // see here for details: http://unixpapa.com/js/key.html    \n    // ...\n  }\n});", "desc": "To perform actions in response to keyboard presses on a page, try:", "css": "", "inhead": "", "html": "", "exampleId": "159iframeExample0", "runCode": ""}]}, "keypress160": {"id": 160, "searchname": "keypress", "name": "keypress", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Triggers the keypress event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to the keypress event to be executed, and calls the browser's default keypress action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the keypress event. The keypress event usually fires when a key on the keyboard is pressed.\n</p>", "params": [], "examples": []}, "keypress161": {"id": 161, "searchname": "keypress", "name": "keypress", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the keypress event of each matched element.", "longdesc": "<p>The keypress event fires when a key on the keyboard is \"clicked\". A keypress is defined as a keydown and keyup on the same key. The sequence of these events is: <ul><li>keydown</li><li>keyup</li><li>keypress</li></ul></p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the keypress event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"input\").keypress(function (e) {\n      if (e.which == 32 || (65 <= e.which && e.which <= 65 + 25)\n                        || (97 <= e.which && e.which <= 97 + 25)) {\n        var c = String.fromCharCode(e.which);\n        $(\"p\").append($(\"<span/>\"))\n              .children(\":last\")\n              .append(document.createTextNode(c));\n      } else if (e.which == 8) {\n        // backspace in IE only be on keydown\n        $(\"p\").children(\":last\").remove();\n      }\n      $(\"div\").text(e.which);\n    });\n", "htmlCode": "\n    $(\"input\").keypress(function (e) {\n      if (e.which == 32 || (65 &lt;= e.which && e.which &lt;= 65 + 25)\n                        || (97 &lt;= e.which && e.which &lt;= 97 + 25)) {\n        var c = String.fromCharCode(e.which);\n        $(\"p\").append($(\"&lt;span/&gt;\"))\n              .children(\":last\")\n              .append(document.createTextNode(c));\n      } else if (e.which == 8) {\n        // backspace in IE only be on keydown\n        $(\"p\").children(\":last\").remove();\n      }\n      $(\"div\").text(e.which);\n    });\n", "desc": "Show spaces and letters when typed.", "css": "\n  input { margin:10px; }\n  p { color:blue; margin:10px; font-size:18px; }\n  p.hilite { background:yellow; }\n  div { color:red; }\n  ", "inhead": "", "html": "<input type=\"text\" />\n  <p>Add text - </p>\n  <div></div>", "exampleId": "161iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"input\").keypress(function (e) {\n      if (e.which == 32 || (65 <= e.which && e.which <= 65 + 25)\n                        || (97 <= e.which && e.which <= 97 + 25)) {\n        var c = String.fromCharCode(e.which);\n        $(\"p\").append($(\"<span/>\"))\n              .children(\":last\")\n              .append(document.createTextNode(c));\n      } else if (e.which == 8) {\n        // backspace in IE only be on keydown\n        $(\"p\").children(\":last\").remove();\n      }\n      $(\"div\").text(e.which);\n    });\n\n  });\n</script>\n<style>\n\n  input { margin:10px; }\n  p { color:blue; margin:10px; font-size:18px; }\n  p.hilite { background:yellow; }\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<input type=\"text\" />\n  <p>Add text - </p>\n  <div></div>\n</body>\n</html>"}]}, "keyup162": {"id": 162, "searchname": "keyup", "name": "keyup", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Triggers the keyup event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to the keyup event to be executed, and calls the browser's default keyup action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the keyup event. The keyup event usually fires when a key on the keyboard is released.</p>", "params": [], "examples": []}, "keyup163": {"id": 163, "searchname": "keyup", "name": "keyup", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the keyup event of each matched element.", "longdesc": "<p>The keyup event fires when a key on the keyboard is released.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the keyup event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(document).keyup(function(event){\n    if (event.keyCode == 27) {\n        alert('escaped!');\n    }\n});", "htmlCode": "$(document).keyup(function(event){\n    if (event.keyCode == 27) {\n        alert('escaped!');\n    }\n});", "desc": "To perform an action when the escape key has been released:", "css": "", "inhead": "", "html": "", "exampleId": "163iframeExample0", "runCode": ""}]}, "load164": {"id": 164, "searchname": "load", "name": "load", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the load event of each matched element.", "longdesc": "<p>When bound to the window element, the event fires when the user agent finishes loading all content within a document, including window, frames, objects and images. For elements, it fires when the target element and all of its content has finished loading. Note: load will work only if you set it before the element has completely loaded, if you set it after that nothing will happen. This doesn't happen in $(document).ready(), which jQuery handles it to work as expected, also when setting it after the DOM has loaded.\n </p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the load event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(window).load(function () {\n      // run code\n    });\n", "htmlCode": "\n    $(window).load(function () {\n      // run code\n    });\n", "desc": "Run a function when the page is fully loaded including graphics.", "css": "", "inhead": "", "html": "", "exampleId": "164iframeExample0", "runCode": ""}]}, "mousedown165": {"id": 165, "searchname": "mousedown", "name": "mousedown", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the mousedown event of each matched element.", "longdesc": "<p>The mousedown event fires when the pointing device button is pressed over an element.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the mousedown event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").mouseup(function(){\n      $(this).append('<span style=\"color:#F00;\">Mouse up.</span>');\n    }).mousedown(function(){\n      $(this).append('<span style=\"color:#00F;\">Mouse down.</span>');\n    });\n", "htmlCode": "\n    $(\"p\").mouseup(function(){\n      $(this).append('&lt;span style=\"color:#F00;\"&gt;Mouse up.&lt;/span&gt;');\n    }).mousedown(function(){\n      $(this).append('&lt;span style=\"color:#00F;\"&gt;Mouse down.&lt;/span&gt;');\n    });\n", "desc": "Show texts when mouseup and mousedown event triggering.", "css": "", "inhead": "", "html": "<p>Press mouse and release here.</p>\n", "exampleId": "165iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").mouseup(function(){\n      $(this).append('<span style=\"color:#F00;\">Mouse up.</span>');\n    }).mousedown(function(){\n      $(this).append('<span style=\"color:#00F;\">Mouse down.</span>');\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Press mouse and release here.</p>\n\n</body>\n</html>"}]}, "mousemove166": {"id": 166, "searchname": "mousemove", "name": "mousemove", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the mousemove event of each matched element.", "longdesc": "<p>The mousemove event fires when the pointing device is moved while it is over an element. The event handler is passed one variable - the event object. Its .clientX and .clientY properties represent the coordinates of the mouse.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the mousmove event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"div\").mousemove(function(e){\n      var pageCoords = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      var clientCoords = \"( \" + e.clientX + \", \" + e.clientY + \" )\";\n      $(\"span:first\").text(\"( e.pageX, e.pageY ) - \" + pageCoords);\n      $(\"span:last\").text(\"( e.clientX, e.clientY ) - \" + clientCoords);\n    });\n", "htmlCode": "\n    $(\"div\").mousemove(function(e){\n      var pageCoords = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      var clientCoords = \"( \" + e.clientX + \", \" + e.clientY + \" )\";\n      $(\"span:first\").text(\"( e.pageX, e.pageY ) - \" + pageCoords);\n      $(\"span:last\").text(\"( e.clientX, e.clientY ) - \" + clientCoords);\n    });\n", "desc": "Show the mouse coordinates when the mouse is moved over the yellow div.  Coordinates are relative to the window which in this case is the iframe.", "css": "\n  div { width:250px; height:170px; margin;10px; margin-right:50px;\n        background:yellow; border:2px groove; float:right; }\n  p { margin:0; margin-left:10px; color:red; width:250px;\n      height:120px; padding-top:70px;\n      float:left; font-size:14px; }\n  span { display:block; }\n  ", "inhead": "", "html": "<p>   \n    Try scrolling too.\n    <span>Move the mouse over the div.</span>\n    <span>&nbsp;</span>\n  </p>\n  <div></div>", "exampleId": "166iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").mousemove(function(e){\n      var pageCoords = \"( \" + e.pageX + \", \" + e.pageY + \" )\";\n      var clientCoords = \"( \" + e.clientX + \", \" + e.clientY + \" )\";\n      $(\"span:first\").text(\"( e.pageX, e.pageY ) - \" + pageCoords);\n      $(\"span:last\").text(\"( e.clientX, e.clientY ) - \" + clientCoords);\n    });\n\n  });\n</script>\n<style>\n\n  div { width:250px; height:170px; margin;10px; margin-right:50px;\n        background:yellow; border:2px groove; float:right; }\n  p { margin:0; margin-left:10px; color:red; width:250px;\n      height:120px; padding-top:70px;\n      float:left; font-size:14px; }\n  span { display:block; }\n  \n</style>\n</head>\n<body>\n<p>   \n    Try scrolling too.\n    <span>Move the mouse over the div.</span>\n    <span>&nbsp;</span>\n  </p>\n  <div></div>\n</body>\n</html>"}]}, "mouseout167": {"id": 167, "searchname": "mouseout", "name": "mouseout", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the mouseout event of each matched element.", "longdesc": "<p>The mouseout event fires when the pointing device is moved away from an element.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the mouseout event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    var i = 0;\n    $(\"div.overout\").mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n      $(\"p:last\",this).text(++i);\n    }).mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n      $(\"p:last\",this).text(++n);\n    });\n", "htmlCode": "\n    var i = 0;\n    $(\"div.overout\").mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n      $(\"p:last\",this).text(++i);\n    }).mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n      $(\"p:last\",this).text(++n);\n    });\n", "desc": "Show texts when mouseover and mouseout event triggering.\n<strong>Mouseout</strong> fires when pointer move into or out from child element, while <strong>mouseleave</strong> doesn't.", "css": "\ndiv.out {\nwidth:40%;\nheight:120px;\nmargin:0 15px;\nbackground-color:#D6EDFC;\nfloat:left;\n}\ndiv.in {\nwidth:60%;\nheight:60%;\nbackground-color:#FFCC00;\nmargin:10px auto;\n}\np {\nline-height:1em;\nmargin:0;\npadding:0;\n}\n", "inhead": "", "html": "\n<div class=\"out overout\"><p>move your mouse</p><div class=\"in overout\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n<div class=\"out enterleave\"><p>move your mouse</p><div class=\"in enterleave\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n", "exampleId": "167iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var i = 0;\n    $(\"div.overout\").mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n      $(\"p:last\",this).text(++i);\n    }).mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n      $(\"p:last\",this).text(++n);\n    });\n\n  });\n</script>\n<style>\n\ndiv.out {\nwidth:40%;\nheight:120px;\nmargin:0 15px;\nbackground-color:#D6EDFC;\nfloat:left;\n}\ndiv.in {\nwidth:60%;\nheight:60%;\nbackground-color:#FFCC00;\nmargin:10px auto;\n}\np {\nline-height:1em;\nmargin:0;\npadding:0;\n}\n\n</style>\n</head>\n<body>\n\n<div class=\"out overout\"><p>move your mouse</p><div class=\"in overout\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n<div class=\"out enterleave\"><p>move your mouse</p><div class=\"in enterleave\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n\n</body>\n</html>"}]}, "mouseover168": {"id": 168, "searchname": "mouseover", "name": "mouseover", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the mouseover event of each matched element.", "longdesc": "<p>The mouseover event fires when the pointing device is moved onto an element.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the mouseover event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    var i = 0;\n    $(\"div.overout\").mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n      $(\"p:last\",this).text(++i);\n    }).mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n      $(\"p:last\",this).text(++n);\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n    });\n", "htmlCode": "\n    var i = 0;\n    $(\"div.overout\").mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n      $(\"p:last\",this).text(++i);\n    }).mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n      $(\"p:last\",this).text(++n);\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n    });\n", "desc": "Show texts when mouseover and mouseout event triggering.\n<strong>Mouseover</strong> fires when the pointer moves into or out from child element, while <strong>mouseenter</strong> does't.", "css": "\ndiv.out {\nwidth:40%;\nheight:120px;\nmargin:0 15px;\nbackground-color:#D6EDFC;\nfloat:left;\n}\ndiv.in {\nwidth:60%;\nheight:60%;\nbackground-color:#FFCC00;\nmargin:10px auto;\n}\np {\nline-height:1em;\nmargin:0;\npadding:0;\n}\n", "inhead": "", "html": "\n<div class=\"out overout\"><p>move your mouse</p><div class=\"in overout\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n<div class=\"out enterleave\"><p>move your mouse</p><div class=\"in enterleave\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n", "exampleId": "168iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var i = 0;\n    $(\"div.overout\").mouseover(function(){\n      $(\"p:first\",this).text(\"mouse over\");\n      $(\"p:last\",this).text(++i);\n    }).mouseout(function(){\n      $(\"p:first\",this).text(\"mouse out\");\n    });\n\n    var n = 0;\n    $(\"div.enterleave\").bind(\"mouseenter\",function(){\n      $(\"p:first\",this).text(\"mouse enter\");\n      $(\"p:last\",this).text(++n);\n    }).bind(\"mouseleave\",function(){\n      $(\"p:first\",this).text(\"mouse leave\");\n    });\n\n  });\n</script>\n<style>\n\ndiv.out {\nwidth:40%;\nheight:120px;\nmargin:0 15px;\nbackground-color:#D6EDFC;\nfloat:left;\n}\ndiv.in {\nwidth:60%;\nheight:60%;\nbackground-color:#FFCC00;\nmargin:10px auto;\n}\np {\nline-height:1em;\nmargin:0;\npadding:0;\n}\n\n</style>\n</head>\n<body>\n\n<div class=\"out overout\"><p>move your mouse</p><div class=\"in overout\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n<div class=\"out enterleave\"><p>move your mouse</p><div class=\"in enterleave\"><p>move your mouse</p><p>0</p></div><p>0</p></div>\n\n</body>\n</html>"}]}, "mouseup169": {"id": 169, "searchname": "mouseup", "name": "mouseup", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the mouseup event of each matched element.", "longdesc": "<p>The mouseup event fires when the pointing device button is released over an element.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the mouseup event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").mouseup(function(){\n      $(this).append('<span style=\"color:#F00;\">Mouse up.</span>');\n    }).mousedown(function(){\n      $(this).append('<span style=\"color:#00F;\">Mouse down.</span>');\n    });\n", "htmlCode": "\n    $(\"p\").mouseup(function(){\n      $(this).append('&lt;span style=\"color:#F00;\"&gt;Mouse up.&lt;/span&gt;');\n    }).mousedown(function(){\n      $(this).append('&lt;span style=\"color:#00F;\"&gt;Mouse down.&lt;/span&gt;');\n    });\n", "desc": "Show texts when mouseup and mousedown event triggering.", "css": "", "inhead": "", "html": "<p>Press mouse and release here.</p>\n", "exampleId": "169iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").mouseup(function(){\n      $(this).append('<span style=\"color:#F00;\">Mouse up.</span>');\n    }).mousedown(function(){\n      $(this).append('<span style=\"color:#00F;\">Mouse down.</span>');\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Press mouse and release here.</p>\n\n</body>\n</html>"}]}, "resize170": {"id": 170, "searchname": "resize", "name": "resize", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the resize event of each matched element.", "longdesc": "<p>The resize event fires when a document view is resized</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the resize event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(window).resize(function(){\n  alert(\"Stop it!\");\n});", "htmlCode": "$(window).resize(function(){\n  alert(\"Stop it!\");\n});", "desc": "To make resizing the web page window a pain in the neck, try:", "css": "", "inhead": "", "html": "", "exampleId": "170iframeExample0", "runCode": ""}]}, "scroll171": {"id": 171, "searchname": "scroll", "name": "scroll", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the scroll event of each matched element.", "longdesc": "<p>The scroll event fires when a document view is scrolled.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the scroll event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(window).scroll(function () { \n      $(\"span\").css(\"display\", \"inline\").fadeOut(\"slow\"); \n    });\n", "htmlCode": "\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(window).scroll(function () { \n      $(\"span\").css(\"display\", \"inline\").fadeOut(\"slow\"); \n    });\n", "desc": "To do something when your page is scrolled:", "css": "\n  div { color:blue; }\n  p { color:green; }\n  span { color:red; display:none; }\n  ", "inhead": "", "html": "<div>Try scrolling the iframe.</div>\n  <p>Paragraph - <span>Scroll happened!</span></p>", "exampleId": "171iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(\"p\").clone().appendTo(document.body);\n    $(window).scroll(function () { \n      $(\"span\").css(\"display\", \"inline\").fadeOut(\"slow\"); \n    });\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  p { color:green; }\n  span { color:red; display:none; }\n  \n</style>\n</head>\n<body>\n<div>Try scrolling the iframe.</div>\n  <p>Paragraph - <span>Scroll happened!</span></p>\n</body>\n</html>"}]}, "select172": {"id": 172, "searchname": "select", "name": "select", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Trigger the select event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that select event to be executed, and calls the browser's default select action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the select event.</p><p>\nNote: Do not confuse the \"select\" event with the \"change\" event, which is the one triggered when an html \"select\" element is having its selected option modified by the user.</p>", "params": [], "examples": [{"code": "$(\"input\").select();", "htmlCode": "$(\"input\").select();", "desc": "To trigger the select event on all input elements, try:", "css": "", "inhead": "", "html": "", "exampleId": "172iframeExample0", "runCode": ""}]}, "select173": {"id": 173, "searchname": "select", "name": "select", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the select event of each matched element.", "longdesc": "<p>The select event fires when a user selects some text in a text field, including input and textarea.</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the select event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(document).select( function () { \n      $(\"div\").text(\"Something was selected\").show().fadeOut(1000); \n    });\n", "htmlCode": "\n    $(document).select( function () { \n      $(\"div\").text(\"Something was selected\").show().fadeOut(1000); \n    });\n", "desc": "To do something when text in input boxes is selected:", "css": "\n  p { color:blue; }\n  div { color:red; }\n  ", "inhead": "", "html": "<p>\n    Click and drag the mouse to select text in the inputs.\n  </p>\n  <input type=\"text\" value=\"Some text\" />\n  <input type=\"text\" value=\"to test on\" />\n  <div></div>", "exampleId": "173iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document).select( function () { \n      $(\"div\").text(\"Something was selected\").show().fadeOut(1000); \n    });\n\n  });\n</script>\n<style>\n\n  p { color:blue; }\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<p>\n    Click and drag the mouse to select text in the inputs.\n  </p>\n  <input type=\"text\" value=\"Some text\" />\n  <input type=\"text\" value=\"to test on\" />\n  <div></div>\n</body>\n</html>"}]}, "submit174": {"id": 174, "searchname": "submit", "name": "submit", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Trigger the submit event of each matched element.", "longdesc": "<p>This causes all of the functions that have been bound to that submit event to be executed, and calls the browser's default submit action on the matching element(s). This default action can be prevented by returning false from one of the functions bound to the submit event.</p>", "params": [], "examples": [{"code": "$(\"form:first\").submit();", "htmlCode": "$(\"form:first\").submit();", "desc": "To trigger the submit event on the first form on the page, try:", "css": "", "inhead": "", "html": "", "exampleId": "174iframeExample0", "runCode": ""}]}, "submit175": {"id": 175, "searchname": "submit", "name": "submit", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Bind a function to the submit event of each matched element.", "longdesc": "<p>The select event fires when a form is submitted</p>", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "A function to bind to the submit event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"form\").submit(function() {\n      if ($(\"input:first\").val() == \"correct\") {\n        $(\"span\").text(\"Validated...\").show();\n        return true;\n      }\n      $(\"span\").text(\"Not valid!\").show().fadeOut(1000);\n      return false;\n    });\n", "htmlCode": "\n    $(\"form\").submit(function() {\n      if ($(\"input:first\").val() == \"correct\") {\n        $(\"span\").text(\"Validated...\").show();\n        return true;\n      }\n      $(\"span\").text(\"Not valid!\").show().fadeOut(1000);\n      return false;\n    });\n", "desc": "If you'd like to prevent forms from being submitted unless a flag variable is set, try:", "css": "\n  p { margin:0; color:blue; }\n  div,p { margin-left:10px; }\n  span { color:red; }\n  ", "inhead": "", "html": "<p>Type 'correct' to validate.</p>\n  <form action=\"javascript:alert('success!');\">\n    <div>\n      <input type=\"text\" />\n      <input type=\"submit\" />\n    </div>\n  </form>\n  <span></span>", "exampleId": "175iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"form\").submit(function() {\n      if ($(\"input:first\").val() == \"correct\") {\n        $(\"span\").text(\"Validated...\").show();\n        return true;\n      }\n      $(\"span\").text(\"Not valid!\").show().fadeOut(1000);\n      return false;\n    });\n\n  });\n</script>\n<style>\n\n  p { margin:0; color:blue; }\n  div,p { margin-left:10px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<p>Type 'correct' to validate.</p>\n  <form action=\"javascript:alert('success!');\">\n    <div>\n      <input type=\"text\" />\n      <input type=\"submit\" />\n    </div>\n  </form>\n  <span></span>\n</body>\n</html>"}, {"code": "$(\"form\").submit( function () {\n  return this.some_flag_variable;\n} );", "htmlCode": "$(\"form\").submit( function () {\n  return this.some_flag_variable;\n} );", "desc": "If you'd like to prevent forms from being submitted unless a flag variable is set, try:", "css": "", "inhead": "", "html": "", "exampleId": "175iframeExample1", "runCode": ""}]}, "unload176": {"id": 176, "searchname": "unload", "name": "unload", "type": "function", "category": "Events", "subcategory": "Event Helpers", "return": "jQuery", "added": "", "sample": "", "desc": "Binds a function to the unload event of each matched element.", "longdesc": "", "params": [{"optional": false, "name": "fn", "type": "Function", "desc": "function to bind to the unload event on each of the matched elements.\n<pre>function callback(eventObject) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(window).unload( function () { alert(\"Bye now!\"); } );", "htmlCode": "$(window).unload( function () { alert(\"Bye now!\"); } );", "desc": "To display an alert when a page is unloaded:", "css": "", "inhead": "", "html": "", "exampleId": "176iframeExample0", "runCode": ""}]}, "show177": {"id": 177, "searchname": "show", "name": "show", "type": "function", "category": "Effects", "subcategory": "Basics", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Displays each of the set of matched elements if they are hidden.", "longdesc": "<p>Same as <a href='Effects/show#speedcallback'>show( speed, [callback] )</a> without animations. Doesn't change anything if the selected elements are all visible. It doesn't matter if the element is hidden via a hide() call, or via a display:none in a stylesheet.</p>", "params": [], "examples": [{"code": "$(\"p\").show()", "htmlCode": "$(\"p\").show()", "desc": "Shows all paragraphs.", "css": "", "inhead": "", "html": "<p style=\"display:none\">Hello</p>", "exampleId": "177iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"p\").show()\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p style=\"display:none\">Hello</p>\n</body>\n</html>"}]}, "show178": {"id": 178, "searchname": "show", "name": "show", "type": "function", "category": "Effects", "subcategory": "Basics", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Show all matched elements using a graceful animation and firing an optional callback after completion.", "longdesc": "<p>The height, width, and opacity of each of the matched elements are changed dynamically according to the specified speed.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").show(\"slow\");\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").show(\"slow\");\n    });\n", "desc": "Animates all hidden paragraphs to show slowly, completing the animation within 600 milliseconds.", "css": "\n  p { background:yellow; }\n  ", "inhead": "", "html": "<button>Show it</button>\n  <p style=\"display: none\">Hello</p>", "exampleId": "178iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").show(\"slow\");\n    });\n\n  });\n</script>\n<style>\n\n  p { background:yellow; }\n  \n</style>\n</head>\n<body>\n<button>Show it</button>\n  <p style=\"display: none\">Hello</p>\n</body>\n</html>"}, {"code": "\n    $(\"#showr\").click(function () {\n      $(\"div:eq(0)\").show(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).next().show(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#hidr\").click(function () {\n      $(\"div\").hide(2000);\n    });\n", "htmlCode": "\n    $(\"#showr\").click(function () {\n      $(\"div:eq(0)\").show(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).next().show(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#hidr\").click(function () {\n      $(\"div\").hide(2000);\n    });\n", "desc": "Animates all hidden divs to show fastly in order, completing each animation within 200 milliseconds. Once each animation is done, it starts the next one.", "css": "\n  div { background:#def3ca; margin:3px; width:80px; \n        display:none; float:left; text-align:center; }\n  ", "inhead": "", "html": "<button id=\"showr\">Show</button>\n  <button id=\"hidr\">Hide</button>\n  <div>Hello,</div>\n  <div>how</div>\n  <div>are</div>\n  <div>you?</div>", "exampleId": "178iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#showr\").click(function () {\n      $(\"div:eq(0)\").show(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).next().show(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#hidr\").click(function () {\n      $(\"div\").hide(2000);\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#def3ca; margin:3px; width:80px; \n        display:none; float:left; text-align:center; }\n  \n</style>\n</head>\n<body>\n<button id=\"showr\">Show</button>\n  <button id=\"hidr\">Hide</button>\n  <div>Hello,</div>\n  <div>how</div>\n  <div>are</div>\n  <div>you?</div>\n</body>\n</html>"}, {"code": "\n    function doIt() {\n      $(\"span,div\").show(\"normal\");\n    }\n    $(\"button\").click(doIt); // can pass in function name\n    $(\"form\").submit(function () {\n      if ($(\"input\").val() == \"yes\") {\n        $(\"p\").show(4000, function () {\n          $(this).text(\"Ok, DONE! (now showing)\");\n        });\n      }\n      $(\"span,div\").hide(\"normal\");\n      return false; // to stop the submit\n    });\n", "htmlCode": "\n    function doIt() {\n      $(\"span,div\").show(\"normal\");\n    }\n    $(\"button\").click(doIt); // can pass in function name\n    $(\"form\").submit(function () {\n      if ($(\"input\").val() == \"yes\") {\n        $(\"p\").show(4000, function () {\n          $(this).text(\"Ok, DONE! (now showing)\");\n        });\n      }\n      $(\"span,div\").hide(\"normal\");\n      return false; // to stop the submit\n    });\n", "desc": "Animates all span and input elements to show normally. Once the animation is done, it changes the text.", "css": "\n  span { display:none; }\n  div { display:none; }\n  p { font-weight:bold; background-color:#fcd; }\n  ", "inhead": "", "html": "<button>Do it!</button>\n  <span>Are you sure? (type 'yes' if you are) </span>\n  <div>\n    <form>\n      <input type=\"text\" />\n    </form>\n  </div>\n  <p style=\"display:none;\">I'm hidden...</p>", "exampleId": "178iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function doIt() {\n      $(\"span,div\").show(\"normal\");\n    }\n    $(\"button\").click(doIt); // can pass in function name\n    $(\"form\").submit(function () {\n      if ($(\"input\").val() == \"yes\") {\n        $(\"p\").show(4000, function () {\n          $(this).text(\"Ok, DONE! (now showing)\");\n        });\n      }\n      $(\"span,div\").hide(\"normal\");\n      return false; // to stop the submit\n    });\n\n  });\n</script>\n<style>\n\n  span { display:none; }\n  div { display:none; }\n  p { font-weight:bold; background-color:#fcd; }\n  \n</style>\n</head>\n<body>\n<button>Do it!</button>\n  <span>Are you sure? (type 'yes' if you are) </span>\n  <div>\n    <form>\n      <input type=\"text\" />\n    </form>\n  </div>\n  <p style=\"display:none;\">I'm hidden...</p>\n</body>\n</html>"}]}, "hide179": {"id": 179, "searchname": "hide", "name": "hide", "type": "function", "category": "Effects", "subcategory": "Basics", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Hides each of the set of matched elements if they are shown.", "longdesc": "<p>Same as <a href='Effects/hide#speedcallback'>hide( speed, [callback] )</a> without animations. Doesn't change anything if the selected elements are all hidden.</p>", "params": [], "examples": [{"code": "\n    $(\"p\").hide();\n    $(\"a\").click(function () {\n      $(this).hide();\n      return false;\n    });\n", "htmlCode": "\n    $(\"p\").hide();\n    $(\"a\").click(function () {\n      $(this).hide();\n      return false;\n    });\n", "desc": "Hides all paragraphs then the link on click.", "css": "", "inhead": "", "html": "<p>Hello</p>\n  <a href=\"#\">Click to hide me too</a>\n  <p>Here is another paragraph</p>", "exampleId": "179iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").hide();\n    $(\"a\").click(function () {\n      $(this).hide();\n      return false;\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>Hello</p>\n  <a href=\"#\">Click to hide me too</a>\n  <p>Here is another paragraph</p>\n</body>\n</html>"}]}, "hide180": {"id": 180, "searchname": "hide", "name": "hide", "type": "function", "category": "Effects", "subcategory": "Basics", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Hide all matched elements using a graceful animation and firing an optional callback after completion.", "longdesc": "<p>The height, width, and opacity of each of the matched elements are changed dynamically according to the specified speed.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").hide(\"slow\");\n    });    \n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").hide(\"slow\");\n    });    \n", "desc": "Animates all shown paragraphs to hide slowly, completing the animation within 600 milliseconds.", "css": "\n  p { background:#dad; font-weight:bold; }\n  ", "inhead": "", "html": "<button>Hide 'em</button>\n  <p>Hiya</p>\n  <p>Such interesting text, eh?</p>", "exampleId": "180iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").hide(\"slow\");\n    });    \n\n  });\n</script>\n<style>\n\n  p { background:#dad; font-weight:bold; }\n  \n</style>\n</head>\n<body>\n<button>Hide 'em</button>\n  <p>Hiya</p>\n  <p>Such interesting text, eh?</p>\n</body>\n</html>"}, {"code": "\n    $(\"#hidr\").click(function () {\n      $(\"span:last-child\").hide(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).prev().hide(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#showr\").click(function () {\n      $(\"span\").show(2000);\n    });\n", "htmlCode": "\n    $(\"#hidr\").click(function () {\n      $(\"span:last-child\").hide(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).prev().hide(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#showr\").click(function () {\n      $(\"span\").show(2000);\n    });\n", "desc": "Animates all spans (words in this case) to hide fastly, completing each animation within 200 milliseconds. Once each animation is done, it starts the next one.", "css": "\n  span { background:#def3ca; padding:3px; float:left; }\n  ", "inhead": "", "html": "<button id=\"hidr\">Hide</button>\n  <button id=\"showr\">Show</button>\n  <div>\n    <span>Once</span> <span>upon</span> <span>a</span> \n    <span>time</span> <span>there</span> <span>were</span> \n    <span>three</span> <span>programmers...</span>\n  </div>", "exampleId": "180iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#hidr\").click(function () {\n      $(\"span:last-child\").hide(\"fast\", function () {\n        // use callee so don't have to name the function\n        $(this).prev().hide(\"fast\", arguments.callee); \n      });\n    });\n    $(\"#showr\").click(function () {\n      $(\"span\").show(2000);\n    });\n\n  });\n</script>\n<style>\n\n  span { background:#def3ca; padding:3px; float:left; }\n  \n</style>\n</head>\n<body>\n<button id=\"hidr\">Hide</button>\n  <button id=\"showr\">Show</button>\n  <div>\n    <span>Once</span> <span>upon</span> <span>a</span> \n    <span>time</span> <span>there</span> <span>were</span> \n    <span>three</span> <span>programmers...</span>\n  </div>\n</body>\n</html>"}, {"code": "\n    for (var i = 0; i < 5; i++) {\n      $(\"<div>\").appendTo(document.body);\n    }\n    $(\"div\").click(function () {\n      $(this).hide(2000, function () {\n        $(this).remove();\n      });\n    });\n", "htmlCode": "\n    for (var i = 0; i &lt; 5; i++) {\n      $(\"&lt;div&gt;\").appendTo(document.body);\n    }\n    $(\"div\").click(function () {\n      $(this).hide(2000, function () {\n        $(this).remove();\n      });\n    });\n", "desc": "Hides the divs when clicked over 2 seconds, then removes the div element when its hidden.  Try clicking on more than one box at a time.", "css": "\n  div { background:#ece0fb; width:30px; \n        height:40px; margin:2px; float:left; }\n  ", "inhead": "", "html": "<div></div>", "exampleId": "180iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    for (var i = 0; i < 5; i++) {\n      $(\"<div>\").appendTo(document.body);\n    }\n    $(\"div\").click(function () {\n      $(this).hide(2000, function () {\n        $(this).remove();\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#ece0fb; width:30px; \n        height:40px; margin:2px; float:left; }\n  \n</style>\n</head>\n<body>\n<div></div>\n</body>\n</html>"}]}, "toggle181": {"id": 181, "searchname": "toggle", "name": "toggle", "type": "function", "category": "Effects", "subcategory": "Basics", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Toggles displaying each of the set of matched elements.", "longdesc": "<p>If they are shown, toggle makes them hidden. If they are hidden, toggle makes them shown.</p>", "params": [], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").toggle();\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").toggle();\n    });\n", "desc": "Toggles all paragraphs.", "css": "", "inhead": "", "html": "<button>Toggle</button>\n  <p>Hello</p>\n  <p style=\"display: none\">Good Bye</p>", "exampleId": "181iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").toggle();\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<button>Toggle</button>\n  <p>Hello</p>\n  <p style=\"display: none\">Good Bye</p>\n</body>\n</html>"}]}, "slidedown182": {"id": 182, "searchname": "slidedown", "name": "slideDown", "type": "function", "category": "Effects", "subcategory": "Sliding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Reveal all matched elements by adjusting their height and firing an optional callback after completion.", "longdesc": "<p>Only the height is adjusted for this animation, causing all matched elements to be revealed in a \"sliding\" manner.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").slideDown(\"slow\");\n      } else {\n        $(\"div\").hide();\n      }\n    });\n", "htmlCode": "\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").slideDown(\"slow\");\n      } else {\n        $(\"div\").hide();\n      }\n    });\n", "desc": "Animates all divs to slide down and show themselves over 600 milliseconds.", "css": "\n  div { background:#de9a44; margin:3px; width:80px; \n        height:40px; display:none; float:left; }\n  ", "inhead": "", "html": "Click me!\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "182iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").slideDown(\"slow\");\n      } else {\n        $(\"div\").hide();\n      }\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#de9a44; margin:3px; width:80px; \n        height:40px; display:none; float:left; }\n  \n</style>\n</head>\n<body>\nClick me!\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    $(\"div\").click(function () {\n      $(this).css({ borderStyle:\"inset\", cursor:\"wait\" });\n      $(\"input\").slideDown(1000,function(){\n        $(this).css(\"border\", \"2px red inset\")\n               .filter(\".middle\")\n                 .css(\"background\", \"yellow\")\n                 .focus();\n        $(\"div\").css(\"visibility\", \"hidden\");\n      });\n    });\n", "htmlCode": "\n    $(\"div\").click(function () {\n      $(this).css({ borderStyle:\"inset\", cursor:\"wait\" });\n      $(\"input\").slideDown(1000,function(){\n        $(this).css(\"border\", \"2px red inset\")\n               .filter(\".middle\")\n                 .css(\"background\", \"yellow\")\n                 .focus();\n        $(\"div\").css(\"visibility\", \"hidden\");\n      });\n    });\n", "desc": "Animates all inputs to slide down, completing the animation within 1000 milliseconds. Once the animation is done, the input look is changed especially if it is the middle input which gets the focus.", "css": "\n  div { background:#cfd; margin:3px; width:50px; \n        text-align:center; float:left; cursor:pointer;\n        border:2px outset black; font-weight:bolder; }\n  input { display:none; width:120px; float:left; \n          margin:10px; }\n  ", "inhead": "", "html": "<div>Push!</div>\n  <input type=\"text\" />\n  <input type=\"text\" class=\"middle\" />\n  <input type=\"text\" />", "exampleId": "182iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").click(function () {\n      $(this).css({ borderStyle:\"inset\", cursor:\"wait\" });\n      $(\"input\").slideDown(1000,function(){\n        $(this).css(\"border\", \"2px red inset\")\n               .filter(\".middle\")\n                 .css(\"background\", \"yellow\")\n                 .focus();\n        $(\"div\").css(\"visibility\", \"hidden\");\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#cfd; margin:3px; width:50px; \n        text-align:center; float:left; cursor:pointer;\n        border:2px outset black; font-weight:bolder; }\n  input { display:none; width:120px; float:left; \n          margin:10px; }\n  \n</style>\n</head>\n<body>\n<div>Push!</div>\n  <input type=\"text\" />\n  <input type=\"text\" class=\"middle\" />\n  <input type=\"text\" />\n</body>\n</html>"}]}, "slideup183": {"id": 183, "searchname": "slideup", "name": "slideUp", "type": "function", "category": "Effects", "subcategory": "Sliding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Hide all matched elements by adjusting their height and firing an optional callback after completion.", "longdesc": "<p>Only the height is adjusted for this animation, causing all matched elements to be hidden in a \"sliding\" manner.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").show(\"slow\");\n      } else {\n        $(\"div\").slideUp();\n      }\n    });\n", "htmlCode": "\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").show(\"slow\");\n      } else {\n        $(\"div\").slideUp();\n      }\n    });\n", "desc": "Animates all divs to slide up, completing the animation within 400 milliseconds.", "css": "\n  div { background:#3d9a44; margin:3px; width:80px; \n        height:40px; float:left; }\n  ", "inhead": "", "html": "Click me!\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>", "exampleId": "183iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function () {\n      if ($(\"div:first\").is(\":hidden\")) {\n        $(\"div\").show(\"slow\");\n      } else {\n        $(\"div\").slideUp();\n      }\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#3d9a44; margin:3px; width:80px; \n        height:40px; float:left; }\n  \n</style>\n</head>\n<body>\nClick me!\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n  <div></div>\n</body>\n</html>"}, {"code": "\n    $(\"button\").click(function () {\n      $(this).parent().slideUp(\"slow\", function () {\n        $(\"#msg\").text($(\"button\", this).text() + \" has completed.\");\n      });\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(this).parent().slideUp(\"slow\", function () {\n        $(\"#msg\").text($(\"button\", this).text() + \" has completed.\");\n      });\n    });\n", "desc": "Animates all paragraph to slide up, completing the animation within 200 milliseconds. Once the animation is done, it displays an alert.", "css": "\n  div { margin:2px; }\n  ", "inhead": "", "html": "<div>\n    <button>Hide One</button>\n    <input type=\"text\" value=\"One\" />\n  </div>\n  <div>\n    <button>Hide Two</button>\n    <input type=\"text\" value=\"Two\" />\n  </div>\n  <div>\n    <button>Hide Three</button>\n    <input type=\"text\" value=\"Three\" />\n  </div>\n  <div id=\"msg\"></div>", "exampleId": "183iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(this).parent().slideUp(\"slow\", function () {\n        $(\"#msg\").text($(\"button\", this).text() + \" has completed.\");\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:2px; }\n  \n</style>\n</head>\n<body>\n<div>\n    <button>Hide One</button>\n    <input type=\"text\" value=\"One\" />\n  </div>\n  <div>\n    <button>Hide Two</button>\n    <input type=\"text\" value=\"Two\" />\n  </div>\n  <div>\n    <button>Hide Three</button>\n    <input type=\"text\" value=\"Three\" />\n  </div>\n  <div id=\"msg\"></div>\n</body>\n</html>"}]}, "slidetoggle184": {"id": 184, "searchname": "slidetoggle", "name": "slideToggle", "type": "function", "category": "Effects", "subcategory": "Sliding", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Toggle the visibility of all matched elements by adjusting their height and firing an optional callback after completion.", "longdesc": "<p>Only the height is adjusted for this animation, causing all matched elements to be hidden or shown in a \"sliding\" manner.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"p\").slideToggle(\"slow\");\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"p\").slideToggle(\"slow\");\n    });\n", "desc": "Animates all paragraphs to slide up or down, completing the animation within 600 milliseconds.", "css": "\n  p { width:400px; }\n  ", "inhead": "", "html": "<button>Toggle</button>\n  <p>\n    This is the paragraph to end all paragraphs.  You\n    should feel <em>lucky</em> to have seen such a paragraph in\n    your life.  Congratulations!\n  </p>", "exampleId": "184iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"p\").slideToggle(\"slow\");\n    });\n\n  });\n</script>\n<style>\n\n  p { width:400px; }\n  \n</style>\n</head>\n<body>\n<button>Toggle</button>\n  <p>\n    This is the paragraph to end all paragraphs.  You\n    should feel <em>lucky</em> to have seen such a paragraph in\n    your life.  Congratulations!\n  </p>\n</body>\n</html>"}, {"code": "\n    $(\"button\").click(function () {\n      $(\"div:not(.still)\").slideToggle(\"slow\", function () {\n        var n = parseInt($(\"span\").text(), 10);\n        $(\"span\").text(n + 1);\n      });\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"div:not(.still)\").slideToggle(\"slow\", function () {\n        var n = parseInt($(\"span\").text(), 10);\n        $(\"span\").text(n + 1);\n      });\n    });\n", "desc": "Animates divs between dividers with a toggle that makes some appear and some disappear.", "css": "\n  div { background:#b977d1; margin:3px; width:60px; \n        height:60px; float:left; }\n  div.still { background:#345; width:5px; }\n  div.hider { display:none; }\n  span { color:red; }\n  ", "inhead": "", "html": "<button>Toggle</button> There have been <span>0</span> toggled divs.\n  <div></div><div class=\"still\"></div>\n  <div style=\"display:none;\"></div><div class=\"still\"></div>\n  <div></div><div class=\"still\"></div>\n  <div class=\"hider\"></div><div class=\"still\"></div>\n  <div class=\"hider\"></div><div class=\"still\"></div>\n  <div></div>", "exampleId": "184iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"div:not(.still)\").slideToggle(\"slow\", function () {\n        var n = parseInt($(\"span\").text(), 10);\n        $(\"span\").text(n + 1);\n      });\n    });\n\n  });\n</script>\n<style>\n\n  div { background:#b977d1; margin:3px; width:60px; \n        height:60px; float:left; }\n  div.still { background:#345; width:5px; }\n  div.hider { display:none; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<button>Toggle</button> There have been <span>0</span> toggled divs.\n  <div></div><div class=\"still\"></div>\n  <div style=\"display:none;\"></div><div class=\"still\"></div>\n  <div></div><div class=\"still\"></div>\n  <div class=\"hider\"></div><div class=\"still\"></div>\n  <div class=\"hider\"></div><div class=\"still\"></div>\n  <div></div>\n</body>\n</html>"}]}, "fadein185": {"id": 185, "searchname": "fadein", "name": "fadeIn", "type": "function", "category": "Effects", "subcategory": "Fading", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Fade in all matched elements by adjusting their opacity and firing an optional callback after completion.", "longdesc": "<p>Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(document.body).click(function () {\n      $(\"div:hidden:first\").fadeIn(\"slow\");\n    });\n", "htmlCode": "\n    $(document.body).click(function () {\n      $(\"div:hidden:first\").fadeIn(\"slow\");\n    });\n", "desc": "Animates hidden divs to fade in one by one, completing each animation within 600 milliseconds.", "css": "\n  span { color:red; cursor:pointer; }\n  div { margin:3px; width:80px; display:none;\n        height:80px; float:left; }\n  div#one { background:#f00; }\n  div#two { background:#0f0; }\n  div#three { background:#00f; }\n  ", "inhead": "", "html": "<span>Click here...</span>\n  <div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>", "exampleId": "185iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function () {\n      $(\"div:hidden:first\").fadeIn(\"slow\");\n    });\n\n  });\n</script>\n<style>\n\n  span { color:red; cursor:pointer; }\n  div { margin:3px; width:80px; display:none;\n        height:80px; float:left; }\n  div#one { background:#f00; }\n  div#two { background:#0f0; }\n  div#three { background:#00f; }\n  \n</style>\n</head>\n<body>\n<span>Click here...</span>\n  <div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>\n</body>\n</html>"}, {"code": "\n    $(\"a\").click(function () {\n      $(\"div\").fadeIn(3000, function () {\n        $(\"span\").fadeIn(100);\n      });\n      return false;\n    }); \n", "htmlCode": "\n    $(\"a\").click(function () {\n      $(\"div\").fadeIn(3000, function () {\n        $(\"span\").fadeIn(100);\n      });\n      return false;\n    }); \n", "desc": "Fades a red block in over the text. Once the animation is done, it quickly fades in more text on top.", "css": "\n  p { position:relative; width:400px; height:90px; }\n  div { position:absolute; width:400px; height:65px; \n        font-size:36px; text-align:center; \n        color:yellow; background:red;\n        padding-top:25px; \n        top:0; left:0; display:none; }\n  span { display:none; }\n  ", "inhead": "", "html": "<p>\n    Let it be known that the party of the first part\n    and the party of the second part are henceforth\n    and hereto directed to assess the allegations\n    for factual correctness... (<a href=\"#\">click!</a>)\n    <div><span>CENSORED!</span></div>\n  </p>", "exampleId": "185iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"a\").click(function () {\n      $(\"div\").fadeIn(3000, function () {\n        $(\"span\").fadeIn(100);\n      });\n      return false;\n    }); \n\n  });\n</script>\n<style>\n\n  p { position:relative; width:400px; height:90px; }\n  div { position:absolute; width:400px; height:65px; \n        font-size:36px; text-align:center; \n        color:yellow; background:red;\n        padding-top:25px; \n        top:0; left:0; display:none; }\n  span { display:none; }\n  \n</style>\n</head>\n<body>\n<p>\n    Let it be known that the party of the first part\n    and the party of the second part are henceforth\n    and hereto directed to assess the allegations\n    for factual correctness... (<a href=\"#\">click!</a>)\n    <div><span>CENSORED!</span></div>\n  </p>\n</body>\n</html>"}]}, "fadeout186": {"id": 186, "searchname": "fadeout", "name": "fadeOut", "type": "function", "category": "Effects", "subcategory": "Fading", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Fade out all matched elements by adjusting their opacity and firing an optional callback after completion.", "longdesc": "<p>Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p\").click(function () {\n      $(\"p\").fadeOut(\"slow\");\n    });\n", "htmlCode": "\n    $(\"p\").click(function () {\n      $(\"p\").fadeOut(\"slow\");\n    });\n", "desc": "Animates all paragraphs to fade out, completing the animation within 600 milliseconds.", "css": "\n  p { font-size:150%; cursor:pointer; }\n  ", "inhead": "", "html": "<p>\n    If you click on this paragraph\n    you'll see it just fade away.\n  </p>", "exampleId": "186iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p\").click(function () {\n      $(\"p\").fadeOut(\"slow\");\n    });\n\n  });\n</script>\n<style>\n\n  p { font-size:150%; cursor:pointer; }\n  \n</style>\n</head>\n<body>\n<p>\n    If you click on this paragraph\n    you'll see it just fade away.\n  </p>\n</body>\n</html>"}, {"code": "\n    $(\"span\").click(function () {\n      $(this).fadeOut(1000, function () {\n        $(\"div\").text(\"'\" + $(this).text() + \"' has faded!\");\n        $(this).remove();\n      });\n    });\n    $(\"span\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n", "htmlCode": "\n    $(\"span\").click(function () {\n      $(this).fadeOut(1000, function () {\n        $(\"div\").text(\"'\" + $(this).text() + \"' has faded!\");\n        $(this).remove();\n      });\n    });\n    $(\"span\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n", "desc": "Fades out spans in one section that you click on.", "css": "\n  span { cursor:pointer; }\n  span.hilite { background:yellow; }\n  div { display:inline; color:red; }\n  ", "inhead": "", "html": "<h3>Find the modifiers - <div></div></h3>\n  <p>\n    If you <span>really</span> want to go outside\n    <span>in the cold</span> then make sure to wear\n    your <span>warm</span> jacket given to you by\n    your <span>favorite</span> teacher.\n  </p>", "exampleId": "186iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"span\").click(function () {\n      $(this).fadeOut(1000, function () {\n        $(\"div\").text(\"'\" + $(this).text() + \"' has faded!\");\n        $(this).remove();\n      });\n    });\n    $(\"span\").hover(function () {\n      $(this).addClass(\"hilite\");\n    }, function () {\n      $(this).removeClass(\"hilite\");\n    });\n\n  });\n</script>\n<style>\n\n  span { cursor:pointer; }\n  span.hilite { background:yellow; }\n  div { display:inline; color:red; }\n  \n</style>\n</head>\n<body>\n<h3>Find the modifiers - <div></div></h3>\n  <p>\n    If you <span>really</span> want to go outside\n    <span>in the cold</span> then make sure to wear\n    your <span>warm</span> jacket given to you by\n    your <span>favorite</span> teacher.\n  </p>\n</body>\n</html>"}]}, "fadeto187": {"id": 187, "searchname": "fadeto", "name": "fadeTo", "type": "function", "category": "Effects", "subcategory": "Fading", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Fade the opacity of all matched elements to a specified opacity and firing an optional callback after completion.", "longdesc": "<p>Only the opacity is adjusted for this animation, meaning that all of the matched elements should already have some form of height and width associated with them.</p>", "params": [{"optional": false, "name": "speed", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": false, "name": "opacity", "type": "Number ", "desc": "The opacity to fade to (a number from 0 to 1)."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executed once for each element animated against.\n<pre>function callback() {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "\n    $(\"p:first\").click(function () {\n      $(this).fadeTo(\"slow\", 0.33);\n    });\n", "htmlCode": "\n    $(\"p:first\").click(function () {\n      $(this).fadeTo(\"slow\", 0.33);\n    });\n", "desc": "Animates first paragraph to fade to an opacity of 0.33 (33%, about one third visible), completing the animation within 600 milliseconds.", "css": "", "inhead": "", "html": "<p>\n    Click this paragraph to see it fade.\n  </p>\n  <p>\n    Compare to this one that won't fade.\n  </p>", "exampleId": "187iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"p:first\").click(function () {\n      $(this).fadeTo(\"slow\", 0.33);\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<p>\n    Click this paragraph to see it fade.\n  </p>\n  <p>\n    Compare to this one that won't fade.\n  </p>\n</body>\n</html>"}, {"code": "\n    $(\"div\").click(function () {\n      $(this).fadeTo(\"fast\", Math.random());\n    });\n", "htmlCode": "\n    $(\"div\").click(function () {\n      $(this).fadeTo(\"fast\", Math.random());\n    });\n", "desc": "Fade div to a random opacity on each click, completing the animation within 200 milliseconds.", "css": "\n  p { width:80px; margin:0; padding:5px; }\n  div { width:40px; height:40px; position:absolute; }\n  div#one { top:0; left:0; background:#f00; }\n  div#two { top:20px; left:20px; background:#0f0; }\n  div#three { top:40px; left:40px; background:#00f; }\n  ", "inhead": "", "html": "<p>And this is the library that John built...</p>\n  <div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>", "exampleId": "187iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"div\").click(function () {\n      $(this).fadeTo(\"fast\", Math.random());\n    });\n\n  });\n</script>\n<style>\n\n  p { width:80px; margin:0; padding:5px; }\n  div { width:40px; height:40px; position:absolute; }\n  div#one { top:0; left:0; background:#f00; }\n  div#two { top:20px; left:20px; background:#0f0; }\n  div#three { top:40px; left:40px; background:#00f; }\n  \n</style>\n</head>\n<body>\n<p>And this is the library that John built...</p>\n  <div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>\n</body>\n</html>"}, {"code": "\n    var getPos = function (n) {\n      return (Math.floor(n) * 90) + \"px\";\n    };\n    $(\"p\").each(function (n) {\n      var r = Math.floor(Math.random() * 3);\n      var tmp = $(this).text();\n      $(this).text($(\"p:eq(\" + r + \")\").text());\n      $(\"p:eq(\" + r + \")\").text(tmp);\n      $(this).css(\"left\", getPos(n));\n    });\n    $(\"div\").each(function (n) {\n                  $(this).css(\"left\", getPos(n));\n                })\n            .css(\"cursor\", \"pointer\")\n            .click(function () {\n                  $(this).fadeTo(250, 0.25, function () {\n                        $(this).css(\"cursor\", \"\")\n                               .prev().css({\"font-weight\": \"bolder\",\n                                            \"font-style\": \"italic\"});\n                      });\n                });\n", "htmlCode": "\n    var getPos = function (n) {\n      return (Math.floor(n) * 90) + \"px\";\n    };\n    $(\"p\").each(function (n) {\n      var r = Math.floor(Math.random() * 3);\n      var tmp = $(this).text();\n      $(this).text($(\"p:eq(\" + r + \")\").text());\n      $(\"p:eq(\" + r + \")\").text(tmp);\n      $(this).css(\"left\", getPos(n));\n    });\n    $(\"div\").each(function (n) {\n                  $(this).css(\"left\", getPos(n));\n                })\n            .css(\"cursor\", \"pointer\")\n            .click(function () {\n                  $(this).fadeTo(250, 0.25, function () {\n                        $(this).css(\"cursor\", \"\")\n                               .prev().css({\"font-weight\": \"bolder\",\n                                            \"font-style\": \"italic\"});\n                      });\n                });\n", "desc": "Find the right answer!  The fade will take 250 milliseconds and change various styles when it completes.", "css": "\n  div, p { width:80px; height:40px; top:0; margin:0; \n           position:absolute; padding-top:8px; }\n  p { background:#fcc; text-align:center; }\n  div { background:blue; }\n  ", "inhead": "", "html": "<p>Wrong</p>\n  <div></div>\n  <p>Wrong</p>\n  <div></div>\n  <p>Right!</p>\n  <div></div>", "exampleId": "187iframeExample2", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var getPos = function (n) {\n      return (Math.floor(n) * 90) + \"px\";\n    };\n    $(\"p\").each(function (n) {\n      var r = Math.floor(Math.random() * 3);\n      var tmp = $(this).text();\n      $(this).text($(\"p:eq(\" + r + \")\").text());\n      $(\"p:eq(\" + r + \")\").text(tmp);\n      $(this).css(\"left\", getPos(n));\n    });\n    $(\"div\").each(function (n) {\n                  $(this).css(\"left\", getPos(n));\n                })\n            .css(\"cursor\", \"pointer\")\n            .click(function () {\n                  $(this).fadeTo(250, 0.25, function () {\n                        $(this).css(\"cursor\", \"\")\n                               .prev().css({\"font-weight\": \"bolder\",\n                                            \"font-style\": \"italic\"});\n                      });\n                });\n\n  });\n</script>\n<style>\n\n  div, p { width:80px; height:40px; top:0; margin:0; \n           position:absolute; padding-top:8px; }\n  p { background:#fcc; text-align:center; }\n  div { background:blue; }\n  \n</style>\n</head>\n<body>\n<p>Wrong</p>\n  <div></div>\n  <p>Wrong</p>\n  <div></div>\n  <p>Right!</p>\n  <div></div>\n</body>\n</html>"}]}, "animate188": {"id": 188, "searchname": "animate", "name": "animate", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.0", "sample": "", "desc": "A function for making your own, custom animations...", "longdesc": "<p>The key aspect of this function is the object of style properties that will be animated, and to what end. Each key within the object represents a style property that will also be animated (for example: \"height\", \"top\", or \"opacity\").</p><p>Note that properties should be specified using camel case eg. marginLeft instead of margin-left.</p><p>The value associated with the key represents to what end the property will be animated. If a number is provided as the value, then the style property will be transitioned from its current state to that new number. Otherwise if the string \"hide\", \"show\", or \"toggle\" is provided, a default animation will be constructed for that property.  Only properties that take numeric values are supported (e.g. backgroundColor is not supported by animate()).</p><p>As of jQuery 1.2 you can now animate properties by em and % (where applicable). Additionally, in jQuery 1.2, you can now do relative animations - specifying a \"<em>+=</em>\" or \"<em>-=</em>\" in front of the property value to move the element positively, or negatively, relative to the current position.</p>", "params": [{"optional": false, "name": "params", "type": "Options", "desc": "A set of style attributes that you wish to animate, and to what end."}, {"optional": true, "name": "duration", "type": "String, Number ", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"optional": true, "name": "easing", "type": "String ", "desc": "The name of the easing effect that you want to use (Plugin Required). There are two built-in values, \"linear\" and \"swing\"."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against."}], "options": [], "examples": [{"code": "\n    // Using multiple unit types within one animation.\n    $(\"#go\").click(function(){\n      $(\"#block\").animate({ \n        width: \"70%\",\n        opacity: 0.4,\n        marginLeft: \"0.6in\",\n        fontSize: \"3em\", \n        borderWidth: \"10px\"\n      }, 1500 );\n    });\n", "htmlCode": "\n    // Using multiple unit types within one animation.\n    $(\"#go\").click(function(){\n      $(\"#block\").animate({ \n        width: \"70%\",\n        opacity: 0.4,\n        marginLeft: \"0.6in\",\n        fontSize: \"3em\", \n        borderWidth: \"10px\"\n      }, 1500 );\n    });\n", "desc": "Click the button to animate the div with a number of different properties.", "css": "\n  div { \n    background-color:#bca; \n    width:100px; \n    border:1px solid green;\n  }\n  ", "inhead": "", "html": "<button id=\"go\">&raquo; Run</button>\n  <div id=\"block\">Hello!</div>", "exampleId": "188iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    // Using multiple unit types within one animation.\n    $(\"#go\").click(function(){\n      $(\"#block\").animate({ \n        width: \"70%\",\n        opacity: 0.4,\n        marginLeft: \"0.6in\",\n        fontSize: \"3em\", \n        borderWidth: \"10px\"\n      }, 1500 );\n    });\n\n  });\n</script>\n<style>\n\n  div { \n    background-color:#bca; \n    width:100px; \n    border:1px solid green;\n  }\n  \n</style>\n</head>\n<body>\n<button id=\"go\">&raquo; Run</button>\n  <div id=\"block\">Hello!</div>\n</body>\n</html>"}, {"code": "\n    $(\"#right\").click(function(){\n      $(\".block\").animate({\"left\": \"+=50px\"}, \"slow\");\n    });\n\n    $(\"#left\").click(function(){\n      $(\".block\").animate({\"left\": \"-=50px\"}, \"slow\");\n    });\n", "htmlCode": "\n    $(\"#right\").click(function(){\n      $(\".block\").animate({\"left\": \"+=50px\"}, \"slow\");\n    });\n\n    $(\"#left\").click(function(){\n      $(\".block\").animate({\"left\": \"-=50px\"}, \"slow\");\n    });\n", "desc": "Shows a div animate with a relative move.  Click several times on the buttons to see the relative animations queued up.", "css": "\n  div { \n    position:absolute; \n    background-color:#abc; \n    left:50px;\n    width:90px; \n    height:90px;\n    margin:5px; \n  }\n  ", "inhead": "", "html": "<button id=\"left\">&laquo;</button> <button id=\"right\">&raquo;</button>\n<div class=\"block\"></div>\n", "exampleId": "188iframeExample1", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#right\").click(function(){\n      $(\".block\").animate({\"left\": \"+=50px\"}, \"slow\");\n    });\n\n    $(\"#left\").click(function(){\n      $(\".block\").animate({\"left\": \"-=50px\"}, \"slow\");\n    });\n\n  });\n</script>\n<style>\n\n  div { \n    position:absolute; \n    background-color:#abc; \n    left:50px;\n    width:90px; \n    height:90px;\n    margin:5px; \n  }\n  \n</style>\n</head>\n<body>\n<button id=\"left\">&laquo;</button> <button id=\"right\">&raquo;</button>\n<div class=\"block\"></div>\n\n</body>\n</html>"}, {"code": "$(\"p\").animate({\n      \"height\": \"toggle\", \"opacity\": \"toggle\"\n    }, \"slow\");", "htmlCode": "$(\"p\").animate({\n      \"height\": \"toggle\", \"opacity\": \"toggle\"\n    }, \"slow\");", "desc": "Animates all paragraphs to toggle both height and opacity, completing the animation within 600 milliseconds.", "css": "", "inhead": "", "html": "", "exampleId": "188iframeExample2", "runCode": ""}, {"code": "$(\"p\").animate({\n      \"left\": \"50\", \"opacity\": 1\n    }, 500);\n", "htmlCode": "$(\"p\").animate({\n      \"left\": \"50\", \"opacity\": 1\n    }, 500);\n", "desc": "Animates all paragraph to a left style of 50 and opacity of 1 (opaque, visible), completing the animation within 500 milliseconds.", "css": "", "inhead": "", "html": "", "exampleId": "188iframeExample3", "runCode": ""}, {"code": "$(\"p\").animate({\n      \"opacity\": \"show\"\n    }, \"slow\", \"easein\");", "htmlCode": "$(\"p\").animate({\n      \"opacity\": \"show\"\n    }, \"slow\", \"easein\");", "desc": "An example of using an 'easing' function to provide a different style of animation. This will only work if you have a plugin that provides this easing function.  Note, this code will do nothing unless the paragraph element is hidden.", "css": "", "inhead": "", "html": "", "exampleId": "188iframeExample4", "runCode": ""}]}, "animate189": {"id": 189, "searchname": "animate", "name": "animate", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.0", "sample": "", "desc": "A function for making your own, custom animations.", "longdesc": "<p>The key aspect of this function is the object of style properties that will be animated, and to what end. Each key within the object represents a style property that will also be animated (for example: \"height\", \"top\", or \"opacity\").</p><p>Note that properties should be specified using camel case eg. marginLeft instead of margin-left.</p><p>The value associated with the key represents to what end the property will be animated. If a number is provided as the value, then the style property will be transitioned from its current state to that new number. Otherwise if the string \"hide\", \"show\", or \"toggle\" is provided, a default animation will be constructed for that property. </p>", "params": [{"optional": false, "name": "params", "type": "Options", "desc": "A set of style attributes that you wish to animate, and to what end."}, {"optional": false, "name": "options", "type": "Options ", "desc": "A set of options with which to configure the animation."}], "options": [{"name": "duration", "default": "\"normal\"", "type": "String, Number", "desc": "A string representing one of the three predefined speeds (\"slow\", \"normal\", or \"fast\") or the number of milliseconds to run the animation (e.g. 1000)."}, {"name": "easing", "default": "\"swing\"", "type": "String", "desc": "The name of the easing effect that you want to use (Plugin Required). There are two built-in values, \"linear\" and \"swing\"."}, {"name": "complete", "default": "", "type": "Function", "desc": "A function to be executed whenever the animation completes, executes once for each element animated against."}, {"name": "step", "default": "", "type": "Callback", "desc": ""}, {"name": "queue", "default": "true", "type": "Boolean", "desc": "Setting this to false will make the animation skip the queue and will begin running immediately. (Added in jQuery 1.2)"}], "examples": [{"code": "\n    $(\"#go1\").click(function(){\n      $(\"#block1\").animate( { width:\"90%\" }, { queue:false, duration:3000 } )\n         .animate( { fontSize:\"24px\" }, 1500 )\n         .animate( { borderRightWidth:\"15px\" }, 1500);\n    });\n\n    $(\"#go2\").click(function(){\n      $(\"#block2\").animate( { width:\"90%\"}, 1000 )\n         .animate( { fontSize:\"24px\" } , 1000 )\n         .animate( { borderLeftWidth:\"15px\" }, 1000);\n    });\n\n    $(\"#go3\").click(function(){\n      $(\"#go1\").add(\"#go2\").click();\n    });\n\n    $(\"#go4\").click(function(){\n      $(\"div\").css({width:\"\", fontSize:\"\", borderWidth:\"\"});\n    });\n", "htmlCode": "\n    $(\"#go1\").click(function(){\n      $(\"#block1\").animate( { width:\"90%\" }, { queue:false, duration:3000 } )\n         .animate( { fontSize:\"24px\" }, 1500 )\n         .animate( { borderRightWidth:\"15px\" }, 1500);\n    });\n\n    $(\"#go2\").click(function(){\n      $(\"#block2\").animate( { width:\"90%\"}, 1000 )\n         .animate( { fontSize:\"24px\" } , 1000 )\n         .animate( { borderLeftWidth:\"15px\" }, 1000);\n    });\n\n    $(\"#go3\").click(function(){\n      $(\"#go1\").add(\"#go2\").click();\n    });\n\n    $(\"#go4\").click(function(){\n      $(\"div\").css({width:\"\", fontSize:\"\", borderWidth:\"\"});\n    });\n", "desc": "The first button shows how an unqueued animation works.  It expands the div out to 90% width <strong>while</strong> the font-size is increasing. Once the font-size change is complete, the border animation will begin.\n\nThe second button starts a traditional chained animation, where each animation will start once the previous animation on the element has completed.", "css": "div { \n    background-color:#bca; \n    width:200px;\n    height:1.1em;\n    text-align:center;\n    border:2px solid green;\n    margin:3px;\n    font-size:14px;\n  }\n  button {\n    font-size:14px;\n  }\n  ", "inhead": "", "html": "<button id=\"go1\">&raquo; Animate Block1</button>\n  <button id=\"go2\">&raquo; Animate Block2</button>\n  <button id=\"go3\">&raquo; Animate Both</button>\n  <button id=\"go4\">&raquo; Reset</button>\n  <div id=\"block1\">Block1</div>\n  <div id=\"block2\">Block2</div>", "exampleId": "189iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#go1\").click(function(){\n      $(\"#block1\").animate( { width:\"90%\" }, { queue:false, duration:3000 } )\n         .animate( { fontSize:\"24px\" }, 1500 )\n         .animate( { borderRightWidth:\"15px\" }, 1500);\n    });\n\n    $(\"#go2\").click(function(){\n      $(\"#block2\").animate( { width:\"90%\"}, 1000 )\n         .animate( { fontSize:\"24px\" } , 1000 )\n         .animate( { borderLeftWidth:\"15px\" }, 1000);\n    });\n\n    $(\"#go3\").click(function(){\n      $(\"#go1\").add(\"#go2\").click();\n    });\n\n    $(\"#go4\").click(function(){\n      $(\"div\").css({width:\"\", fontSize:\"\", borderWidth:\"\"});\n    });\n\n  });\n</script>\n<style>\ndiv { \n    background-color:#bca; \n    width:200px;\n    height:1.1em;\n    text-align:center;\n    border:2px solid green;\n    margin:3px;\n    font-size:14px;\n  }\n  button {\n    font-size:14px;\n  }\n  \n</style>\n</head>\n<body>\n<button id=\"go1\">&raquo; Animate Block1</button>\n  <button id=\"go2\">&raquo; Animate Block2</button>\n  <button id=\"go3\">&raquo; Animate Both</button>\n  <button id=\"go4\">&raquo; Reset</button>\n  <div id=\"block1\">Block1</div>\n  <div id=\"block2\">Block2</div>\n</body>\n</html>"}, {"code": "$(\"p\").animate({\n      \"height\": \"toggle\", \"opacity\": \"toggle\"\n    }, { duration: \"slow\" });", "htmlCode": "$(\"p\").animate({\n      \"height\": \"toggle\", \"opacity\": \"toggle\"\n    }, { duration: \"slow\" });", "desc": "Animates all paragraphs to toggle both height and opacity, completing the animation within 600 milliseconds.", "css": "", "inhead": "", "html": "", "exampleId": "189iframeExample1", "runCode": ""}, {"code": "$(\"p\").animate({\n      left: \"50px\", opacity: 1\n    }, { duration: 500, queue: false });", "htmlCode": "$(\"p\").animate({\n      left: \"50px\", opacity: 1\n    }, { duration: 500, queue: false });", "desc": "Animates all paragraph to a left style of 50 and opacity of 1 (opaque, visible), completing the animation within 500 milliseconds.  It also will do it <em>outside</em> the queue, meaning it will automatically start without waiting for its turn.", "css": "", "inhead": "", "html": "", "exampleId": "189iframeExample2", "runCode": ""}, {"code": "$(\"p\").animate({\n      \"opacity\": \"show\"\n    }, { \"duration\": \"slow\", \"easing\": \"easein\" });", "htmlCode": "$(\"p\").animate({\n      \"opacity\": \"show\"\n    }, { \"duration\": \"slow\", \"easing\": \"easein\" });", "desc": "An example of using an 'easing' function to provide a different style of animation. This will only work if you have a plugin that provides this easing function.", "css": "", "inhead": "", "html": "", "exampleId": "189iframeExample3", "runCode": ""}]}, "stop190": {"id": 190, "searchname": "stop", "name": "stop", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Stops all the currently running animations on all the specified elements. ", "longdesc": "<p>If any animations are queued to run, then they will begin immediately.</p>", "params": [], "examples": [{"code": "\n    // Start animation\n    $(\"#go\").click(function(){\n      $(\".block\").animate({left: '+=100px'}, 2000);\n    });\n\n    // Stop animation when button is clicked\n    $(\"#stop\").click(function(){\n      $(\".block\").stop();\n    });\n\n    // Start animation in the opposite direction\n    $(\"#back\").click(function(){\n      $(\".block\").animate({left: '-=100px'}, 2000);\n    });\n", "htmlCode": "\n    // Start animation\n    $(\"#go\").click(function(){\n      $(\".block\").animate({left: '+=100px'}, 2000);\n    });\n\n    // Stop animation when button is clicked\n    $(\"#stop\").click(function(){\n      $(\".block\").stop();\n    });\n\n    // Start animation in the opposite direction\n    $(\"#back\").click(function(){\n      $(\".block\").animate({left: '-=100px'}, 2000);\n    });\n", "desc": "Click the Go button once to start the animation, then click the STOP button to stop it where it's currently positioned.  Another option is to click several buttons to queue them up and see that stop just kills the currently playing one.", "css": "div { \n    position: absolute; \n    background-color: #abc;\n    left: 0px;\n    top:30px;\n    width: 60px; \n    height: 60px;\n    margin: 5px; \n  }\n  ", "inhead": "", "html": "<button id=\"go\">Go</button> \n  <button id=\"stop\">STOP!</button>\n  <button id=\"back\">Back</button>\n  <div class=\"block\"></div>", "exampleId": "190iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    // Start animation\n    $(\"#go\").click(function(){\n      $(\".block\").animate({left: '+=100px'}, 2000);\n    });\n\n    // Stop animation when button is clicked\n    $(\"#stop\").click(function(){\n      $(\".block\").stop();\n    });\n\n    // Start animation in the opposite direction\n    $(\"#back\").click(function(){\n      $(\".block\").animate({left: '-=100px'}, 2000);\n    });\n\n  });\n</script>\n<style>\ndiv { \n    position: absolute; \n    background-color: #abc;\n    left: 0px;\n    top:30px;\n    width: 60px; \n    height: 60px;\n    margin: 5px; \n  }\n  \n</style>\n</head>\n<body>\n<button id=\"go\">Go</button> \n  <button id=\"stop\">STOP!</button>\n  <button id=\"back\">Back</button>\n  <div class=\"block\"></div>\n</body>\n</html>"}]}, "queue191": {"id": 191, "searchname": "queue", "name": "queue", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "Array&lt;Function&gt;", "added": "1.2", "sample": "", "desc": "Returns a reference to the first element's queue (which is an array of functions).", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"#show\").click(function () {\n      var n = $(\"div\").queue(\"fx\");\n      $(\"span\").text(\"Queue length is: \" + n.length);\n    });\n    function runIt() {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").slideToggle(1000);\n      $(\"div\").slideToggle(\"fast\");\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").hide(\"slow\");\n      $(\"div\").show(1200);\n      $(\"div\").slideUp(\"normal\", runIt);\n    }\n    runIt();\n", "htmlCode": "\n    $(\"#show\").click(function () {\n      var n = $(\"div\").queue(\"fx\");\n      $(\"span\").text(\"Queue length is: \" + n.length);\n    });\n    function runIt() {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").slideToggle(1000);\n      $(\"div\").slideToggle(\"fast\");\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").hide(\"slow\");\n      $(\"div\").show(1200);\n      $(\"div\").slideUp(\"normal\", runIt);\n    }\n    runIt();\n", "desc": "Show the length of the queue.", "css": "\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<button id=\"show\">Show Length of Queue</button>\n  <span></span>\n  <div></div>", "exampleId": "191iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#show\").click(function () {\n      var n = $(\"div\").queue(\"fx\");\n      $(\"span\").text(\"Queue length is: \" + n.length);\n    });\n    function runIt() {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").slideToggle(1000);\n      $(\"div\").slideToggle(\"fast\");\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").hide(\"slow\");\n      $(\"div\").show(1200);\n      $(\"div\").slideUp(\"normal\", runIt);\n    }\n    runIt();\n\n  });\n</script>\n<style>\n\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<button id=\"show\">Show Length of Queue</button>\n  <span></span>\n  <div></div>\n</body>\n</html>"}]}, "queue192": {"id": 192, "searchname": "queue", "name": "queue", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Adds a new function, to be executed, onto the end of the queue of all matched elements.", "longdesc": "", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to add to the queue.\n<pre>function callback() {\n  this; // dom element\n  // to continue the queue you must call\n  jQuery(this).dequeue();\n}\n</pre>"}], "examples": [{"code": "\n    $(document.body).click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n", "htmlCode": "\n    $(document.body).click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n", "desc": "Queue a custom function.", "css": "\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  ", "inhead": "", "html": "Click here...\n  <div></div>", "exampleId": "192iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},2000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  \n</style>\n</head>\n<body>\nClick here...\n  <div></div>\n</body>\n</html>"}]}, "queue193": {"id": 193, "searchname": "queue", "name": "queue", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Replaces the queue of all matched element with this new queue (the array of functions).", "longdesc": "", "params": [{"optional": false, "name": "queue", "type": "Array&lt;Function&gt;", "desc": "The queue to replace all the queues with.  The functions have the same parameters and this value as queue(callback)."}], "examples": [{"code": "\n    $(\"#start\").click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},5000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n    $(\"#stop\").click(function () {\n      $(\"div\").queue(\"fx\", []);\n      $(\"div\").stop();\n    });\n", "htmlCode": "\n    $(\"#start\").click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},5000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n    $(\"#stop\").click(function () {\n      $(\"div\").queue(\"fx\", []);\n      $(\"div\").stop();\n    });\n", "desc": "Set a queue array to delete the queue.", "css": "\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  ", "inhead": "", "html": "<button id=\"start\">Start</button>\n  <button id=\"stop\">Stop</button>\n  <div></div>", "exampleId": "193iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"#start\").click(function () {\n      $(\"div\").show(\"slow\");\n      $(\"div\").animate({left:'+=200'},5000);\n      $(\"div\").queue(function () {\n        $(this).addClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'-=200'},1500);\n      $(\"div\").queue(function () {\n        $(this).removeClass(\"newcolor\");\n        $(this).dequeue();\n      });\n      $(\"div\").slideUp();\n    });\n    $(\"#stop\").click(function () {\n      $(\"div\").queue(\"fx\", []);\n      $(\"div\").stop();\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:3px; width:40px; height:40px;\n        position:absolute; left:0px; top:30px; \n        background:green; display:none; }\n  div.newcolor { background:blue; }\n  \n</style>\n</head>\n<body>\n<button id=\"start\">Start</button>\n  <button id=\"stop\">Stop</button>\n  <div></div>\n</body>\n</html>"}]}, "dequeue194": {"id": 194, "searchname": "dequeue", "name": "dequeue", "type": "function", "category": "Effects", "subcategory": "Custom", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Removes a queued function from the front of the queue and executes it.", "longdesc": "", "params": [], "examples": [{"code": "\n    $(\"button\").click(function () {\n      $(\"div\").animate({left:'+=200px'}, 2000);\n      $(\"div\").animate({top:'0px'}, 600);\n      $(\"div\").queue(function () {\n        $(this).toggleClass(\"red\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'10px', top:'30px'}, 700);\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      $(\"div\").animate({left:'+=200px'}, 2000);\n      $(\"div\").animate({top:'0px'}, 600);\n      $(\"div\").queue(function () {\n        $(this).toggleClass(\"red\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'10px', top:'30px'}, 700);\n    });\n", "desc": "Use dequeue to end a custom queue function which allows the queue to keep going.", "css": "\n  div { margin:3px; width:50px; position:absolute;\n        height:50px; left:10px; top:30px; \n        background-color:yellow; }\n  div.red { background-color:red; }\n  ", "inhead": "", "html": "<button>Start</button>\n  <div></div>", "exampleId": "194iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      $(\"div\").animate({left:'+=200px'}, 2000);\n      $(\"div\").animate({top:'0px'}, 600);\n      $(\"div\").queue(function () {\n        $(this).toggleClass(\"red\");\n        $(this).dequeue();\n      });\n      $(\"div\").animate({left:'10px', top:'30px'}, 700);\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:3px; width:50px; position:absolute;\n        height:50px; left:10px; top:30px; \n        background-color:yellow; }\n  div.red { background-color:red; }\n  \n</style>\n</head>\n<body>\n<button>Start</button>\n  <div></div>\n</body>\n</html>"}]}, "ajax195": {"id": 195, "searchname": "ajax", "name": "$.ajax", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "XMLHttpRequest", "added": "1.0", "sample": "", "desc": "Load a remote page using an HTTP request.", "longdesc": "<p>This is jQuery's low-level AJAX implementation. See $.get, $.post etc. for higher-level abstractions that are often easier to understand and use, but don't offer as much functionality (such as error callbacks).</p><p>$.ajax() returns the XMLHttpRequest that it creates. In most cases you won't need that object to manipulate directly, but it is available if you need to abort the request manually.</p><p>$.ajax() takes one argument, an object of key/value pairs, that are used to initialize and handle the request. See below for a full list of the key/values that can be used.</p><p><strong>Note:</strong> If you specify the dataType option described below, make sure\nthe server sends the correct MIME type in the response (eg. xml as \"text/xml\").\nSending the wrong MIME type can lead to unexpected problems in your script.\nSee <a href='Specifying_the_Data_Type_for_AJAX_Requests'>Specifying the Data Type for AJAX Requests</a> for more information.</p><p><strong>Note:</strong> All remote (not on the same domain) POST requests are converted to GET when 'script' is the dataType (because it loads script using a DOM script tag).</p><p>As of jQuery 1.2, you can load JSON data located on another domain if you specify a <a href=\"http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/\">JSONP</a> callback, which can be done like so: \"myurl?callback=?\". jQuery automatically replaces the ? with the correct method name to call, calling your specified callback. Or, if you set the dataType to \"jsonp\" a callback will be automatically added to your Ajax request.</p>", "params": [{"optional": false, "name": "options", "type": "Options", "desc": "A set of key/value pairs that configure the Ajax request. All options are optional. A default can be set for any option with <a href='Ajax/jQuery.ajaxSetup'>$.ajaxSetup</a>()."}], "options": [{"name": "async", "default": "true", "type": "Boolean", "desc": "By default, all requests are sent asynchronous (e.g. this is set to true by default). If you need synchronous requests, set this option to false. Note that synchronous requests may temporarily lock the browser, disabling any actions while the request is active."}, {"name": "beforeSend", "default": "", "type": "Function", "desc": "A pre-callback to modify the XMLHttpRequest object before it is sent. Use this to set custom headers etc. The XMLHttpRequest is passed as the only argument. This is an <a href='Ajax_Events'>Ajax Event</a>.\n<pre>function (XMLHttpRequest) {\n  this; // the options for this ajax request\n}\n</pre>"}, {"name": "cache", "default": "true, false for dataType \"script\"", "type": "Boolean", "desc": "Added in jQuery 1.2, if set to false it will force the pages that you request to not be cached by the browser."}, {"name": "complete", "default": "", "type": "Function", "desc": "A function to be called when the request finishes (after success and error callbacks are executed). The function gets passed two arguments: The XMLHttpRequest object and a string describing the type of success of the request. This is an <a href='Ajax_Events'>Ajax Event</a>.\n<pre>function (XMLHttpRequest, textStatus) {\n  this; // the options for this ajax request\n}\n</pre>"}, {"name": "contentType", "default": "\"application/x-www-form-urlencoded\"", "type": "String", "desc": "When sending data to the server, use this content-type. Default is \"application/x-www-form-urlencoded\", which is fine for most cases."}, {"name": "data", "default": "", "type": "Object, String", "desc": "Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests. See processData option to prevent this automatic processing. Object must be Key/Value pairs. If value is an Array, jQuery serializes multiple values with same key i.e. {foo:[\"bar1\", \"bar2\"]} becomes '&foo=bar1&foo=bar2'."}, {"name": "dataType", "default": "Intelligent Guess (xml or html)", "type": "String", "desc": "The type of data that you're expecting back from the server. If none is specified, jQuery will intelligently pass either responseXML or responseText to your success callback, based on the MIME type of the response. The available types (and the result passed as the first argument to your success callback) are:<ul><li>\"xml\": Returns a XML document that can be processed via jQuery.</li><li>\"html\": Returns HTML as plain text; included script tags are evaluated when inserted in the DOM.</li><li>\"script\": Evaluates the response as JavaScript and returns it as plain text. Disables caching unless option \"cache\" is used. <strong>Note:</strong> This will turn POSTs into GETs for remote-domain requests.</li><li>\"json\": Evaluates the response as JSON and returns a JavaScript Object.</li><li>\"jsonp\": Loads in a JSON block using <a href=\"http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/\">JSONP</a>. Will add an extra \"?callback=?\" to the end of your URL to specify the callback. (Added in jQuery 1.2)</li><li>\"text\": A plain text string.</li></ul>"}, {"name": "error", "default": "", "type": "Function", "desc": "A function to be called if the request fails. The function gets passed three arguments: The XMLHttpRequest object, a string describing the type of error that occurred and an optional exception object, if one occurred. This is an <a href='Ajax_Events'>Ajax Event</a>.\n<pre>function (XMLHttpRequest, textStatus, errorThrown) {\n  // typically only one of textStatus or errorThrown \n  // will have info\n  this; // the options for this ajax request\n}\n</pre>"}, {"name": "global", "default": "true", "type": "Boolean", "desc": "Whether to trigger global AJAX event handlers for this request. The default is true. Set to false to prevent the global handlers like ajaxStart or ajaxStop from being triggered. This can be used to control various <a href='Ajax_Events'>Ajax Events</a>."}, {"name": "ifModified", "default": "false", "type": "Boolean", "desc": "Allow the request to be successful only if the response has changed since the last request. This is done by checking the Last-Modified header. Default value is false, ignoring the header."}, {"name": "jsonp", "default": "", "type": "String", "desc": "Override the callback function name in a jsonp request.  This value will be used instead of 'callback' in the 'callback=?' part of the query string in the url for a GET or the data for a POST.  So {jsonp:'onJsonPLoad'} would result in 'onJsonPLoad=?' passed to the server."}, {"name": "password", "default": "", "type": "String", "desc": "A password to be used in response to an HTTP access authentication request."}, {"name": "processData", "default": "true", "type": "Boolean", "desc": "By default, data passed in to the data option as an object (technically, anything other than a string) will be processed and transformed into a query string, fitting to the default content-type \"application/x-www-form-urlencoded\". If you want to send DOMDocuments, or other non-processed data, set this option to false."}, {"name": "success", "default": "", "type": "Function", "desc": "A function to be called if the request succeeds. The function gets passed two arguments: The data returned from the server, formatted according to the 'dataType' parameter, and a string describing the status. This is an <a href='Ajax_Events'>Ajax Event</a>.\n<pre>function (data, textStatus) {\n  // data could be xmlDoc, jsonObj, html, text, etc...\n  this; // the options for this ajax request\n}\n</pre>"}, {"name": "timeout", "default": "", "type": "Number", "desc": "Set a local timeout in ms for the request. This will override the global timeout, if one is set via <a href='Ajax/jQuery.ajaxSetup'>$.ajaxSetup</a>. For example, you could use this property to give a single request a longer timeout than all other requests that you've set to time out in one second. See <a href='Ajax/jQuery.ajaxSetup'>$.ajaxSetup</a>() for global timeouts."}, {"name": "type", "default": "\"GET\"", "type": "String", "desc": "The type of request to make (\"POST\" or \"GET\"), default is \"GET\". Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers."}, {"name": "url", "default": "The current page", "type": "String", "desc": "The URL to request."}, {"name": "username", "default": "", "type": "String", "desc": "A username to be used in response to an HTTP access authentication request."}], "examples": [{"code": " $.ajax({\n   type: \"GET\",\n   url: \"test.js\",\n   dataType: \"script\"\n });", "htmlCode": " $.ajax({\n   type: \"GET\",\n   url: \"test.js\",\n   dataType: \"script\"\n });", "desc": "Load and execute a JavaScript file.", "css": "", "inhead": "", "html": "", "exampleId": "195iframeExample0", "runCode": ""}, {"code": " $.ajax({\n   type: \"POST\",\n   url: \"some.php\",\n   data: \"name=John&location=Boston\",\n   success: function(msg){\n     alert( \"Data Saved: \" + msg );\n   }\n });", "htmlCode": " $.ajax({\n   type: \"POST\",\n   url: \"some.php\",\n   data: \"name=John&location=Boston\",\n   success: function(msg){\n     alert( \"Data Saved: \" + msg );\n   }\n });", "desc": "Save some data to the server and notify the user once its complete.", "css": "", "inhead": "", "html": "", "exampleId": "195iframeExample1", "runCode": ""}, {"code": "$.ajax({\n  url: \"test.html\",\n  cache: false,\n  success: function(html){\n    $(\"#results\").append(html);\n  }\n});", "htmlCode": "$.ajax({\n  url: \"test.html\",\n  cache: false,\n  success: function(html){\n    $(\"#results\").append(html);\n  }\n});", "desc": "Retrieve the latest version of an HTML page.", "css": "", "inhead": "", "html": "", "exampleId": "195iframeExample2", "runCode": ""}, {"code": " var html = $.ajax({\n  url: \"some.php\",\n  async: false\n }).responseText;", "htmlCode": " var html = $.ajax({\n  url: \"some.php\",\n  async: false\n }).responseText;", "desc": "Loads data synchronously. Blocks the browser while the requests is active.\nIt is better to block user interaction by other means when synchronization is\nnecessary.", "css": "", "inhead": "", "html": "", "exampleId": "195iframeExample3", "runCode": ""}, {"code": " var xmlDocument = [create xml document];\n $.ajax({\n   url: \"page.php\",\n   processData: false,\n   data: xmlDocument,\n   success: handleResponse\n });", "htmlCode": " var xmlDocument = [create xml document];\n $.ajax({\n   url: \"page.php\",\n   processData: false,\n   data: xmlDocument,\n   success: handleResponse\n });", "desc": "Sends an xml document as data to the server. By setting the processData\noption to false, the automatic conversion of data to strings is prevented.", "css": "", "inhead": "", "html": "", "exampleId": "195iframeExample4", "runCode": ""}]}, "load196": {"id": 196, "searchname": "load", "name": "load", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Load HTML from a remote file and inject it into the DOM.", "longdesc": "<p>A GET request will be performed by default - but if you pass in any extra parameters then a POST will occur.</p><p>In jQuery 1.2 you can now specify a jQuery selector in the URL. Doing so will filter the incoming HTML document, only injecting the elements that match the selector. The syntax looks something like \"url #some > selector\". See the examples for more information.</p>", "params": [{"optional": false, "name": "url", "type": "String", "desc": "The URL of the HTML page to load."}, {"optional": true, "name": "data", "type": "Map", "desc": "Key/value pairs that will be sent to the server."}, {"optional": false, "name": "callback", "type": "Callback", "desc": "The function called when the ajax request is complete (not necessarily success).\n<pre>function (responseText, textStatus, XMLHttpRequest) {\n  this; // dom element\n}\n</pre>"}], "examples": [{"code": "$(\"#links\").load(\"/Main_Page #p-Getting-Started li\");", "htmlCode": "$(\"#links\").load(\"/Main_Page #p-Getting-Started li\");", "desc": "Load a piece of the documentation sidebar navigation into a custom unordered list.", "css": "body{ font-size: 11px; font-family: Arial; }", "inhead": "", "html": "<b>jQuery Links:</b>\n<ul id=\"links\"></ul>", "exampleId": "196iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$(\"#links\").load(\"/Main_Page #p-Getting-Started li\");\n  });\n</script>\n<style>\nbody{ font-size: 11px; font-family: Arial; }\n</style>\n</head>\n<body>\n<b>jQuery Links:</b>\n<ul id=\"links\"></ul>\n</body>\n</html>"}, {"code": "$(\"#feeds\").load(\"feeds.html\");", "htmlCode": "$(\"#feeds\").load(\"feeds.html\");", "desc": "Load the feeds.html file into the div with the ID of feeds.", "css": "", "inhead": "", "html": "", "exampleId": "196iframeExample1", "runCode": ""}, {"code": " $(\"#feeds\").load(\"feeds.php\", {limit: 25}, function(){\n   alert(\"The last 25 entries in the feed have been loaded\");\n });", "htmlCode": " $(\"#feeds\").load(\"feeds.php\", {limit: 25}, function(){\n   alert(\"The last 25 entries in the feed have been loaded\");\n });", "desc": "Same as above, but will POST the additional parameters to the server and a callback that is executed when the server is finished responding.", "css": "", "inhead": "", "html": "", "exampleId": "196iframeExample2", "runCode": ""}]}, "get197": {"id": 197, "searchname": "get", "name": "$.get", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "XMLHttpRequest", "added": "1.0", "sample": "", "desc": "Load a remote page using an HTTP GET request.", "longdesc": "<p>This is an easy way to send a simple GET request to a server without having to use the more complex $.ajax function. It allows a single callback function to be specified that will be executed when the request is complete (and only if the response has a successful response code). If you need to have both error and success callbacks, you may want to use $.ajax.</p>", "params": [{"optional": false, "name": "url", "type": "String", "desc": "The URL of the page to load."}, {"optional": true, "name": "data", "type": "Map", "desc": "Key/value pairs that will be sent to the server."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the data is loaded successfully.\n<pre>function (data, textStatus) {\n  // data could be xmlDoc, jsonObj, html, text, etc...\n  this; // the options for this ajax request\n}\n</pre>"}], "examples": [{"code": " $.get(\"test.php\");", "htmlCode": " $.get(\"test.php\");", "desc": "Request the test.php page, but ignore the return results.", "css": "", "inhead": "", "html": "", "exampleId": "197iframeExample0", "runCode": ""}, {"code": " $.get(\"test.php\", { name: \"John\", time: \"2pm\" } );", "htmlCode": " $.get(\"test.php\", { name: \"John\", time: \"2pm\" } );", "desc": "Request the test.php page and send some additional data along (while still ignoring the return results).", "css": "", "inhead": "", "html": "", "exampleId": "197iframeExample1", "runCode": ""}, {"code": " $.get(\"test.php\", function(data){\n   alert(\"Data Loaded: \" + data);\n });", "htmlCode": " $.get(\"test.php\", function(data){\n   alert(\"Data Loaded: \" + data);\n });", "desc": "Alert out the results from requesting test.php (HTML or XML, depending on what was returned).", "css": "", "inhead": "", "html": "", "exampleId": "197iframeExample2", "runCode": ""}, {"code": " $.get(\"test.cgi\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     alert(\"Data Loaded: \" + data);\n   });", "htmlCode": " $.get(\"test.cgi\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     alert(\"Data Loaded: \" + data);\n   });", "desc": "Alert out the results from requesting test.cgi with an additional payload of data (HTML or XML, depending on what was returned).", "css": "", "inhead": "", "html": "", "exampleId": "197iframeExample3", "runCode": ""}]}, "getjson198": {"id": 198, "searchname": "getjson", "name": "$.getJSON", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "XMLHttpRequest", "added": "1.0", "sample": "", "desc": "Load JSON data using an HTTP GET request.", "longdesc": "<p>As of jQuery 1.2, you can load JSON data located on another domain if you specify a <a href=\"http://bob.pythonmac.org/archives/2005/12/05/remote-json-jsonp/\">JSONP</a> callback, which can be done like so: \"myurl?callback=?\". jQuery automatically replaces the ? with the correct method name to call, calling your specified callback.</p><p>\nNote: Keep in mind, that lines after this function will be executed before callback.</p>", "params": [{"optional": false, "name": "url", "type": "String", "desc": "The URL of the page to load."}, {"optional": true, "name": "data", "type": "Map", "desc": "Key/value pairs that will be sent to the server."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the data is loaded successfully.\n<pre>function (data, textStatus) {\n  // data will be a jsonObj\n  this; // the options for this ajax request\n}\n</pre>"}], "examples": [{"code": "$.getJSON(\"http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?\",\n        function(data){\n          $.each(data.items, function(i,item){\n            $(\"<img/>\").attr(\"src\", item.media.m).appendTo(\"#images\");\n            if ( i == 3 ) return false;\n          });\n        });", "htmlCode": "$.getJSON(\"http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?\",\n        function(data){\n          $.each(data.items, function(i,item){\n            $(\"&lt;img/&gt;\").attr(\"src\", item.media.m).appendTo(\"#images\");\n            if ( i == 3 ) return false;\n          });\n        });", "desc": "Loads the four most recent cat pictures from the Flickr JSONP API.", "css": "img{ height: 100px; float: left; }", "inhead": "", "html": "<div id=\"images\"></div>", "exampleId": "198iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$.getJSON(\"http://api.flickr.com/services/feeds/photos_public.gne?tags=cat&tagmode=any&format=json&jsoncallback=?\",\n        function(data){\n          $.each(data.items, function(i,item){\n            $(\"<img/>\").attr(\"src\", item.media.m).appendTo(\"#images\");\n            if ( i == 3 ) return false;\n          });\n        });\n  });\n</script>\n<style>\nimg{ height: 100px; float: left; }\n</style>\n</head>\n<body>\n<div id=\"images\"></div>\n</body>\n</html>"}, {"code": " $.getJSON(\"test.js\", function(json){\n   alert(\"JSON Data: \" + json.users[3].name);\n });", "htmlCode": " $.getJSON(\"test.js\", function(json){\n   alert(\"JSON Data: \" + json.users[3].name);\n });", "desc": "Load the JSON data from test.js and access a name from the returned JSON data.", "css": "", "inhead": "", "html": "", "exampleId": "198iframeExample1", "runCode": ""}, {"code": " $.getJSON(\"test.js\", { name: \"John\", time: \"2pm\" }, function(json){\n   alert(\"JSON Data: \" + json.users[3].name);\n });", "htmlCode": " $.getJSON(\"test.js\", { name: \"John\", time: \"2pm\" }, function(json){\n   alert(\"JSON Data: \" + json.users[3].name);\n });", "desc": "Load the JSON data from test.js, passing along additional data, and access a name from the returned JSON data.", "css": "", "inhead": "", "html": "", "exampleId": "198iframeExample2", "runCode": ""}, {"code": "\nvar id=$(\"#id\").attr(\"value\");\n  $.getJSON(\"pages.php\",{id:id},dates);\nfunction dates(datos)\n{\n\t\n $(\"#list\").html(\"Name:\"+datos[1].name+\"<br>\"+\"Last Name:\"+datos[1].lastname+\"<br>\"+\"Address:\"+datos[1].address);\n}\n", "htmlCode": "\nvar id=$(\"#id\").attr(\"value\");\n  $.getJSON(\"pages.php\",{id:id},dates);\nfunction dates(datos)\n{\n\t\n $(\"#list\").html(\"Name:\"+datos[1].name+\"&lt;br&gt;\"+\"Last Name:\"+datos[1].lastname+\"&lt;br&gt;\"+\"Address:\"+datos[1].address);\n}\n", "desc": "List the result of a consultation of pages.php in HTML as an array. By Manuel Gonzalez.", "css": "", "inhead": "", "html": "", "exampleId": "198iframeExample3", "runCode": ""}]}, "getscript199": {"id": 199, "searchname": "getscript", "name": "$.getScript", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "XMLHttpRequest", "added": "1.0", "sample": "", "desc": "Loads, and executes, a local JavaScript file using an HTTP GET request.", "longdesc": "<p>Before jQuery 1.2, getScript was only able to load scripts from the same domain as the original page. As of 1.2, you can now load JavaScript files from any domain.</p><p>Warning: Safari 2 and older is unable to evaluate scripts in a global context synchronously. If you load functions via getScript, make sure to call them after a delay.</p>", "params": [{"optional": false, "name": "url", "type": "String", "desc": "The URL of the page to load."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the data is loaded successfully.\n<pre>function (data, textStatus) {\n  // data should be javascript\n  this; // the options for this ajax request\n}\n</pre>"}], "examples": [{"code": "$.getScript(\"http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js\", function(){\n  $(\"#go\").click(function(){\n    $(\".block\").animate( { backgroundColor: 'pink' }, 1000)\n      .animate( { backgroundColor: 'blue' }, 1000);\n  });\n});", "htmlCode": "$.getScript(\"http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js\", function(){\n  $(\"#go\").click(function(){\n    $(\".block\").animate( { backgroundColor: 'pink' }, 1000)\n      .animate( { backgroundColor: 'blue' }, 1000);\n  });\n});", "desc": "We load the new <a href=\"http://jquery.com/plugins/project/color\">http://jquery.com/plugins/project/color</a> dynamically and bind some color animations to occur once the new functionality is loaded.", "css": ".block { \n   background-color: blue; \n   width: 150px; \n   height: 70px;\n   margin: 10px; \n}", "inhead": "", "html": "<button id=\"go\">&raquo; Run</button>\n<div class=\"block\"></div>\n", "exampleId": "199iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n$.getScript(\"http://dev.jquery.com/view/trunk/plugins/color/jquery.color.js\", function(){\n  $(\"#go\").click(function(){\n    $(\".block\").animate( { backgroundColor: 'pink' }, 1000)\n      .animate( { backgroundColor: 'blue' }, 1000);\n  });\n});\n  });\n</script>\n<style>\n.block { \n   background-color: blue; \n   width: 150px; \n   height: 70px;\n   margin: 10px; \n}\n</style>\n</head>\n<body>\n<button id=\"go\">&raquo; Run</button>\n<div class=\"block\"></div>\n\n</body>\n</html>"}, {"code": " $.getScript(\"test.js\");", "htmlCode": " $.getScript(\"test.js\");", "desc": "Load the test.js JavaScript file and execute it.", "css": "", "inhead": "", "html": "", "exampleId": "199iframeExample1", "runCode": ""}, {"code": " $.getScript(\"test.js\", function(){\n   alert(\"Script loaded and executed.\");\n });", "htmlCode": " $.getScript(\"test.js\", function(){\n   alert(\"Script loaded and executed.\");\n });", "desc": "Load the test.js JavaScript file and execute it, displaying an alert message when the execution is complete.", "css": "", "inhead": "", "html": "", "exampleId": "199iframeExample2", "runCode": ""}]}, "post200": {"id": 200, "searchname": "post", "name": "$.post", "type": "function", "category": "Ajax", "subcategory": "Ajax Requests", "return": "XMLHttpRequest", "added": "1.0", "sample": "", "desc": "Load a remote page using an HTTP POST request.", "longdesc": "<p>This is an easy way to send a simple POST request to a server without having to use the more complex $.ajax function. It allows a single callback function to be specified that will be executed when the request is complete (and only if the response has a successful response code).\nThe returned data format can be specified by the fourth paramater.\nIf you need to have both error and success callbacks, you may want to use $.ajax. $.post is a (simplified) wrapper function for $.ajax.</p>", "params": [{"optional": false, "name": "url", "type": "String", "desc": "The URL of the page to load."}, {"optional": true, "name": "data", "type": "Map", "desc": "Key/value pairs that will be sent to the server."}, {"optional": true, "name": "callback", "type": "Function", "desc": "A function to be executed whenever the data is loaded successfully.\n<pre>function (data, textStatus) {\n  // data could be xmlDoc, jsonObj, html, text, etc...\n  this; // the options for this ajax request\n}\n</pre>"}, {"optional": true, "name": "type", "type": "String", "desc": "Type of data to be returned to callback function (JSON, XML, etc.)\n<pre>$.postJSON = function(url, data, callback) {\n\t$.post(url, data, callback, \"json\");\n};\n</pre>"}], "examples": [{"code": " $.post(\"test.php\");", "htmlCode": " $.post(\"test.php\");", "desc": "Request the test.php page, but ignore the return results.", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample0", "runCode": ""}, {"code": " $.post(\"test.php\", { name: \"John\", time: \"2pm\" } );", "htmlCode": " $.post(\"test.php\", { name: \"John\", time: \"2pm\" } );", "desc": "Request the test.php page and send some additional data along (while still ignoring the return results).", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample1", "runCode": ""}, {"code": " $.post(\"test.php\", function(data){\n   alert(\"Data Loaded: \" + data);\n });", "htmlCode": " $.post(\"test.php\", function(data){\n   alert(\"Data Loaded: \" + data);\n });", "desc": "Alert out the results from requesting test.php (HTML or XML, depending on what was returned).", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample2", "runCode": ""}, {"code": " $.post(\"test.cgi\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     alert(\"Data Loaded: \" + data);\n   });", "htmlCode": " $.post(\"test.cgi\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     alert(\"Data Loaded: \" + data);\n   });", "desc": "Alert out the results from requesting test.php with an additional payload of data (HTML or XML, depending on what was returned).", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample3", "runCode": ""}, {"code": " $.post(\"test.php\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     process(data);\n   }, \"xml\");", "htmlCode": " $.post(\"test.php\", { name: \"John\", time: \"2pm\" },\n   function(data){\n     process(data);\n   }, \"xml\");", "desc": "Gets the test.php page content, store it in a XMLHttpResponse object and applies the process() JavaScript function.", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample4", "runCode": ""}, {"code": " $.post(\"test.php\", { func: \"getNameAndTime\" },\n   function(data){\n     alert(data.name); // John\n     console.log(data.time); //  2pm\n   }, \"json\");", "htmlCode": " $.post(\"test.php\", { func: \"getNameAndTime\" },\n   function(data){\n     alert(data.name); // John\n     console.log(data.time); //  2pm\n   }, \"json\");", "desc": "Gets the test.php page contents which has been returned in json format (&lt;?php echo json_encode(array(\"name\"=&gt;\"John\",\"time\"=&gt;\"2pm\")); ?&gt;)\n", "css": "", "inhead": "", "html": "", "exampleId": "200iframeExample5", "runCode": ""}]}, "ajaxcomplete201": {"id": 201, "searchname": "ajaxcomplete", "name": "ajaxComplete", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed whenever an AJAX request completes. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "<p>The XMLHttpRequest and settings used for that request are passed as arguments to the callback.</p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function (event, XMLHttpRequest, ajaxOptions) {\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#msg\").ajaxComplete(function(request, settings){\n   $(this).append(\"<li>Request Complete.</li>\");\n });", "htmlCode": " $(\"#msg\").ajaxComplete(function(request, settings){\n   $(this).append(\"&lt;li&gt;Request Complete.&lt;/li&gt;\");\n });", "desc": "Show a message when an AJAX request completes.", "css": "", "inhead": "", "html": "", "exampleId": "201iframeExample0", "runCode": ""}]}, "ajaxerror202": {"id": 202, "searchname": "ajaxerror", "name": "ajaxError", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed whenever an AJAX request fails. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "<p>The XMLHttpRequest and settings used for that request are passed as arguments to the callback. A third argument, an exception object, is passed if an exception occured while processing the request.</p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function (event, XMLHttpRequest, ajaxOptions, thrownError) {\n  // thrownError only passed if an error was caught\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#msg\").ajaxError(function(event, request, settings){\n   $(this).append(\"<li>Error requesting page \" + settings.url + \"</li>\");\n });", "htmlCode": " $(\"#msg\").ajaxError(function(event, request, settings){\n   $(this).append(\"&lt;li&gt;Error requesting page \" + settings.url + \"&lt;/li&gt;\");\n });", "desc": "Show a message when an AJAX request fails.", "css": "", "inhead": "", "html": "", "exampleId": "202iframeExample0", "runCode": ""}]}, "ajaxsend203": {"id": 203, "searchname": "ajaxsend", "name": "ajaxSend", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed before an AJAX request is sent. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "<p>The XMLHttpRequest and settings used for that request are passed as arguments to the callback.</p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function (event, XMLHttpRequest, ajaxOptions) {\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#msg\").ajaxSend(function(evt, request, settings){\n   $(this).append(\"<li>Starting request at \" + settings.url + \"</li>\");\n });", "htmlCode": " $(\"#msg\").ajaxSend(function(evt, request, settings){\n   $(this).append(\"&lt;li&gt;Starting request at \" + settings.url + \"&lt;/li&gt;\");\n });", "desc": "Show a message before an AJAX request is sent.", "css": "", "inhead": "", "html": "", "exampleId": "203iframeExample0", "runCode": ""}]}, "ajaxstart204": {"id": 204, "searchname": "ajaxstart", "name": "ajaxStart", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed whenever an AJAX request begins and there is none already active. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function () {\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#loading\").ajaxStart(function(){\n   $(this).show();\n });", "htmlCode": " $(\"#loading\").ajaxStart(function(){\n   $(this).show();\n });", "desc": "Show a loading message whenever an AJAX request starts (and none is already active).", "css": "", "inhead": "", "html": "", "exampleId": "204iframeExample0", "runCode": ""}]}, "ajaxstop205": {"id": 205, "searchname": "ajaxstop", "name": "ajaxStop", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed whenever all AJAX requests have ended. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function () {\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#loading\").ajaxStop(function(){\n   $(this).hide();\n });", "htmlCode": " $(\"#loading\").ajaxStop(function(){\n   $(this).hide();\n });", "desc": "Hide a loading message after all the AJAX requests have stopped.", "css": "", "inhead": "", "html": "", "exampleId": "205iframeExample0", "runCode": ""}]}, "ajaxsuccess206": {"id": 206, "searchname": "ajaxsuccess", "name": "ajaxSuccess", "type": "function", "category": "Ajax", "subcategory": "Ajax Events", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Attach a function to be executed whenever an AJAX request completes successfully. This is an <a href='Ajax_Events'>Ajax Event</a>.", "longdesc": "<p>The event object, XMLHttpRequest, and settings used for that request are passed as arguments to the callback.</p>", "params": [{"optional": false, "name": "callback", "type": "Function", "desc": "The function to execute.\n<pre>function (event, XMLHttpRequest, ajaxOptions) {\n  this; // dom element listening\n}\n</pre>"}], "examples": [{"code": " $(\"#msg\").ajaxSuccess(function(evt, request, settings){\n   $(this).append(\"<li>Successful Request!</li>\");\n });", "htmlCode": " $(\"#msg\").ajaxSuccess(function(evt, request, settings){\n   $(this).append(\"&lt;li&gt;Successful Request!&lt;/li&gt;\");\n });", "desc": "Show a message when an AJAX request completes successfully.", "css": "", "inhead": "", "html": "", "exampleId": "206iframeExample0", "runCode": ""}]}, "ajaxsetup207": {"id": 207, "searchname": "ajaxsetup", "name": "$.ajaxSetup", "type": "function", "category": "Ajax", "subcategory": "Misc", "return": "", "added": "1.1", "sample": "", "desc": "Setup global settings for AJAX requests.", "longdesc": "<p>See <a href='Ajax/jQuery.ajax'>$.ajax</a> for a description of all available options.</p>", "params": [{"optional": false, "name": "options", "type": "Options", "desc": "A set of key/value pairs that configure the default Ajax request. All options are optional."}], "options": [], "examples": [{"code": " $.ajaxSetup({\n   url: \"/xmlhttp/\",\n   global: false,\n   type: \"POST\"\n });\n $.ajax({ data: myData });", "htmlCode": " $.ajaxSetup({\n   url: \"/xmlhttp/\",\n   global: false,\n   type: \"POST\"\n });\n $.ajax({ data: myData });", "desc": "Sets the defaults for AJAX requests to the url \"/xmlhttp/\", disables global handlers and uses POST instead of GET. The following AJAX requests then sends some data without having to set anything else.", "css": "", "inhead": "", "html": "", "exampleId": "207iframeExample0", "runCode": ""}]}, "serialize208": {"id": 208, "searchname": "serialize", "name": "serialize", "type": "function", "category": "Ajax", "subcategory": "Misc", "return": "jQuery", "added": "1.0", "sample": "", "desc": "Serializes a set of input elements into a string of data. This will serialize all given elements.", "longdesc": "<p>As of jQuery 1.2 the serialize method correctly serializes forms. For older versions of jQuery, the <a href=\"http://www.malsup.com/jquery/form/\">http://www.malsup.com/jquery/form/</a> fieldSerialize method should be used.</p>", "params": [], "examples": [{"code": "\n    function showValues() {\n      var str = $(\"form\").serialize();\n      $(\"#results\").text(str);\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n", "htmlCode": "\n    function showValues() {\n      var str = $(\"form\").serialize();\n      $(\"#results\").text(str);\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n", "desc": "Serialize a form to a query string, that could be sent to a server in an Ajax request.", "css": "\n  body, select { font-size:12px; }\n  form { margin:5px; }\n  p { color:red; margin:5px; font-size:14px; }\n  b { color:blue; }\n  ", "inhead": "", "html": "<form>\n    <select name=\"single\">\n      <option>Single</option>\n      <option>Single2</option>\n    </select>\n    <select name=\"multiple\" multiple=\"multiple\">\n      <option selected=\"selected\">Multiple</option>\n      <option>Multiple2</option>\n      <option selected=\"selected\">Multiple3</option>\n    </select><br/>\n    <input type=\"checkbox\" name=\"check\" value=\"check1\"/> check1\n    <input type=\"checkbox\" name=\"check\" value=\"check2\" checked=\"checked\"/> check2\n    <input type=\"radio\" name=\"radio\" value=\"radio1\" checked=\"checked\"/> radio1\n    <input type=\"radio\" name=\"radio\" value=\"radio2\"/> radio2\n  </form>\n  <p><tt id=\"results\"></tt></p>", "exampleId": "208iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function showValues() {\n      var str = $(\"form\").serialize();\n      $(\"#results\").text(str);\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n\n  });\n</script>\n<style>\n\n  body, select { font-size:12px; }\n  form { margin:5px; }\n  p { color:red; margin:5px; font-size:14px; }\n  b { color:blue; }\n  \n</style>\n</head>\n<body>\n<form>\n    <select name=\"single\">\n      <option>Single</option>\n      <option>Single2</option>\n    </select>\n    <select name=\"multiple\" multiple=\"multiple\">\n      <option selected=\"selected\">Multiple</option>\n      <option>Multiple2</option>\n      <option selected=\"selected\">Multiple3</option>\n    </select><br/>\n    <input type=\"checkbox\" name=\"check\" value=\"check1\"/> check1\n    <input type=\"checkbox\" name=\"check\" value=\"check2\" checked=\"checked\"/> check2\n    <input type=\"radio\" name=\"radio\" value=\"radio1\" checked=\"checked\"/> radio1\n    <input type=\"radio\" name=\"radio\" value=\"radio2\"/> radio2\n  </form>\n  <p><tt id=\"results\"></tt></p>\n</body>\n</html>"}]}, "serializearray209": {"id": 209, "searchname": "serializearray", "name": "serializeArray", "type": "function", "category": "Ajax", "subcategory": "Misc", "return": "jQuery", "added": "1.2", "sample": "", "desc": "Serializes all forms and form elements (like the <a href='Ajax/serialize'>.serialize()</a> method) but returns a JSON data structure for you to work with.", "longdesc": "", "params": [], "examples": [{"code": "\n    function showValues() {\n      var fields = $(\":input\").serializeArray();\n      $(\"#results\").empty();\n      jQuery.each(fields, function(i, field){\n        $(\"#results\").append(field.value + \" \");\n      });\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n", "htmlCode": "\n    function showValues() {\n      var fields = $(\":input\").serializeArray();\n      $(\"#results\").empty();\n      jQuery.each(fields, function(i, field){\n        $(\"#results\").append(field.value + \" \");\n      });\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n", "desc": "Get the values from a form, iterate through them, and append them to a results display.", "css": "\n  body, select { font-size:14px; }\n  form { margin:5px; }\n  p { color:red; margin:5px; }\n  b { color:blue; }\n  ", "inhead": "", "html": "<p><b>Results:</b> <span id=\"results\"></span></p>\n  <form>\n    <select name=\"single\">\n      <option>Single</option>\n      <option>Single2</option>\n    </select>\n    <select name=\"multiple\" multiple=\"multiple\">\n      <option selected=\"selected\">Multiple</option>\n      <option>Multiple2</option>\n      <option selected=\"selected\">Multiple3</option>\n    </select><br/>\n    <input type=\"checkbox\" name=\"check\" value=\"check1\"/> check1\n    <input type=\"checkbox\" name=\"check\" value=\"check2\" checked=\"checked\"/> check2\n    <input type=\"radio\" name=\"radio\" value=\"radio1\" checked=\"checked\"/> radio1\n    <input type=\"radio\" name=\"radio\" value=\"radio2\"/> radio2\n  </form>", "exampleId": "209iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function showValues() {\n      var fields = $(\":input\").serializeArray();\n      $(\"#results\").empty();\n      jQuery.each(fields, function(i, field){\n        $(\"#results\").append(field.value + \" \");\n      });\n    }\n\n    $(\":checkbox, :radio\").click(showValues);\n    $(\"select\").change(showValues);\n    showValues();\n\n  });\n</script>\n<style>\n\n  body, select { font-size:14px; }\n  form { margin:5px; }\n  p { color:red; margin:5px; }\n  b { color:blue; }\n  \n</style>\n</head>\n<body>\n<p><b>Results:</b> <span id=\"results\"></span></p>\n  <form>\n    <select name=\"single\">\n      <option>Single</option>\n      <option>Single2</option>\n    </select>\n    <select name=\"multiple\" multiple=\"multiple\">\n      <option selected=\"selected\">Multiple</option>\n      <option>Multiple2</option>\n      <option selected=\"selected\">Multiple3</option>\n    </select><br/>\n    <input type=\"checkbox\" name=\"check\" value=\"check1\"/> check1\n    <input type=\"checkbox\" name=\"check\" value=\"check2\" checked=\"checked\"/> check2\n    <input type=\"radio\" name=\"radio\" value=\"radio1\" checked=\"checked\"/> radio1\n    <input type=\"radio\" name=\"radio\" value=\"radio2\"/> radio2\n  </form>\n</body>\n</html>"}]}, "browser210": {"id": 210, "searchname": "browser", "name": "$.browser", "type": "property", "category": "Utilities", "subcategory": "User Agent", "return": "Map", "added": "1.0", "sample": "", "desc": "Contains flags for the useragent, read from navigator.userAgent.", "longdesc": "<p>Available flags are:<ul><li> safari</li><li> opera</li><li> msie</li><li> mozilla</li></ul></p><p>This property is available before the DOM is ready, therefore you can use it to add ready events only for certain browsers.</p><p>There are situations where object detection is not reliable enough, in such cases it makes sense to use browser detection.</p><p>A combination of browser and object detection yields quite reliable results. </p>", "params": [], "examples": [{"code": "\n    jQuery.each(jQuery.browser, function(i, val) {\n      $(\"<div>\" + i + \" : <span>\" + val + \"</span>\")\n                .appendTo(document.body);\n    });\n", "htmlCode": "\n    jQuery.each(jQuery.browser, function(i, val) {\n      $(\"&lt;div&gt;\" + i + \" : &lt;span&gt;\" + val + \"&lt;/span&gt;\")\n                .appendTo(document.body);\n    });\n", "desc": "Show the browser info.", "css": "\n  p { color:green; font-weight:bolder; margin:3px 0 0 10px; }\n  div { color:blue; margin-left:20px; font-size:14px; }\n  span { color:red; }\n  ", "inhead": "", "html": "<p>Browser info:</p>", "exampleId": "210iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    jQuery.each(jQuery.browser, function(i, val) {\n      $(\"<div>\" + i + \" : <span>\" + val + \"</span>\")\n                .appendTo(document.body);\n    });\n\n  });\n</script>\n<style>\n\n  p { color:green; font-weight:bolder; margin:3px 0 0 10px; }\n  div { color:blue; margin-left:20px; font-size:14px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<p>Browser info:</p>\n</body>\n</html>"}, {"code": "$.browser.msie", "htmlCode": "$.browser.msie", "desc": "Returns true if the current useragent is some version of Microsoft's Internet Explorer", "css": "", "inhead": "", "html": "", "exampleId": "210iframeExample1", "runCode": ""}, {"code": "if ($.browser.safari) {\n    alert(\"this is safari!\");\n }", "htmlCode": "if ($.browser.safari) {\n    alert(\"this is safari!\");\n }", "desc": "Alerts \"this is safari!\" only for safari browsers", "css": "", "inhead": "", "html": "", "exampleId": "210iframeExample2", "runCode": ""}]}, "browser.version211": {"id": 211, "searchname": "browser.version", "name": "$.browser.version", "type": "property", "category": "Utilities", "subcategory": "User Agent", "return": "String", "added": "1.1.3", "sample": "", "desc": "The version number of the rendering engine for the user's browser.", "longdesc": "<p>Here are some typical results:<ul><li> Internet Explorer: 6.0, 7.0</li><li> Mozilla/Firefox/Flock/Camino: 1.7.12, 1.8.1.3</li><li> Opera: 9.20</li><li> Safari/Webkit: 312.8, 418.9</li></ul></p>", "params": [], "examples": [{"code": "\n\n    $(\"p\").html(\"The browser version is: <span>\" +\n                jQuery.browser.version + \"</span>\");\n", "htmlCode": "\n\n    $(\"p\").html(\"The browser version is: &lt;span&gt;\" +\n                jQuery.browser.version + \"&lt;/span&gt;\");\n", "desc": "Returns the browser version.", "css": "\n  p { color:blue; margin:20px; }\n  span { color:red; }\n  ", "inhead": "", "html": "<p>\n  </p>", "exampleId": "211iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n\n    $(\"p\").html(\"The browser version is: <span>\" +\n                jQuery.browser.version + \"</span>\");\n\n  });\n</script>\n<style>\n\n  p { color:blue; margin:20px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<p>\n  </p>\n</body>\n</html>"}, {"code": "if ( $.browser.msie )\n  alert( $.browser.version );\n}", "htmlCode": "if ( $.browser.msie )\n  alert( $.browser.version );\n}", "desc": "Alerts the version of IE that is being used", "css": "", "inhead": "", "html": "", "exampleId": "211iframeExample1", "runCode": ""}, {"code": "\nif (jQuery.browser.msie) {\n  alert(parseInt(jQuery.browser.version));\n}\n", "htmlCode": "\nif (jQuery.browser.msie) {\n  alert(parseInt(jQuery.browser.version));\n}\n", "desc": "Often you only care about the \"major number,\" the whole number. This can be accomplished with JavaScript's built-in parseInt() function:", "css": "", "inhead": "", "html": "", "exampleId": "211iframeExample2", "runCode": ""}]}, "boxmodel212": {"id": 212, "searchname": "boxmodel", "name": "$.boxModel", "type": "property", "category": "Utilities", "subcategory": "User Agent", "return": "Boolean", "added": "1.0", "sample": "", "desc": "States if the current page, in the user's browser, is being rendered using the [http://www.w3.org/TR/REC-CSS2/box.html W3C CSS Box Model].", "longdesc": "", "params": [], "examples": [{"code": "\n\n    $(\"p\").html(\"The box model for this iframe is: <span>\" +\n                jQuery.boxModel + \"</span>\");\n", "htmlCode": "\n\n    $(\"p\").html(\"The box model for this iframe is: &lt;span&gt;\" +\n                jQuery.boxModel + \"&lt;/span&gt;\");\n", "desc": "Returns the box model for the iframe.", "css": "\n  p { color:blue; margin:20px; }\n  span { color:red; }\n  ", "inhead": "", "html": "<p>\n  </p>", "exampleId": "212iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n\n    $(\"p\").html(\"The box model for this iframe is: <span>\" +\n                jQuery.boxModel + \"</span>\");\n\n  });\n</script>\n<style>\n\n  p { color:blue; margin:20px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<p>\n  </p>\n</body>\n</html>"}, {"code": "$.boxModel", "htmlCode": "$.boxModel", "desc": "Returns false if the page is in QuirksMode in Internet Explorer", "css": "", "inhead": "", "html": "", "exampleId": "212iframeExample1", "runCode": ""}]}, "each213": {"id": 213, "searchname": "each", "name": "$.each", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Object", "added": "1.0", "sample": "", "desc": "A generic iterator function, which can be used to seamlessly iterate over both objects and arrays.", "longdesc": "<p>This function is not the same as $().each() - which is used to iterate, exclusively, over a jQuery object. This function can be used to iterate over anything.</p><p>The callback has two arguments:the key (objects) or index (arrays) as the first, and the value as the second.</p><p>If you wish to break the each() loop at a particular iteration you can do so by making your function return false. Other return values are ignored.</p>", "params": [{"optional": false, "name": "object", "type": "Object", "desc": "The object or array to iterate over."}, {"optional": false, "name": "callback", "type": "Function", "desc": "The function that will be executed on every object.\n<pre>function callback(indexInArray, valueOfElement) {\n  var booleanKeepGoing;\n\n  this; // == valueOfElement\n\n  return booleanKeepGoing; // optional, unless false \n                           // and want to stop looping\n}\n</pre>"}], "examples": [{"code": "\n    var arr = [ \"one\", \"two\", \"three\", \"four\", \"five\" ];\n    var obj = { one:1, two:2, three:3, four:4, five:5 };\n\n    jQuery.each(arr, function() {\n      $(\"#\" + this).text(\"My id is \" + this + \".\");\n      return (this != \"four\"); // will stop running to skip \"five\"\n    });\n\n    jQuery.each(obj, function(i, val) {\n      $(\"#\" + i).append(document.createTextNode(\" - \" + val));\n    });\n", "htmlCode": "\n    var arr = [ \"one\", \"two\", \"three\", \"four\", \"five\" ];\n    var obj = { one:1, two:2, three:3, four:4, five:5 };\n\n    jQuery.each(arr, function() {\n      $(\"#\" + this).text(\"My id is \" + this + \".\");\n      return (this != \"four\"); // will stop running to skip \"five\"\n    });\n\n    jQuery.each(obj, function(i, val) {\n      $(\"#\" + i).append(document.createTextNode(\" - \" + val));\n    });\n", "desc": "Iterates through the array displaying each number as both a word and numeral", "css": "\n  div { color:blue; }\n  div#five { color:red; }\n  ", "inhead": "", "html": "<div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>\n  <div id=\"four\"></div>\n  <div id=\"five\"></div>", "exampleId": "213iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var arr = [ \"one\", \"two\", \"three\", \"four\", \"five\" ];\n    var obj = { one:1, two:2, three:3, four:4, five:5 };\n\n    jQuery.each(arr, function() {\n      $(\"#\" + this).text(\"My id is \" + this + \".\");\n      return (this != \"four\"); // will stop running to skip \"five\"\n    });\n\n    jQuery.each(obj, function(i, val) {\n      $(\"#\" + i).append(document.createTextNode(\" - \" + val));\n    });\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  div#five { color:red; }\n  \n</style>\n</head>\n<body>\n<div id=\"one\"></div>\n  <div id=\"two\"></div>\n  <div id=\"three\"></div>\n  <div id=\"four\"></div>\n  <div id=\"five\"></div>\n</body>\n</html>"}, {"code": " $.each( [0,1,2], function(i, n){\n   alert( \"Item #\" + i + \": \" + n );\n });", "htmlCode": " $.each( [0,1,2], function(i, n){\n   alert( \"Item #\" + i + \": \" + n );\n });", "desc": "Iterates over items in an array, accessing both the current item and its index.", "css": "", "inhead": "", "html": "", "exampleId": "213iframeExample1", "runCode": ""}, {"code": "$.each( { name: \"John\", lang: \"JS\" }, function(i, n){\n   alert( \"Name: \" + i + \", Value: \" + n );\n });", "htmlCode": "$.each( { name: \"John\", lang: \"JS\" }, function(i, n){\n   alert( \"Name: \" + i + \", Value: \" + n );\n });", "desc": "Iterates over the properties in an object, accessing both the current item and its key.", "css": "", "inhead": "", "html": "", "exampleId": "213iframeExample2", "runCode": ""}]}, "extend214": {"id": 214, "searchname": "extend", "name": "$.extend", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Object", "added": "1.0", "sample": "", "desc": "Extend one object with one or more others, returning the original, modified, object.", "longdesc": "<p>If no target is specified, the JQuery namespace itself is extended.  This can be useful for plugin authors wishing to add new methods to JQuery.</p><p>If a boolean false is specified as the first argument, JQuery performs a deep copy, recursively copying any objects it finds.  Otherwise, the copy will share structure with the original object(s).</p><p>Undefined properties are not copied.  However, properties inherited from the object's prototype <em>will</em> be copied over.</p>", "params": [{"optional": false, "name": "target", "type": "Object", "desc": "The object to extend."}, {"optional": false, "name": "object1", "type": "Object", "desc": "The object that will be merged into the first."}, {"optional": true, "name": "objectN", "type": "Object", "desc": "More objects to merge into the first."}], "examples": [{"code": "var settings = { validate: false, limit: 5, name: \"foo\" };\nvar options = { validate: true, name: \"bar\" };\njQuery.extend(settings, options);", "htmlCode": "var settings = { validate: false, limit: 5, name: \"foo\" };\nvar options = { validate: true, name: \"bar\" };\njQuery.extend(settings, options);", "desc": "Merge settings and options, modifying settings.", "css": "", "inhead": "", "html": "", "exampleId": "214iframeExample0", "runCode": ""}, {"code": "var empty = {}\nvar defaults = { validate: false, limit: 5, name: \"foo\" };\nvar options = { validate: true, name: \"bar\" };\nvar settings = $.extend(empty, defaults, options);", "htmlCode": "var empty = {}\nvar defaults = { validate: false, limit: 5, name: \"foo\" };\nvar options = { validate: true, name: \"bar\" };\nvar settings = $.extend(empty, defaults, options);", "desc": "Merge defaults and options, without modifying the defaults.", "css": "", "inhead": "", "html": "", "exampleId": "214iframeExample1", "runCode": ""}]}, "grep215": {"id": 215, "searchname": "grep", "name": "$.grep", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Array", "added": "1.0", "sample": "", "desc": "Filter items out of an array, by using a filter function.", "longdesc": "<p>The specified function will be passed two arguments: The current array item and the filter function. The function must return 'true' to keep the item in the array, false to remove it.</p>", "params": [{"optional": false, "name": "array", "type": "Array", "desc": "The Array to find items in."}, {"optional": false, "name": "callback", "type": "Function", "desc": "The function to process each item against.  The first argument to the function is the list item, and the second argument is the list index.  The function should return a Boolean value.  The \"lambda-form\" function feature was removed in jQuery 1.2.3 to help compatibility with other frameworks.\n<pre>function callback(elementOfArray, indexInArray) {\n  var shouldKeepIt;\n\n  this; // unmapped\n\n  return shouldKeepIt;\n}\n</pre>"}, {"optional": true, "name": "invert", "type": "Boolean", "desc": "If \"invert\" is false, or not provided, then the function returns an array consisting of all elements for which \"callback\" returns true.  If \"invert\" is true, then the function returns an array consisting of all elements for which \"callback\" returns false."}], "examples": [{"code": "\n    var arr = [ 1, 9, 3, 8, 6, 1, 5, 9, 4, 7, 3, 8, 6, 9, 1 ];\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function(n, i){\n      return (n != 5 && i > 4);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function (a) { return a != 9; });\n    $(\"span\").text(arr.join(\", \"));\n", "htmlCode": "\n    var arr = [ 1, 9, 3, 8, 6, 1, 5, 9, 4, 7, 3, 8, 6, 9, 1 ];\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function(n, i){\n      return (n != 5 && i &gt; 4);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function (a) { return a != 9; });\n    $(\"span\").text(arr.join(\", \"));\n", "desc": "Filters the original array of numbers leaving that are not 5 and have an index greater than 3.  Then it removes all 9s while inverting it.", "css": "\n  div { color:blue; }\n  p { color:green; margin:0; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div></div>\n  <p></p>\n  <span></span>\n  ", "exampleId": "215iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var arr = [ 1, 9, 3, 8, 6, 1, 5, 9, 4, 7, 3, 8, 6, 9, 1 ];\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function(n, i){\n      return (n != 5 && i > 4);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.grep(arr, function (a) { return a != 9; });\n    $(\"span\").text(arr.join(\", \"));\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  p { color:green; margin:0; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <p></p>\n  <span></span>\n  \n</body>\n</html>"}, {"code": "$.grep( [0,1,2], function(n,i){\n   return n > 0;\n });", "htmlCode": "$.grep( [0,1,2], function(n,i){\n   return n &gt; 0;\n });", "desc": "Filter an array of numbers to include only numbers bigger then zero.", "css": "", "inhead": "", "html": "", "exampleId": "215iframeExample1", "runCode": ""}]}, "makearray216": {"id": 216, "searchname": "makearray", "name": "$.makeArray", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Array", "added": "1.2", "sample": "", "desc": "Turns an array-like object into a true array.", "longdesc": "<p>Array-like objects have a length property and its properties are numbered from 0 to length - 1.  Typically it will be unnecessary to use this function if you are using jQuery which uses this function internally.</p>", "params": [{"optional": false, "name": "obj", "type": "Object", "desc": "Array-like object to turn in to an actual Array."}], "examples": [{"code": "\n    var arr = jQuery.makeArray(document.getElementsByTagName(\"div\"));\n    arr.reverse(); // use an Array method on list of dom elements\n    $(arr).appendTo(document.body);\n", "htmlCode": "\n    var arr = jQuery.makeArray(document.getElementsByTagName(\"div\"));\n    arr.reverse(); // use an Array method on list of dom elements\n    $(arr).appendTo(document.body);\n", "desc": "Turn a collection of HTMLElements into an Array of them.", "css": "\n  div { color:red; }\n  ", "inhead": "", "html": "<div>First</div>\n  <div>Second</div>  \n  <div>Third</div>\n  <div>Fourth</div>", "exampleId": "216iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var arr = jQuery.makeArray(document.getElementsByTagName(\"div\"));\n    arr.reverse(); // use an Array method on list of dom elements\n    $(arr).appendTo(document.body);\n\n  });\n</script>\n<style>\n\n  div { color:red; }\n  \n</style>\n</head>\n<body>\n<div>First</div>\n  <div>Second</div>  \n  <div>Third</div>\n  <div>Fourth</div>\n</body>\n</html>"}]}, "map217": {"id": 217, "searchname": "map", "name": "$.map", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Array", "added": "1.0", "sample": "", "desc": "Translate all items in an array to another array of items.", "longdesc": "<p>The translation function that is provided to this method is called for each item in the array and is passed two arguments: The item to be translated, and its index within the array.</p><p>The function can then return the translated value, 'null' (to remove the item), or an array of values - which will be flattened into the full array. </p>", "params": [{"optional": false, "name": "array", "type": "Array", "desc": "The Array to translate."}, {"optional": false, "name": "callback", "type": "Function", "desc": "The function to process each item against.  The argument to the function is the list item. The function can return any value.  The \"lambda-form\" function represented as a string no longer works.  It was removed in version 1.2.3 to increase compatibility with Adobe AIR.   \n<pre>function callback(elementOfArray, indexInArray) {\n  var replacementValue;\n\n  this; // unmapped\n\n  return replacementValue;\n}\n</pre>"}], "examples": [{"code": "\n    var arr = [ \"a\", \"b\", \"c\", \"d\", \"e\" ]\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function(n, i){\n      return (n.toUpperCase() + i);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function (a) { return a + a; });\n    $(\"span\").text(arr.join(\", \"));\n", "htmlCode": "\n    var arr = [ \"a\", \"b\", \"c\", \"d\", \"e\" ]\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function(n, i){\n      return (n.toUpperCase() + i);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function (a) { return a + a; });\n    $(\"span\").text(arr.join(\", \"));\n", "desc": "A couple examples of using .map()", "css": "\n  div { color:blue; }\n  p { color:green; margin:0; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div></div>\n  <p></p>\n  <span></span>\n  ", "exampleId": "217iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var arr = [ \"a\", \"b\", \"c\", \"d\", \"e\" ]\n    $(\"div\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function(n, i){\n      return (n.toUpperCase() + i);\n    });\n    $(\"p\").text(arr.join(\", \"));\n\n    arr = jQuery.map(arr, function (a) { return a + a; });\n    $(\"span\").text(arr.join(\", \"));\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  p { color:green; margin:0; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div></div>\n  <p></p>\n  <span></span>\n  \n</body>\n</html>"}, {"code": "$.map( [0,1,2], function(n){\n   return n + 4;\n });", "htmlCode": "$.map( [0,1,2], function(n){\n   return n + 4;\n });", "desc": "Maps the original array to a new one and adds 4 to each value.", "css": "", "inhead": "", "html": "", "exampleId": "217iframeExample1", "runCode": ""}, {"code": "$.map( [0,1,2], function(n){\n   return n > 0 ? n + 1 : null;\n });", "htmlCode": "$.map( [0,1,2], function(n){\n   return n &gt; 0 ? n + 1 : null;\n });", "desc": "Maps the original array to a new one and adds 1 to each value if it is bigger then zero, otherwise it's removed.", "css": "", "inhead": "", "html": "", "exampleId": "217iframeExample2", "runCode": ""}, {"code": "$.map( [0,1,2], function(n){\n   return [ n, n + 1 ];\n });", "htmlCode": "$.map( [0,1,2], function(n){\n   return [ n, n + 1 ];\n });", "desc": "Maps the original array to a new one, each element is added with it's original value and the value plus one.", "css": "", "inhead": "", "html": "", "exampleId": "217iframeExample3", "runCode": ""}, {"code": "$.map( [0,1,2,3], function (a) { return a * a; } );", "htmlCode": "$.map( [0,1,2,3], function (a) { return a * a; } );", "desc": "Maps the original array to a new one, each element is squared.", "css": "", "inhead": "", "html": "", "exampleId": "217iframeExample4", "runCode": ""}]}, "inarray218": {"id": 218, "searchname": "inarray", "name": "$.inArray", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Number", "added": "1.2", "sample": "", "desc": "Determine the index of the first parameter in the Array (-1 if not found).", "longdesc": "", "params": [{"optional": false, "name": "value", "type": "Any", "desc": "Value to see if it exists in the array."}, {"optional": false, "name": "array", "type": "Array", "desc": "Array to look through for the value."}], "examples": [{"code": "\n    var arr = [ 4, \"Pete\", 8, \"John\" ];\n\n    $(\"span:eq(0)\").text(jQuery.inArray(\"John\", arr));\n    $(\"span:eq(1)\").text(jQuery.inArray(4, arr));\n    $(\"span:eq(2)\").text(jQuery.inArray(\"David\", arr));\n", "htmlCode": "\n    var arr = [ 4, \"Pete\", 8, \"John\" ];\n\n    $(\"span:eq(0)\").text(jQuery.inArray(\"John\", arr));\n    $(\"span:eq(1)\").text(jQuery.inArray(4, arr));\n    $(\"span:eq(2)\").text(jQuery.inArray(\"David\", arr));\n", "desc": "", "css": "\n  div { color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>\"John\" found at <span></span></div>\n  <div>4 found at <span></span></div>\n  <div>\"David\" found at <span></span></div>", "exampleId": "218iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var arr = [ 4, \"Pete\", 8, \"John\" ];\n\n    $(\"span:eq(0)\").text(jQuery.inArray(\"John\", arr));\n    $(\"span:eq(1)\").text(jQuery.inArray(4, arr));\n    $(\"span:eq(2)\").text(jQuery.inArray(\"David\", arr));\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>\"John\" found at <span></span></div>\n  <div>4 found at <span></span></div>\n  <div>\"David\" found at <span></span></div>\n</body>\n</html>"}]}, "unique219": {"id": 219, "searchname": "unique", "name": "$.unique", "type": "function", "category": "Utilities", "subcategory": "Array and Object operations", "return": "Array", "added": "1.1.3", "sample": "", "desc": "Remove all duplicate elements from an array of elements.", "longdesc": "", "params": [{"optional": false, "name": "array", "type": "Array", "desc": "The Array to translate."}], "examples": [{"code": "\n    var divs = $(\"div\").get();\n\n    // add 3 elements of class dup too (they are divs)\n    divs = divs.concat($(\".dup\").get());\n    $(\"div:eq(1)\").text(\"Pre-unique there are \" + divs.length + \" elements.\");\n\n    divs = jQuery.unique(divs);\n    $(\"div:eq(2)\").text(\"Post-unique there are \" + divs.length + \" elements.\")\n                  .css(\"color\", \"red\");\n", "htmlCode": "\n    var divs = $(\"div\").get();\n\n    // add 3 elements of class dup too (they are divs)\n    divs = divs.concat($(\".dup\").get());\n    $(\"div:eq(1)\").text(\"Pre-unique there are \" + divs.length + \" elements.\");\n\n    divs = jQuery.unique(divs);\n    $(\"div:eq(2)\").text(\"Post-unique there are \" + divs.length + \" elements.\")\n                  .css(\"color\", \"red\");\n", "desc": "Removes any duplicate elements from the array of divs.", "css": "\n  div { color:blue; }\n  ", "inhead": "", "html": "<div>There are 6 divs in this document.</div>\n  <div></div>\n  <div class=\"dup\"></div>\n  <div class=\"dup\"></div>\n  <div class=\"dup\"></div>\n  <div></div>", "exampleId": "219iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var divs = $(\"div\").get();\n\n    // add 3 elements of class dup too (they are divs)\n    divs = divs.concat($(\".dup\").get());\n    $(\"div:eq(1)\").text(\"Pre-unique there are \" + divs.length + \" elements.\");\n\n    divs = jQuery.unique(divs);\n    $(\"div:eq(2)\").text(\"Post-unique there are \" + divs.length + \" elements.\")\n                  .css(\"color\", \"red\");\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  \n</style>\n</head>\n<body>\n<div>There are 6 divs in this document.</div>\n  <div></div>\n  <div class=\"dup\"></div>\n  <div class=\"dup\"></div>\n  <div class=\"dup\"></div>\n  <div></div>\n</body>\n</html>"}, {"code": "$.unique(document.getElementsByTagName(\"div\"));", "htmlCode": "$.unique(document.getElementsByTagName(\"div\"));", "desc": "Removes any duplicate elements from the array of divs.", "css": "", "inhead": "", "html": "", "exampleId": "219iframeExample1", "runCode": ""}]}, "isfunction220": {"id": 220, "searchname": "isfunction", "name": "$.isFunction", "type": "function", "category": "Utilities", "subcategory": "Test operations", "return": "boolean", "added": "1.2", "sample": "", "desc": "Determine if the parameter passed is a function.", "longdesc": "", "params": [{"optional": false, "name": "obj", "type": "Object", "desc": "Object to test whether or not it is a function."}], "examples": [{"code": "\n    function stub() {\n    }\n    var objs = [\n          function () {},\n          { x:15, y:20 },\n          null,\n          stub,\n          \"function\"\n        ];\n\n    jQuery.each(objs, function (i) {\n      var isFunc = jQuery.isFunction(objs[i]);\n      $(\"span:eq( \" + i + \")\").text(isFunc);\n    });\n", "htmlCode": "\n    function stub() {\n    }\n    var objs = [\n          function () {},\n          { x:15, y:20 },\n          null,\n          stub,\n          \"function\"\n        ];\n\n    jQuery.each(objs, function (i) {\n      var isFunc = jQuery.isFunction(objs[i]);\n      $(\"span:eq( \" + i + \")\").text(isFunc);\n    });\n", "desc": "Test a few parameter examples.", "css": "\n  div { color:blue; margin:2px; font-size:14px; }\n  span { color:red; }\n  ", "inhead": "", "html": "\n  <div>jQuery.isFunction(objs[0]) = <span></span></div>\n  <div>jQuery.isFunction(objs[1]) = <span></span></div>\n  <div>jQuery.isFunction(objs[2]) = <span></span></div>\n  <div>jQuery.isFunction(objs[3]) = <span></span></div>\n  <div>jQuery.isFunction(objs[4]) = <span></span></div>\n  ", "exampleId": "220iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    function stub() {\n    }\n    var objs = [\n          function () {},\n          { x:15, y:20 },\n          null,\n          stub,\n          \"function\"\n        ];\n\n    jQuery.each(objs, function (i) {\n      var isFunc = jQuery.isFunction(objs[i]);\n      $(\"span:eq( \" + i + \")\").text(isFunc);\n    });\n\n  });\n</script>\n<style>\n\n  div { color:blue; margin:2px; font-size:14px; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n\n  <div>jQuery.isFunction(objs[0]) = <span></span></div>\n  <div>jQuery.isFunction(objs[1]) = <span></span></div>\n  <div>jQuery.isFunction(objs[2]) = <span></span></div>\n  <div>jQuery.isFunction(objs[3]) = <span></span></div>\n  <div>jQuery.isFunction(objs[4]) = <span></span></div>\n  \n</body>\n</html>"}, {"code": "$.isFunction(function(){});", "htmlCode": "$.isFunction(function(){});", "desc": "Finds out if the parameter is a funcion.", "css": "", "inhead": "", "html": "", "exampleId": "220iframeExample1", "runCode": ""}]}, "trim221": {"id": 221, "searchname": "trim", "name": "$.trim", "type": "function", "category": "Utilities", "subcategory": "String operations", "return": "String", "added": "1.0", "sample": "", "desc": "Remove the whitespace from the beginning and end of a string.", "longdesc": "<p>Uses a regular expression to remove whitespace from the given string.</p>", "params": [{"optional": false, "name": "str", "type": "String", "desc": "The string to trim."}], "examples": [{"code": "\n    $(\"button\").click(function () {\n      var str = \"     lots of spaces before and after     \";\n      alert(\"'\" + str + \"'\");\n\n      str = jQuery.trim(str);\n      alert(\"'\" + str + \"' - no longer\");\n    });\n", "htmlCode": "\n    $(\"button\").click(function () {\n      var str = \"     lots of spaces before and after     \";\n      alert(\"'\" + str + \"'\");\n\n      str = jQuery.trim(str);\n      alert(\"'\" + str + \"' - no longer\");\n    });\n", "desc": "Removes the two whitespaces at the start and at the end of the string.", "css": "", "inhead": "", "html": "<button>Show Trim Example</button>", "exampleId": "221iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function () {\n      var str = \"     lots of spaces before and after     \";\n      alert(\"'\" + str + \"'\");\n\n      str = jQuery.trim(str);\n      alert(\"'\" + str + \"' - no longer\");\n    });\n\n  });\n</script>\n<style>\n\n</style>\n</head>\n<body>\n<button>Show Trim Example</button>\n</body>\n</html>"}, {"code": " $.trim(\"  hello, how are you?  \");", "htmlCode": " $.trim(\"  hello, how are you?  \");", "desc": "Removes the two whitespaces at the start and at the end of the string.", "css": "", "inhead": "", "html": "", "exampleId": "221iframeExample1", "runCode": ""}]}, "data222": {"id": 222, "searchname": "data", "name": "$.data", "type": "function", "category": "Internals", "subcategory": "Data Cache", "return": "Number", "added": "1.2", "sample": "", "desc": "Returns a unique ID for the element.", "longdesc": "<p>Typically this function will only be used internally.  It is called automatically when necessary when using the other data() functionality.</p>", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "DOM element of interest."}], "examples": [{"code": "\n    $(document.body).click(function(e) {\n      var id = jQuery.data(e.target);\n      $(\"span\").text(id);\n    });\n", "htmlCode": "\n    $(document.body).click(function(e) {\n      var id = jQuery.data(e.target);\n      $(\"span\").text(id);\n    });\n", "desc": "Get the store id of an element.  It is assigned on the data() function call if one hasn't been assigned yet.", "css": "\n  div { margin:5px; background:yellow; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>A div</div>\n  <div>Another</div>\n  <p>The id of this div is <span>?</span></p>", "exampleId": "222iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(document.body).click(function(e) {\n      var id = jQuery.data(e.target);\n      $(\"span\").text(id);\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:5px; background:yellow; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>A div</div>\n  <div>Another</div>\n  <p>The id of this div is <span>?</span></p>\n</body>\n</html>"}]}, "data223": {"id": 223, "searchname": "data", "name": "$.data", "type": "function", "category": "Internals", "subcategory": "Data Cache", "return": "Any", "added": "1.2", "sample": "", "desc": "Returns value at named data store for the element.", "longdesc": "", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "DOM element of interest."}, {"optional": false, "name": "name", "type": "String", "desc": "Name of the data stored."}], "examples": [{"code": "\n    $(\"button\").click(function(e) {\n      var adiv = $(\"div\").get(0);\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = jQuery.data(adiv, \"blah\");\n          break;\n        case 1 :\n          jQuery.data(adiv, \"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          jQuery.data(adiv, \"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          jQuery.removeData(adiv);\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n", "htmlCode": "\n    $(\"button\").click(function(e) {\n      var adiv = $(\"div\").get(0);\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = jQuery.data(adiv, \"blah\");\n          break;\n        case 1 :\n          jQuery.data(adiv, \"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          jQuery.data(adiv, \"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          jQuery.removeData(adiv);\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n", "desc": "Get the data named \"blah\" stored at for an element.", "css": "\n  div { margin:5px; background:yellow; }\n  button { margin:5px; font-size:14px; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>A div</div>\n  <button>Get \"blah\" from the div</button>\n  <button>Set \"blah\" to \"hello\"</button>\n  <button>Set \"blah\" to 86</button>\n  <button>Remove \"blah\" from the div</button>\n  <p>The \"blah\" value of this div is <span>?</span></p>", "exampleId": "223iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    $(\"button\").click(function(e) {\n      var adiv = $(\"div\").get(0);\n      var value;\n\n      switch ($(\"button\").index(this)) {\n        case 0 :\n          value = jQuery.data(adiv, \"blah\");\n          break;\n        case 1 :\n          jQuery.data(adiv, \"blah\", \"hello\");\n          value = \"Stored!\";\n          break;\n        case 2 :\n          jQuery.data(adiv, \"blah\", 86);\n          value = \"Stored!\";\n          break;\n        case 3 :\n          jQuery.removeData(adiv);\n          value = \"Removed!\";\n          break;\n      }\n\n      $(\"span\").text(\"\" + value);\n    });\n\n  });\n</script>\n<style>\n\n  div { margin:5px; background:yellow; }\n  button { margin:5px; font-size:14px; }\n  p { margin:5px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>A div</div>\n  <button>Get \"blah\" from the div</button>\n  <button>Set \"blah\" to \"hello\"</button>\n  <button>Set \"blah\" to 86</button>\n  <button>Remove \"blah\" from the div</button>\n  <p>The \"blah\" value of this div is <span>?</span></p>\n</body>\n</html>"}]}, "data224": {"id": 224, "searchname": "data", "name": "$.data", "type": "function", "category": "Internals", "subcategory": "Data Cache", "return": "Any", "added": "1.2", "sample": "", "desc": "Stores the value in the named spot and also returns the value.", "longdesc": "<p>This function can be useful for attaching data to elements without having to create a new expando.  It also isn't limited to a string.  The value can be any format.</p><p>To avoid conflicts in plugins, it is usually effective to store one object using the plugin name and put all the necessary information in that object.</p><p><code>\n  var obj = jQuery.data($(\"#target\").get(0), \"pluginname\", {});\n  obj[...] = ...\n</code></p>", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "DOM element of interest."}, {"optional": false, "name": "name", "type": "String", "desc": "Name of the data to store."}, {"optional": false, "name": "value", "type": "Any", "desc": "Value to be stored."}], "examples": [{"code": "\n    var adiv = $(\"div\").get(0);\n    jQuery.data(adiv, \"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text(jQuery.data(adiv, \"test\").first);\n    $(\"span:last\").text(jQuery.data(adiv, \"test\").last);\n", "htmlCode": "\n    var adiv = $(\"div\").get(0);\n    jQuery.data(adiv, \"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text(jQuery.data(adiv, \"test\").first);\n    $(\"span:last\").text(jQuery.data(adiv, \"test\").last);\n", "desc": "Store then retrieve a value from the div element.", "css": "\n  div { color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>\n    The values stored were \n    <span></span>\n    and\n    <span></span>\n  </div>", "exampleId": "224iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var adiv = $(\"div\").get(0);\n    jQuery.data(adiv, \"test\", { first: 16, last: \"pizza!\" });\n    $(\"span:first\").text(jQuery.data(adiv, \"test\").first);\n    $(\"span:last\").text(jQuery.data(adiv, \"test\").last);\n\n  });\n</script>\n<style>\n\n  div { color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>\n    The values stored were \n    <span></span>\n    and\n    <span></span>\n  </div>\n</body>\n</html>"}]}, "removedata225": {"id": 225, "searchname": "removedata", "name": "$.removeData", "type": "function", "category": "Internals", "subcategory": "Data Cache", "return": "", "added": "1.2", "sample": "", "desc": "Remove the expando attribute that allows data storage on an element.", "longdesc": "<p>This is the complement function to jQuery.data(elem) which is called as necessary by jQuery.data(elem, name, value).</p>", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "Element to delete the data store from."}], "examples": [{"code": "\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv);\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n", "htmlCode": "\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv);\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n", "desc": "Set a data store then remove it.", "css": "\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>", "exampleId": "225iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv);\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n\n  });\n</script>\n<style>\n\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>\n</body>\n</html>"}]}, "removedata226": {"id": 226, "searchname": "removedata", "name": "$.removeData", "type": "function", "category": "Internals", "subcategory": "Data Cache", "return": "", "added": "1.2", "sample": "", "desc": "Removes just this one named data store.", "longdesc": "<p>This is the complement function to jQuery.data(elem, name, value).</p>", "params": [{"optional": false, "name": "elem", "type": "Element", "desc": "Element to delete the named data store property from."}, {"optional": false, "name": "name", "type": "String", "desc": "The name of the data store property to remove."}], "examples": [{"code": "\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv, \"test1\");\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n", "htmlCode": "\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv, \"test1\");\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n", "desc": "Set a data store for 2 names then remove one of them.", "css": "\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  ", "inhead": "", "html": "<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>", "exampleId": "226iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var adiv = $(\"div\").get(0);\n\n    $(\"span:eq(0)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.data(adiv, \"test1\", \"VALUE-1\");\n    jQuery.data(adiv, \"test2\", \"VALUE-2\");\n    $(\"span:eq(1)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    jQuery.removeData(adiv, \"test1\");\n    $(\"span:eq(2)\").text(\"\" + jQuery.data(adiv, \"test1\"));\n    $(\"span:eq(3)\").text(\"\" + jQuery.data(adiv, \"test2\"));\n\n  });\n</script>\n<style>\n\n  div { margin:2px; color:blue; }\n  span { color:red; }\n  \n</style>\n</head>\n<body>\n<div>value1 before creation: <span></span></div>\n  <div>value1 after creation: <span></span></div>\n  <div>value1 after removal: <span></span></div>\n  <div>value2 after removal: <span></span></div>\n</body>\n</html>"}]}, "param227": {"id": 227, "searchname": "param", "name": "$.param", "type": "function", "category": "Internals", "subcategory": "Ajax", "return": "String", "added": "1.2", "sample": "", "desc": "Serializes an array of form elements or an object (core of <a href='Ajax/serialize'>.serialize()</a> method).", "longdesc": "", "params": [{"optional": false, "name": "obj", "type": "Array&lt;Elements&gt;, jQuery, Object", "desc": "An Array or jQuery object is serialized by name/value pairs.  An object by key/value pairs."}], "examples": [{"code": "\n    var params = { width:1680, height:1050 };\n    var str = jQuery.param(params);\n    $(\"#results\").text(str);\n", "htmlCode": "\n    var params = { width:1680, height:1050 };\n    var str = jQuery.param(params);\n    $(\"#results\").text(str);\n", "desc": "Serialize a key/value object.", "css": "div { color:red; }", "inhead": "", "html": "<div id=\"results\"></div>", "exampleId": "227iframeExample0", "runCode": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n    \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<base href=\"http://docs.jquery.com\" />\n<script src=\"http://code.jquery.com/jquery-latest.js\"></script>\n\n<script>\n$(document).ready(function(){\n\n    var params = { width:1680, height:1050 };\n    var str = jQuery.param(params);\n    $(\"#results\").text(str);\n\n  });\n</script>\n<style>\ndiv { color:red; }\n</style>\n</head>\n<body>\n<div id=\"results\"></div>\n</body>\n</html>"}]}}, "searchNames": ["jquery1", "jquery2", "jquery3", "jquery4", "each5", "eq6", "get7", "get8", "index9", "length10", "data11", "data12", "removedata13", "fn.extend14", "extend15", "noconflict16", "noconflict17", "id18", "element19", "class20", "all21", "multiple22", "descendant23", "child24", "next25", "siblings26", "first27", "last28", "not29", "even30", "odd31", "eq32", "gt33", "lt34", "header35", "animated36", "contains37", "empty38", "has39", "parent40", "hidden41", "visible42", "attributehas43", "attributeequals44", "attributenotequal45", "attributestartswith46", "attributeendswith47", "attributecontains48", "attributemultiple49", "nthchild50", "firstchild51", "lastchild52", "onlychild53", "input54", "text55", "password56", "radio57", "checkbox58", "submit59", "image60", "reset61", "button62", "file63", "hidden64", "enabled65", "disabled66", "checked67", "selected68", "attr69", "attr70", "attr71", "attr72", "removeattr73", "addclass74", "hasclass75", "removeclass76", "toggleclass77", "html78", "html79", "text80", "text81", "val82", "val83", "val84", "eq85", "hasclass86", "filter87", "filter88", "is89", "map90", "not91", "slice92", "add93", "children94", "contents95", "find96", "next97", "nextall98", "parent99", "parents100", "prev101", "prevall102", "siblings103", "andself104", "end105", "html106", "html107", "text108", "text109", "append110", "appendto111", "prepend112", "prependto113", "after114", "before115", "insertafter116", "insertbefore117", "wrap118", "wrap119", "wrapall120", "wrapall121", "wrapinner122", "wrapinner123", "replacewith124", "replaceall125", "empty126", "remove127", "clone128", "clone129", "css130", "css131", "css132", "offset133", "height134", "height135", "width136", "width137", "ready138", "bind139", "one140", "trigger141", "triggerhandler142", "unbind143", "hover144", "toggle145", "blur146", "blur147", "change148", "change149", "click150", "click151", "dblclick152", "dblclick153", "error154", "error155", "focus156", "focus157", "keydown158", "keydown159", "keypress160", "keypress161", "keyup162", "keyup163", "load164", "mousedown165", "mousemove166", "mouseout167", "mouseover168", "mouseup169", "resize170", "scroll171", "select172", "select173", "submit174", "submit175", "unload176", "show177", "show178", "hide179", "hide180", "toggle181", "slidedown182", "slideup183", "slidetoggle184", "fadein185", "fadeout186", "fadeto187", "animate188", "animate189", "stop190", "queue191", "queue192", "queue193", "dequeue194", "ajax195", "load196", "get197", "getjson198", "getscript199", "post200", "ajaxcomplete201", "ajaxerror202", "ajaxsend203", "ajaxstart204", "ajaxstop205", "ajaxsuccess206", "ajaxsetup207", "serialize208", "serializearray209", "browser210", "browser.version211", "boxmodel212", "each213", "extend214", "grep215", "makearray216", "map217", "inarray218", "unique219", "isfunction220", "trim221", "data222", "data223", "data224", "removedata225", "removedata226", "param227"], "categories": [{"name": "Core", "subcategories": ["$(...) The jQuery Function", "jQuery Object Accessors", "Data Cache", "Plugins", "Interoperability"]}, {"name": "Selectors", "subcategories": ["Basics", "Hierarchy", "Basic Filters", "Content Filters", "Visibility Filters", "Attribute Filters", "Child Filters", "Forms", "Form Filters"]}, {"name": "Attributes", "subcategories": ["Attr", "Class", "HTML", "Text", "Value"]}, {"name": "Traversing", "subcategories": ["Filtering", "Finding", "Chaining"]}, {"name": "Manipulation", "subcategories": ["Changing Contents", "Inserting Inside", "Inserting Outside", "Inserting Around", "Replacing", "Removing", "Copying"]}, {"name": "CSS", "subcategories": ["CSS", "Positioning", "Height and Width"]}, {"name": "Events", "subcategories": ["Page Load", "Event Handling", "Interaction Helpers", "Event Helpers"]}, {"name": "Effects", "subcategories": ["Basics", "Sliding", "Fading", "Custom"]}, {"name": "Ajax", "subcategories": ["Ajax Requests", "Ajax Events", "Misc"]}, {"name": "Utilities", "subcategories": ["User Agent", "Array and Object operations", "Test operations", "String operations"]}, {"name": "Internals", "subcategories": ["Data Cache", "Ajax"]}]});
0
\ No newline at end of file
0
lib/docs/api-docs.xml
4241 additions, 0 deletions not shown
0
lib/docs/plugins.xml
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
0
@@ -0,0 +1,265 @@
0
+<?xml version="1.0" ?><docs startdoc="UI" timestamp="2009-01-11T17:18:15Z"><cat value="UI/Draggable"><subcat value="Plugin methods"><function cat="UI/Draggable" name="draggable" return="jQuery" timestamp="2009-01-05T17:55:30Z"><desc>Creates new draggables on the nodeset supplied by the query.</desc><longdesc>This jQuery plugin makes DOM nodes draggable by mouse. You can additionally supply a great range of options to make them fit your needs.
0
+
0
+All callbacks (start,stop,drag) receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):
0
+
0
+* '''ui.options''' - options used to initialize the draggable
0
+* '''ui.helper''' - the JQuery object representing the helper that's being dragged
0
+* '''ui.position''' - current position of the helper as { top, left } object, relative to the offset element
0
+* '''ui.absolutePosition''' - current absolute position of the helper as { top, left } object, relative to page
0
+</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the draggable. All options are optional.</desc></params><option default="parent" name="appendTo" type="Element, Selector"><desc>For a draggable with a ''helper'' specified, the matched element passed to ''appendTo'' will be used as the helper's container. If not specified, the helper is appended to the same container as the draggable.</desc></option><option default="false" name="axis" type="String"><desc>Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: 'x', 'y'.</desc></option><option default="':input'" name="cancel" type="Selector"><desc>Prevents dragging if you start on elements matching the selector. </desc></option><option name="containment" type="Element, Selector"><desc>Constrains dragging to within the bounds of the specified element - can be a DOM element, 'parent', 'document', 'window', or a jQuery selector.</desc></option><option default=" 'default'" name="cursor" type="String"><desc>The css cursor for the helper during the drag operation. </desc></option><option default=" false" name="connectToSortable" type="Array, Selector"><desc>An Array with comma seperated selector strings that match sortable lists, for example [&quot;div ul&quot;, &quot;ul.myclass&quot;], or alternatively a jQuery selector. The better choice is the Array, if the selection needs to be dynamic (i.e. at a later point, more/less lists match the selector). If this option is used (helper must be set to clone in order to work flawlessly), a draggable can be dragged onto a sortable list and then becomes part of it. </desc></option><option name="cursorAt" type="Object, Array"><desc>Moves the dragging element/helper so the cursor always appears to drag from the same position. Coordinates can be given as a hash using a combination of the keys ''top'', ''left'', ''right'', ''bottom''.</desc></option><option default="0" name="delay" type="Integer"><desc>Time in milliseconds to define when the dragging should start. It helps preventing unwanted drags when clicking on an element. </desc></option><option default="1" name="distance" type="Integer"><desc>Tolerance, in pixels, for when dragging should start. If specified, dragging will not start until after mouse is dragged beyond distance.</desc></option><option name="grid" type="[Integer x, Integer y]"><desc>Snaps the dragging element/helper to a grid, every x and y pixels. </desc></option><option name="handle" type="Element, Selector"><desc>Restricts drag start click to the specified element. Default value: draggable element.</desc></option><option default=" 'original'" name="helper" type="String, Function"><desc>Allows for a helper element to be used for dragging display. The 'clone' option will produce the 'ghosting' effect. Possible values: 'original', 'clone', Function. If you supply a function, it must return a valid DOM node. </desc></option><option default=" false" name="iframeFix" type="String, Boolean"><desc>Only useful in combination with cursorAt, or in any case, if the mouse cursor is not over the helper. It creates transparent overlays for all iframes on the page (if set to true, can be used to match certain iframes only if a selector is used) that are overlayed during the drag, so you can safely mouseover them without releasing the event. </desc></option><option default=" 1.0" name="opacity" type="Float"><desc>Opacity for the helper while being dragged. </desc></option><option default=" false" name="refreshPositions" type="Boolean"><desc> If set to true, all droppable positions are calculated on every mousemove. Caution: This solves issues on highly dynamic pages, but dramatically decreases performance. </desc></option><option default=" false " name="revert" type="Boolean"><desc>If set to true, the element will return to its start position when dragging stops. Also accepts the strings &quot;valid&quot; and &quot;invalid&quot;: If set to invalid, revert will only occur if the draggable has not been dropped on a droppable. For valid, it's the other way around. </desc></option><option default="500" name="revertDuration" type="Integer"><desc>The duration of the revert animation. Since version 1.6 stable.</desc></option><option default="false" name="scroll" type="Boolean"><desc>If true, container auto-scrolls while dragging. </desc></option><option default="20" name="scrollSensitivity" type="Integer"><desc>Distance in pixels from the edge of the view port after which the view port should scroll. Distance is relative to pointer, not the draggable. </desc></option><option default="20" name="scrollSpeed" type="Integer"><desc>The speed at which the window should scroll once the mouse pointer gets within the ''scrollSensitivity'' distance. </desc></option><option default="'default'" name="scope" type="String"><desc>Only useful if you have large collections of droppables. It's like an identifier that says what droppables a draggable can be dropped on. Must be set for both the draggable and the related droppables, works as addition to the droppable's accept option.  </desc></option><option default=" false" name="snap" type="Boolean,Selector"><desc> If set to a selector or to true (same as selector &quot;.ui-draggable&quot;), the new draggable will snap to the edges of the selected elements when coming to an edge of the element. </desc></option><option default=" 'both' " name="snapMode" type="&quot;inner&quot;,&quot;outer&quot;,&quot;both&quot;"><desc> If set, the dragged element will only snap to the outer edges or to the inner edges of the element. </desc></option><option default="20" name="snapTolerance" type="Integer"><desc> The distance in pixels from the snapping elements before the snapping should occur.</desc></option><option default="false" name="stack" type="Hash"><desc>Controls the z-Index of the defined group (key 'group' in the hash, accepts jQuery selector) automatically, always brings to front the dragged item. Very useful in things like window managers. Optionally, a 'min' key can be set, so the zIndex cannot go below that value.</desc></option><option name="zIndex" type="Integer"><desc>z-index for the helper while being dragged.</desc></option><option name="start" type="function(event, ui)"><desc>Function that gets called when dragging starts.</desc></option><option name="drag" type="function(event, ui)"><desc>Function that gets called when the mouse is moved during the dragging.</desc></option><option name="stop" type="function(event, ui)"><desc>Function that gets called when dragging stops.</desc></option><example><desc>Makes the div draggable.</desc><code>$(&quot;.block&quot;).draggable();</code><inhead>
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.draggable.js&quot;&gt;&lt;/script&gt;
0
+</inhead><html>&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;</html><css>
0
+  .block { 
0
+    border: 2px solid #0090DF;
0
+    background-color: #68BFEF;
0
+    width: 150px; 
0
+    height: 70px;
0
+    margin: 10px; 
0
+  }
0
+  </css></example><example><desc>Makes the div draggable.</desc><code>$(&quot;.block&quot;).draggable();</code><inhead>
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.draggable.js&quot;&gt;&lt;/script&gt;
0
+</inhead><html>&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;</html><css>
0
+  .block { 
0
+    border: 2px solid #0090DF;
0
+    background-color: #68BFEF;
0
+    width: 150px; 
0
+    height: 70px;
0
+    margin: 10px; 
0
+  }
0
+  </css></example><example><desc>Makes the div move to the top when dragged.</desc><code>$(&quot;.block&quot;).draggable({ stack: { group: '.block', min: 1 } });</code><inhead>
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.draggable.js&quot;&gt;&lt;/script&gt;
0
+</inhead><html>&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;</html><css>
0
+  .block { 
0
+    border: 2px solid #0090DF;
0
+    background-color: #68BFEF;
0
+    width: 50px; 
0
+    height: 20px;
0
+    margin: 10px; 
0
+  }
0
+  </css></example></function><function cat="UI/Draggable" name="draggable" return="jQuery" timestamp="2009-01-05T17:55:30Z"><desc>Temporarily disable the draggable functionality.</desc><longdesc>This method temporarily disables draggable functionality. It can later be reenabled by calling $(..).draggable(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params><example><desc>Makes the div draggable.</desc><code>$(&quot;.block&quot;).draggable();</code><inhead>
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+  &lt;script src=&quot;http://ui.jquery.com/latest/ui/ui.draggable.js&quot;&gt;&lt;/script&gt;
0
+</inhead><html>&lt;div class=&quot;block&quot;&gt;&lt;/div&gt;</html><css>
0
+  .block { 
0
+    border: 2px solid #0090DF;
0
+    background-color: #68BFEF;
0
+    width: 150px; 
0
+    height: 70px;
0
+    margin: 10px; 
0
+  }
0
+  </css></example></function><function cat="UI/Draggable" name="draggable" return="jQuery" timestamp="2009-01-05T17:55:30Z"><desc> Enable the draggable functionality.</desc><longdesc>This method re-enables a previously disabled draggable.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Draggable" name="draggable" return="jQuery" timestamp="2009-01-05T17:55:30Z"><desc> Completely remove the draggable functionality.</desc><longdesc>This method removes the draggable functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Droppable"><subcat value="Plugin methods"><function cat="UI/Droppable" name="droppable" return="Dropset" timestamp="2008-11-24T13:53:10Z"><desc>Creates new droppables on the nodeset supplied by the query.</desc><longdesc>This jQuery plugin makes DOM nodes droppable (meaning they accept being dropped on by draggables). You can specify which (individually) or which kind of draggables each will accept.
0
+
0
+All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):
0
+
0
+* '''ui.options''' - options used to initialize the droppable
0
+* '''ui.position''' - current position of the draggable helper
0
+* '''ui.absolutePosition''' - current absolute position of the draggable helper
0
+* '''ui.draggable''' - current draggable element
0
+* '''ui.helper''' - current draggable helper
0
+</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the droppable. All options are optional.</desc></params><option name="accept" type="Boolean function(draggable)"><desc>This function is called for each draggable on the page, to provide a custom filter. Return true if draggable should be accepted.</desc></option><option name="accept" type="String"><desc>The string should be a jQuery selector. All draggables that match the selector will be accepted.</desc></option><option name="activeClass" type="String"><desc>The class that should be added to the droppable while an acceptable draggable is being dragged.</desc></option><option name="greedy" type="Boolean"><desc>If true, will prevent event propagation on nested droppables. Default value: false.</desc></option><option name="hoverClass" type="String"><desc>The class that should be added to the droppable while being hovered by an acceptable draggable.</desc></option><option name="tolerance" type="String"><desc>Specifies which mode to use for testing whether a draggable is 'over' a droppable. Possible values: 'fit', 'intersect', 'pointer', 'touch'. Default value: 'intersect'.</desc></option><option name="activate" type="function(event, ui)"><desc>This function is called any time an accepted draggable starts dragging.</desc></option><option name="deactivate" type="function(event, ui)"><desc>This function is called any time an accepted draggable stops dragging.</desc></option><option name="over" type="function(event, ui)"><desc>This function is called as an accepted draggable is dragged 'over' (within the tolerance of) this droppable.</desc></option><option name="out" type="function(event, ui)"><desc>This function is called when an accepted draggable is dragged out (within the tolerance of) this droppable.</desc></option><option name="drop" type="function(event, ui)"><desc>This function is called when an accepted draggable is dropped 'over' (within the tolerance of) this droppable.
0
+In the callback, $(this) represents the droppable the draggable is dropped on.
0
+$(ui.draggable) represents the draggable.</desc></option></function><function cat="UI/Droppable" name="droppable" return="jQuery" timestamp="2008-11-24T13:53:10Z"><desc>Temporarily disable the droppable functionality.</desc><longdesc>This method temporarily disables droppable functionality. It can later be reenabled by calling $(..).droppable(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Droppable" name="droppable" return="jQuery" timestamp="2008-11-24T13:53:10Z"><desc> Enable the droppable functionality.</desc><longdesc>This method re-enables a previously disabled droppable.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Droppable" name="droppable" return="jQuery" timestamp="2008-11-24T13:53:10Z"><desc> Completely remove the droppable functionality.</desc><longdesc>This method removes the droppable functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Sortable"><subcat value="Plugin methods"><function cat="UI/Sortable" name="sortable" return="" timestamp="2008-12-23T14:51:18Z"><desc>Creates new sortable on the nodeset supplied by the query.</desc><longdesc>This jQuery plugin makes DOM nodes sortable by mouse. You can additionally supply a great range of options to make them fit your needs.
0
+
0
+All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):
0
+
0
+* '''ui.position''' - current position of the helper
0
+* '''ui.absolutePosition''' - current absolute position of the helper
0
+* '''ui.helper''' - the current helper element (most often a clone of the item)
0
+* '''ui.placeholder''' - the placeholder (if you defined one)
0
+* '''ui.item''' - the current dragged element
0
+* '''ui.sender''' - the sortable where the item comes from (only exists if you move from one connected list to another)
0
+</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the sortable. All options are optional.</desc></params><option name="appendTo" type="String"><desc>Defaults to the parent, defines where the helper that moves with the mouse is being appended to during the drag (for example, to resolve overlap/zIndex issues).</desc></option><option name="axis" type="String"><desc>If defined, the items can be dragged only horizontally or vertically. Possible values:'x', 'y'</desc></option><option default="':input, button'." name="cancel" type="Selector"><desc>Prevents sorting if you start on elements matching the selector.</desc></option><option name="connectWith" type="Array"><desc>Takes an array of jQuery selectors that also have sortables applied. If used, the sortable is now connected to the other one-way, so you can drag from this sortable to the other. </desc></option><option name="containment" type="String"><desc>Constrains dragging to within the bounds of the specified element. Possible values: 'parent', 'document', jQuery String.</desc></option><option name="cursor" type="String"><desc>Defines the cursor that is being shown while sorting.</desc></option><option default="0" name="delay" type="Integer"><desc>Time in milliseconds to define when the sorting should start. It helps preventing unwanted drags when clicking on an element.</desc></option><option default="1" name="distance" type="Integer"><desc>Tolerance, in pixels, for when sorting should start. If specified, sorting will not start until after mouse is dragged beyond distance. Can be used to allow for clicks on elements within a handle.</desc></option><option default="true" name="dropOnEmpty" type="Boolean"><desc> If empty allows for an item to be dropped from a linked selectable.</desc></option><option name="handle" type="Selector, Element"><desc> See draggable options for an explanation. </desc></option><option default="false" name="forcePlaceholderSize" type="Boolean"><desc> It forces the placeholder to have a size. </desc></option><option name="grid" type="[Integer x, Integer y]"><desc>Snaps the dragging element/helper to a grid, every x and y pixels. </desc></option><option name="helper" type="Element function(event, element)"><desc>Allows for a helper element to be used for dragging display. The supplied function receives the event and the element being sorted, and should return a valid DOM node to be used as a custom proxy helper.</desc></option><option default=" '&gt; *' " name="items" type="Selector"><desc>Items to apply sorting to. </desc></option><option name="opacity" type="Float"><desc>Defines the opacity of the helper while 
0
+sorting. From 0.01 to 1</desc></option><option name="placeholder" type="String"><desc>Class that gets applied to the otherwise white space.</desc></option><option default="true " name="revert" type="Boolean"><desc>If set to true, the item will be reverted to its new DOM position with a smooth animation.</desc></option><option default="true " name="scroll" type="Boolean"><desc>If set to true, the page scrolls when coming to an edge. </desc></option><option default="20 " name="scrollSensitivity" type="Integer"><desc> Defines how near the mouse must be to an edge to start scrolling. </desc></option><option default="20 " name="scrollSpeed" type="Integer"><desc> The speed at which the window should scroll once the mouse pointer gets within the scrollSensitivity distance. </desc></option><option default="&quot;guess&quot;" name="tolerance" type="String"><desc>This is the way the reordering behaves during drag. Default is &quot;guess&quot;, which guesses what mode to use (&quot;intersect&quot; or &quot;tolerance&quot;), in some setups, &quot;pointer&quot; is more natural.</desc></option><option name="zIndex" type="Integer"><desc>z-index for element/helper while being sorted.</desc></option><option name="start" type="function(event, ui)"><desc>Function that gets called when sorting starts.</desc></option><option name="sort" type="function(event, ui)"><desc>Function that gets called during sorting.</desc></option><option name="change" type="function(event, ui)"><desc>Function that gets called during sorting, but only when the DOM position has changed.</desc></option><option name="beforeStop" type="function(event, ui)"><desc>Function that gets called when sorting stops, but when the placeholder/helper is still available.</desc></option><option name="stop" type="function(event, ui)"><desc>Function that gets called when sorting has stopped.</desc></option><option name="update" type="function(event, ui)"><desc>Function that gets called when the user stopped sorting and the DOM position has changed.</desc></option><option name="receive" type="function(event, ui)"><desc>Function that gets called when a connected sortable list has received an item from another list.</desc></option><option name="remove" type="function(event, ui)"><desc>Function that gets called when a sortable item has been dragged out from the list and into another.</desc></option><option name="over" type="function(event, ui)"><desc>Function that gets called when a sortable item is moved into a connected list.</desc></option><option name="out" type="function(event, ui)"><desc>Function that gets called when a sortable item is moved away from a connected list.</desc></option><option name="activate" type="function(event, ui)"><desc>Function that gets called when using connected lists, every connected list on drag start receives it.</desc></option><option name="deactivate" type="function(event, ui)"><desc>Function that gets called when sorting was stopped, is propagated to all possible connected lists.</desc></option></function><function cat="UI/Sortable" name="sortable" return="jQuery" timestamp="2008-12-23T14:51:18Z"><desc>Temporarily disable the sortable functionality.</desc><longdesc>This method temporarily disables sortable functionality. It can later be reenabled by calling $(..).sortable(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Sortable" name="sortable" return="jQuery" timestamp="2008-12-23T14:51:18Z"><desc> Enable the sortable functionality.</desc><longdesc>This method re-enables a previously disabled sortable.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Sortables" name="sortable" return="jQuery" timestamp="2008-12-23T14:51:18Z"><desc> Completely remove the sortable functionality.</desc><longdesc>This method removes the sortable functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function><function cat="UI/Sortable" name="sortable" return="String" timestamp="2008-12-23T14:51:18Z"><desc> Serializes the sortable's item id's into a form/ajax submittable string.</desc><longdesc>Calling this method produces a hash that can be appended to any url to easily submit a new item order back to the server.
0
+
0
+It works by default by looking at the id of each item in the format 'setname_number', and it spits out a hash like &quot;setname[]=number&amp;setname[]=number&quot;.
0
+
0
+You can also give in a option hash as second argument to custom define how the function works. The possible options are: 'key' (replaces part1[] with whatever you want), 'attribute' (test another attribute than 'id') and 'expression' (use your own regexp).
0
+
0
+If serialize returns an empty string, make sure the id attributes include an underscore.  They must be in the form: &quot;set_number&quot; For example, a 3 element list with id attributes foo_1, foo_5, foo_2 will serialize to foo[]=1&amp;foo[]=5&amp;foo[]=2. You can use an underscore, equal sign or hyphen to separate the set and number.  For example foo=1 or foo-1 or foo_1 all serialize to foo[]=1.
0
+</longdesc><params name="&quot;serialize&quot;" type="String"><desc></desc></params><params name="options" type="Hash"><desc>a key/value hash defining how serialize works.</desc></params><option name="attribute" type="String"><desc>the attribute that is parsed. Default: 'id'.</desc></option><option name="expression" type="Regexp"><desc>the expression used to parse the attribute. The default expression used is &quot;(.+)[-=_](.+)&quot;.</desc></option><option name="key" type="String"><desc>The key in the url hash. If not specified, it will take the first result of the expression.</desc></option></function><function cat="UI/Sortable" name="sortable" return="String[]" timestamp="2008-12-23T14:51:18Z"><desc> Serializes the sortable's item id's into an array of string.</desc><longdesc>
0
+
0
+If you have
0
+
0
+&amp;lt;ul id=&quot;a_sortable&quot;&amp;gt;&lt;br&gt;
0
+&amp;lt;li id=&quot;hello&quot;&amp;gt;Hello&amp;lt;/li&amp;gt;&lt;br&gt;
0
+&amp;lt;li id=&quot;goodbye&quot;&amp;gt;Good bye&amp;lt;/li&amp;gt;&lt;br&gt;
0
+&amp;lt;/ul&amp;gt;
0
+
0
+and do
0
+
0
+var result = $('#a_sortable').sortable('toArray');
0
+
0
+then
0
+
0
+result[0] will contain &quot;hello&quot; and result[1] will contain &quot;goodbye&quot;.
0
+</longdesc><params name="&quot;toArray&quot;" type="String"><desc></desc></params></function><function cat="UI/Sortable" name="sortable" return="jQuery" timestamp="2008-12-23T14:51:18Z"><desc> Refresh the sortable items.</desc><longdesc>Custom trigger the reloading of all sortable items, causing new items to be recognized.</longdesc><params name="&quot;refresh&quot;" type="String"><desc></desc></params></function><function cat="UI/Sortable" name="sortable" return="jQuery" timestamp="2008-12-23T14:51:18Z"><desc> Refresh the cached positions of the sortables' items.</desc><longdesc>Calling this method refreshes the cached item positions of all sortables. This is usually done automatically by the script and slows down performance. Use wisely.</longdesc><params name="&quot;refreshPositions&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Selectable"><subcat value="Plugin methods"><function cat="UI/Selectable" name="selectable" return="" timestamp="2008-11-24T13:56:03Z"><desc>Creates new selectable on the nodeset supplied by the query.</desc><longdesc></longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the selectable. All options are optional.</desc></params><option name="autoRefresh" type="Boolean"><desc>This determines whether to refresh (recalculate) the position and size of each selectee at the beginning of each select operation. If you have many many items, you may want to set this to false and call the refresh method manually. Default value: true</desc></option><option name="filter" type="Selector"><desc>The matching child elements will be made selectees (able to be selected). Default value: '*'</desc></option><option name="selected" type="function(event, ui)"><desc>This callback is fired at the end of the select operation, on each element added to the selection.</desc></option><option name="selecting" type="function(event, ui)"><desc>This callback is fired during the select operation, on each element added to the selection.</desc></option><option name="start" type="function(event, ui)"><desc>This callback is fired at the beginning of the select operation.</desc></option><option name="stop" type="function(event, ui)"><desc>This callback is fired at the end of the select operation.</desc></option><option name="unselected" type="function(event, ui)"><desc>This callback is fired at the end of the select operation, on each element removed from the selection.</desc></option><option name="unselecting" type="function(event, ui)"><desc>This callback is fired during the select operation, on each element removed from the selection.</desc></option></function><function cat="UI/Selectable" name="selectable" return="jQuery" timestamp="2008-11-24T13:56:03Z"><desc>Temporarily disable the selectable functionality.</desc><longdesc>This method temporarily disables selectable functionality. It can later be reenabled by calling $(..).selectable(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Selectable" name="selectable" return="jQuery" timestamp="2008-11-24T13:56:03Z"><desc> Enable the selectable functionality.</desc><longdesc>This method re-enables a previously disabled selectable.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Selectable" name="selectable" return="jQuery" timestamp="2008-11-24T13:56:03Z"><desc> Refresh the position and size of each selectee element</desc><longdesc>This method can be used to manually recalculate the position and size of each selectee element. Very useful if autoRefresh is set to false.</longdesc><params name="&quot;refresh&quot;" type="String"><desc></desc></params></function><function cat="UI/Selectable" name="selectable" return="jQuery" timestamp="2008-11-24T13:56:03Z"><desc> Toggles the state of selectable functionality.</desc><longdesc>This method either enables or disables selecting based on the current state.</longdesc><params name="&quot;toggle&quot;" type="String"><desc></desc></params></function><function cat="UI/Selectable" name="selectable" return="jQuery" timestamp="2008-11-24T13:56:03Z"><desc> Completely remove the selectable functionality.</desc><longdesc>This method removes the selectable functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Resizable"><subcat value="Plugin methods"><function cat="UI/Resizable" name="resizable" timestamp="2008-11-24T13:57:18Z"><desc>Creates new resizables on the nodeset supplied by the query.</desc><longdesc>This jQuery plugin makes DOM nodes resizable (meaning they have draggable resize handles). You can specify one or more handles as well as min and max width and height.
0
+
0
+All callbacks (start,stop,resize) receive two arguments: The original browser event and a prepared ui object.  The ui object has the following fields:
0
+
0
+* '''ui.helper''' - a jQuery object containing the helper element
0
+* '''ui.originalPosition''' - {top, left} before resizing started
0
+* '''ui.originalSize''' - {width, height} before resizing started
0
+* '''ui.position''' - {top, left} current position
0
+* '''ui.size''' - {width, height} current size
0
+</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the resizable. All options are optional, but a resizable will not be useful without at least one handle.</desc></params><option default="false" name="animate" type="Boolean"><desc>Animates to the final size after resizing.</desc></option><option default="&quot;slow&quot;" name="animateDuration" type="Integer"><desc>Duration time for animating. Time in milliseconds or &quot;slow&quot;/&quot;normal&quot;/&quot;fast&quot;.</desc></option><option default="&quot;swing&quot;" name="animateEasing" type="String"><desc>Easing effect for animating.</desc></option><option default="false" name="alsoResize" type="Selector"><desc>Resize these elements synchronous when resizing.</desc></option><option default="false" name="aspectRatio" type="Boolean, Number"><desc>When set to true, resizing is constrained by the original aspect ratio. If an alternate ratio is desired, you can submit a number and then the aspect ratio will be constrained by height \ width. </desc></option><option default="false" name="autoHide" type="Boolean"><desc>When set to true, automatically hides the handles except when the mouse hovers over the element.</desc></option><option default="':input'" name="cancel" type="Selector"><desc>Prevents resizing if you start on elements matching the selector. </desc></option><option default="false" name="containment" type="Element, Selector"><desc>Constrains resizing to within the bounds of the specified element - can be a DOM element, 'parent', 'document' or a jQuery selector.</desc></option><option default="0" name="delay" type="Integer"><desc>Time in milliseconds to define when the dragging should start. It helps preventing unwanted drags when clicking on an element. </desc></option><option default="true" name="disableSelection" type="Boolean"><desc>When set to true, stops users from selecting handles and helpers.</desc></option><option default="1" name="distance" type="Integer"><desc>Tolerance, in pixels, for when resizing should start. If specified, resizing will not start until after mouse is moved beyond distance.</desc></option><option default="false" name="ghost" type="Boolean"><desc>When set to true, shows a substitute element when resizing.</desc></option><option default="false" name="grid" type="[Integer x, Integer y]"><desc>Snaps the resizing element to a grid size, every x and y pixels. </desc></option><option name="handles" type="{n, e, s, w, ne, se, sw, nw, all}"><desc>Each handle string (if specified) should be a jquery selector matching the child element of the resizable to use as the handle. If the handle is not a child of the resizable, you can pass in the DOM node or a valid jQuery object directly. </desc></option><option default="null" name="helper" type="String"><desc>This is the css class that will be added to a proxy element to outline the resize during the drag of the resize handle. Once the resize is complete, the original element is sized.</desc></option><option default="false" name="knobHandles" type="Boolean"><desc> Use square handlebars as resize handles, rather than the default border.</desc></option><option default="null" name="maxHeight" type="Int"><desc>This is the maximum height the resizable should be allowed to resize to.</desc></option><option default="null" name="maxWidth" type="Int"><desc>This is the maximum width the resizable should be allowed to resize to.</desc></option><option default="10" name="minHeight" type="Int"><desc>This is the minimum height the resizable should be allowed to resize to.</desc></option><option default="10" name="minWidth" type="Int"><desc>This is the minimum width the resizable should be allowed to resize to.</desc></option><option default="true" name="preserveCursor" type="Boolean"><desc> Whether shows direction cursors when resizing.</desc></option><option default="true" name="preventDefault" type="Boolean"><desc> Whether prevent Safari's default resizing function on textareas.</desc></option><option default="false" name="proportionallyResize" type="Array"><desc>Advanced option that allows other elements to get proportionally resized together with the original one. Just specify jquery string in this array or directly insert DOM nodes.</desc></option><option default="false" name="transparent" type="Boolean"><desc> Whether the element is transparent when resizing.</desc></option><option name="start" type="function(event, ui)"><desc>This function is called at the start of a resize operation.</desc></option><option name="resize" type="function(event, ui)"><desc>This function is called during the resize, on the drag of the resize handler.</desc></option><option name="stop" type="function(event, ui)"><desc>This function is called at the end of a resize operation.</desc></option></function><function cat="UI/Resizable" name="resizable" return="jQuery" timestamp="2008-11-24T13:57:18Z"><desc>Temporarily disable the resizable functionality.</desc><longdesc>This method temporarily disables resizable functionality. It can later be reenabled by calling $(..).resizable(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Resizable" name="resizable" return="jQuery" timestamp="2008-11-24T13:57:18Z"><desc> Enable the resizable functionality.</desc><longdesc>This method re-enables a previously disabled resizable.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Resizable" name="resizable" return="jQuery" timestamp="2008-11-24T13:57:18Z"><desc> Completely remove the resizable functionality.</desc><longdesc>This method removes the resizable functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Accordion"><subcat value="Plugin methods"><function cat="UI/Accordion" name="accordion" return="jQuery" timestamp="2009-01-10T19:48:08Z"><desc>Make the selected elements Accordion widgets.</desc><longdesc> Semantic requirements:
0
+
0
+The markup of your accordion container needs pairs of headers and content panels, grouped by another element. By default, the header elements are anchors, assuming the following structure:
0
+
0
+&lt;pre&gt;&amp;lt;div id=&quot;accordion&quot;&amp;gt;
0
+  &amp;lt;div&amp;gt;
0
+    &amp;lt;a href=&quot;#&quot;&amp;gt;First header&amp;lt;/a&amp;gt;
0
+    &amp;lt;div&amp;gt;First content&amp;lt;/div&amp;gt;
0
+  &amp;lt;/div&amp;gt;
0
+  &amp;lt;div&amp;gt;
0
+    &amp;lt;a href=&quot;#&quot;&amp;gt;Second header&amp;lt;/a&amp;gt;
0
+    &amp;lt;div&amp;gt;Second content&amp;lt;/div&amp;gt;
0
+  &amp;lt;/div&amp;gt;
0
+&amp;lt;/div&amp;gt;&lt;/pre&gt;
0
+
0
+If you use a different element for the header, specify the header-option with an appropiate selector, eg. header: &quot;h3&quot;. The content element must be always next to it's header.
0
+
0
+If you have links inside the accordion content and use a-elements as headers, add a class to them and use that as the header, eg. header: &quot;a.header&quot;.
0
+
0
+Use activate(Number) to change the active content programmatically.
0
+
0
+A &quot;accordionchange&quot; event is triggered every time the accordion changes.
0
+If the accordion is animated, the event will be triggered upon completion
0
+of the animation; otherwise, it is triggered immediately.
0
+&lt;pre&gt;$(&quot;.ui-accordion&quot;).bind(&quot;accordionchange&quot;, function(event, ui) {
0
+  ui.options // options used to intialize this widget
0
+  ui.newHeader // jQuery, activated header
0
+  ui.oldHeader // jQuery, previous header
0
+  ui.newContent // jQuery, activated content
0
+  ui.oldContent // jQuery, previous content
0
+});&lt;/pre&gt;
0
+</longdesc><params name="options" optional="true" type="Options"><desc>A set of key/value pairs that configure the accordion. All options are optional.</desc></params><option default="first child" name="active" type="String, Element, jQuery, Boolean, Number"><desc>Selector for the active element. Set to false to display none at start. Needs &amp;laquo;alwaysOpen: false&amp;raquo;.</desc></option><option default="true" name="alwaysOpen" type="Boolean"><desc>Whether there must be one content element open. Allows collapsing the active section by the triggering event (click is the default).</desc></option><option default="'slide'" name="animated" type="Boolean, String"><desc>Choose your favorite animation, or disable them (set to false). In addition to the default, &quot;bounceslide&quot; and &quot;easeslide&quot; are supported (both require the easing plugin).</desc></option><option default="true" name="autoHeight" type="Boolean"><desc>If set, the highest content part is used as height reference for all other parts. Provides more consistent animations.</desc></option><option default="false" name="clearStyle" type="Boolean"><desc>If set, clears height and overflow styles after finishing animations. This enables accordions to work with dynamic content. Won't work together with autoheight.</desc></option><option default="&quot;click&quot;" name="event" type="String"><desc>The event on which to trigger the accordion.</desc></option><option default="false" name="fillSpace" type="Boolean"><desc>If set, the accordion completely fills the height of the parent element. Overrides autoheight.</desc></option><option default="a" name="header" type="String, Element, jQuery"><desc>Selector for the header element. </desc></option><option name="icons" type="Object"><desc>Icons to use for headers. Available icons are &quot;header&quot; and &quot;headerSelected&quot;</desc></option><option default="false" name="navigation" type="Boolean"><desc>If set, looks for the anchor that matches location.href and activates it. Great for href-based state-saving. Use navigationFilter to implement your own matcher.</desc></option><option name="navigationFilter" type="Function"><desc>Overwrite the default location.href-matching with your own matcher.</desc></option><option default="'selected'" name="selectedClass" type="String"><desc>Class for active header elements.</desc></option><example><height>380</height><desc>A simple jQuery UI Accordion.</desc><code>$(&quot;#example&quot;).accordion();</code><html>&lt;link rel=&quot;stylesheet&quot; href=&quot;http://ui.jquery.com/latest/themes/flora/flora.all.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; title=&quot;Flora (Default)&quot;&gt;
0
+&lt;script type=&quot;text/javascript&quot; src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+&lt;script type=&quot;text/javascript&quot; src=&quot;http://ui.jquery.com/latest/ui/ui.accordion.js&quot;&gt;&lt;/script&gt;
0
+
0
+  &lt;ul id=&quot;example&quot; class=&quot;ui-accordion-container&quot; style=&quot;width: 250px;&quot;&gt;
0
+    &lt;li&gt;
0
+      &lt;a href='#' class=&quot;ui-accordion-link&quot;&gt;
0
+        Test 1
0
+      &lt;/a&gt;
0
+      &lt;div&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
0
+      &lt;/div&gt;
0
+
0
+    &lt;/li&gt;
0
+    &lt;li&gt;
0
+      &lt;div class=&quot;ui-accordion-left&quot;&gt;&lt;/div&gt;
0
+      &lt;a href='#' class=&quot;ui-accordion-link&quot;&gt;Test 2&lt;div class=&quot;ui-accordion-right&quot;&gt;&lt;/div&gt;&lt;/a&gt;
0
+      &lt;div&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
0
+      &lt;/div&gt;
0
+    &lt;/li&gt;
0
+    &lt;li&gt;
0
+      &lt;div class=&quot;ui-accordion-left&quot;&gt;&lt;/div&gt;
0
+
0
+      &lt;a href='#' class=&quot;ui-accordion-link&quot;&gt;Test 3&lt;div class=&quot;ui-accordion-right&quot;&gt;&lt;/div&gt;&lt;/a&gt;
0
+      &lt;div&gt;Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
0
+      &lt;/div&gt;
0
+    &lt;/li&gt;
0
+  &lt;/ul&gt;</html></example></function><function cat="UI/Accordion" name="accordion" return="jQuery" timestamp="2009-01-10T19:48:08Z"><desc>Activate a content part of the Accordion programmatically.</desc><longdesc>The index can be a zero-indexed number to match the position of the header to close or a string expression matching an element. Pass -1 to close all (only possible with alwaysOpen:false).</longdesc><params name="&quot;activate&quot;" type="String"><desc></desc></params><params name="index" type="String, Element, jQuery, Boolean, Number"><desc>An Integer specifying the zero-based index of the content to be activated or an expression specifying the element, or an element/jQuery object, or a boolean false to close all.</desc></params><example><desc>Activate the second content panel.</desc><code>$(&quot;.selector&quot;).accordion(&quot;activate&quot;, 1);</code></example><example><desc>Close all content parts of the accordion.</desc><code>$(&quot;.selector&quot;).accordion(&quot;activate&quot;, false);</code></example><example><desc>Activate the first element matching the given expression.</desc><code>$(&quot;.selector&quot;).accordion(&quot;activate&quot;, &quot;a:first&quot;);</code></example></function><function cat="UI/Accordion" name="accordion" return="jQuery" timestamp="2009-01-10T19:48:08Z"><desc>Enable the selected accordion.</desc><longdesc>Enabling an accordion reverts the change made by accordion(&quot;disable&quot;), turning the behaviour back to the usual state.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params><example><desc>Activate the second content of the Accordion contained in &lt;div id=&quot;accordion&quot;&gt;.</desc><code>$(&quot;.selector&quot;).accordion(&quot;enable&quot;)</code></example></function><function cat="UI/Accordion" name="accordion" return="jQuery" timestamp="2009-01-10T19:48:08Z"><desc>Disables the selected accordion.</desc><longdesc>Disabling an accordion turns off the ability to close or open anything in the accordion, it disables all interactions.
0
+
0
+To completely remove the accordion behaviour, including visual changes, use <![CDATA[<a href='UI/Accordion/accordion#.22destroy.22'>accordion("destroy")</a>]]>.</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params><example><desc>Activate the second content of the Accordion contained in &lt;div id=&quot;accordion&quot;&gt;.</desc><code>$(&quot;.selector&quot;).accordion(&quot;disable&quot;)</code></example></function><function cat="UI/Accordion" name="accordion" return="jQuery" timestamp="2009-01-10T19:48:08Z"><desc>Destroy the selected accordion.</desc><longdesc>Destroying the accordion completely reverts changes made by accordion), including events and styles.
0
+
0
+To just temporily disable the behaviour of an accordion, use <![CDATA[<a href='UI/Accordion/accordion#.22disable.22'>accordion("disable")</a>]]>.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params><example><desc>Activate the second content of the Accordion contained in &lt;div id=&quot;accordion&quot;&gt;.</desc><code>$(&quot;.selector&quot;).accordion(&quot;disable&quot;)</code></example></function></subcat></cat><cat value="UI/Datepicker"><subcat value="Plugin methods"><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>The method that you use to create a new date picker. Customize with plenty of options.</desc><longdesc>Attach the date picker to an input or for an inline view attach the date picker to a div or span.</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the date picker. All options are optional.</desc></params><option default="'Clear'" name="clearText" type="String"><desc>The text to display for the clear link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Erase the current date'" name="clearStatus" type="String"><desc>The text to display in the status bar for the clear link. This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="mandatory" type="Boolean"><desc>True if a date must be selected, causing the Clear link to be removed. False if the date is not required.</desc></option><option default="'Close'" name="closeText" type="String"><desc>The text to display for the close link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Close without change'" name="closeStatus" type="String"><desc>The text to display in the status bar for the close link. This attribute is one of the regionalisation attributes.</desc></option><option default="true" name="closeAtTop" type="Boolean"><desc>Position the Clear/Close links at the top (true) or bottom (false).</desc></option><option default="'&lt;Prev'" name="prevText" type="String"><desc>The text to display for the previous month link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Show the previous month'" name="prevStatus" type="String"><desc>The text to display in the status bar for the previous month link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Next&gt;'" name="nextText" type="String"><desc>The text to display for the next month link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Show the next month'" name="nextStatus" type="String"><desc>The text to display in the status bar for the next month link. This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="hideIfNoPrevNext" type="Boolean"><desc>Normally the previous and next links are disabled when not applicable (see ''minDate''/''maxDate''). You can hide them altogether by setting this attribute to true.</desc></option><option default="'Today'" name="currentText" type="String"><desc>The text to display for the current day link. This attribute is one of the regionalisation attributes.</desc></option><option default="'Show the current month'" name="currentStatus" type="String"><desc>The text to display in the status bar for the current day link. This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="gotoCurrent" type="Boolean"><desc>If true, the current day link moves to the currently selected date instead of today.</desc></option><option default="false" name="navigationAsDateFormat" type="Boolean"><desc>When true the ''formatDate'' function is applied to the ''prevText'', ''nextText'', and ''currentText'' values before display, allowing them to display the target month names for example.</desc></option><option default="['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']" name="monthNames" type="String[]"><desc>The list of full month names, as used in the month header on each datepicker and as requested via the ''dateFormat'' setting. This attribute is one of the regionalisation attributes.</desc></option><option default="['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']" name="monthNamesShort" type="String[]"><desc>The list of abbreviated month names, for use as requested via the ''dateFormat'' setting. This attribute is one of the regionalisation attributes.</desc></option><option default="true" name="changeMonth" type="Boolean"><desc>Allows you to change the month by selecting from a drop-down list. You can disable this feature by setting the attribute to false.</desc></option><option default="'Show a different month'" name="monthStatus" type="String"><desc>The text to display in the status bar for the month drop-down list. This attribute is one of the regionalisation attributes.</desc></option><option default="'-10:+10'" name="yearRange" type="String"><desc>Control the range of years displayed in the year drop-down: either relative to current year (-nn:+nn) or absolute (nnnn:nnnn).</desc></option><option default="true" name="changeYear" type="Boolean"><desc>Allows you to change the year by selecting from a drop-down list. You can disable this feature by setting the attribute to false.</desc></option><option default="'Show a different year'" name="yearStatus" type="String"><desc>The text to display in the status bar for the year drop-down list. This attribute is one of the regionalisation attributes.</desc></option><option default="'Wk'" name="weekHeader" type="String"><desc>The column header for the week of the year (see ''showWeeks''). This attribute is one of the regionalisation attributes.</desc></option><option default="'Week of the year'" name="weekStatus" type="String"><desc>The text to display in the status bar for the week of the year. This attribute is one of the regionalisation attributes.</desc></option><option default="['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']" name="dayNames" type="String[]"><desc>The list of long day names, starting from Sunday, for use as requested via the ''dateFormat'' setting. They also appear as popup hints when hovering over the corresponding column headings. This attribute is one of the regionalisation attributes.</desc></option><option default="['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']" name="dayNamesShort" type="String[]"><desc>The list of abbreviated day names, starting from Sunday, for use as requested via the ''dateFormat'' setting. This attribute is one of the regionalisation attributes.</desc></option><option default="['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa']" name="dayNamesMin" type="String[]"><desc>The list of minimised day names, starting from Sunday, for use as column headers within the datepicker. This attribute is one of the regionalisation attributes.</desc></option><option default="0" name="firstDay" type="Number"><desc>Set the first day of the week: Sunday is 0, Monday is 1, ... This attribute is one of the regionalisation attributes.</desc></option><option default="true" name="changeFirstDay" type="Boolean"><desc>Allows you to click on the day names to have the week start on that day. You can disable this feature by setting the attribute to false.</desc></option><option default="'Set DD as first week day'" name="dayStatus" type="String"><desc>The text to display in the status bar for the day of the week links. Use 'DD' for the full name of the day, or 'D' for its short name. This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="highlightWeek" type="Boolean"><desc>If true, the entire week row is highlighted when the mouse hovers over a day.</desc></option><option default="false" name="showOtherMonths" type="Boolean"><desc>Display dates in other months (non-selectable) at the start or end of the current month.</desc></option><option default="'Select DD, M d'" name="dateStatus" type="String"><desc>The text to display in the status bar for the date links. Use any of the date formatting characters (see ''dateFormat''). This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="showWeeks" type="Boolean"><desc>Display the week of the year alongside each month. The column header is specified by the ''weekHeader'' setting. The week number is calculated based on the first date shown in each row in the datepicker, and so may not apply to all days in that row. The ''calculateWeek'' setting allows you to change the week of the year calculation from the default ISO 8601 implementation.</desc></option><option default="$.datepicker.iso8601Week" name="calculateWeek" type="Function"><desc>Perform the week of the year calculation. This function accepts a Date as a parameter and returns the number of the corresponding week of the year. The default implementation uses the ISO 8601 definition of a week: weeks start on a Monday and the first week of the year contains January 4. This means that up to three days from the previous year may be included in the first week of the  current year, and that up to three days from the current year may be included in the last week of the previous year.</desc></option><option default="1" name="numberOfMonths" type="Number, Number[2]"><desc>Set how many months to show at once. The value can be a straight integer, or can be a two-element array to define the number of rows and columns to display.</desc></option><option default="1" name="stepMonths" type="Number"><desc>Set how many months to move when clicking the Previous/Next links.</desc></option><option default="false" name="rangeSelect" type="Boolean"><desc>Set to true to allow the selection of a date range on the one date picker, or false to just select a single date. For a date range, the first click sets the start date and a second click sets the end date.</desc></option><option default="' - '" name="rangeSeparator" type="String"><desc>Set the text to use to separate the two dates in a date range via the ''onSelect'' function.</desc></option><option default="null" name="defaultDate" type="Date(yyyy, mm - 1, dd), Number, String"><desc>Set the date to display on first opening if the field is blank. Specify either an actual date via a Date object, or relative to today with a number (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +7d'), or null for today.</desc></option><option default="null" name="minDate" type="Date(yyyy, mm - 1, dd), Number, String"><desc>Set a minimum selectable date via a Date object, or relative to today with a number (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '-1y -1m'), or null for no limit.</desc></option><option default="null" name="maxDate" type="Date(yyyy, mm - 1, dd), Number, String"><desc>Set a maximum selectable date via a Date object, or relative to today with a number (e.g. +7) or a string of values and periods ('y' for years, 'm' for months, 'w' for weeks, 'd' for days, e.g. '+1m +1w'), or null for no limit.</desc></option><option name="dateFormat" type="String"><desc>The format for parsed and displayed dates. This attribute is one of the regionalisation attributes. For a full list of the possible formats see the <![CDATA[<a href='UI/Datepicker/%24.datepicker.formatDate'>formatDate</a>]]> function.</desc></option><option default="'+10'" name="shortYearCutoff" type="String, Number"><desc>Set the cutoff year for determining the century for a date (used in conjunction with ''dateFormat'' 'y'). If a numeric value (0-99) is provided then this value is used directly. If a string value is provided then it is converted to a number and added to the current year. Once the cutoff year is calculated, any dates entered with a year value less than or equal to it are considered to be in the current century, while those greater than it are deemed to be in the previous century.</desc></option><option default="'Select a date'" name="initStatus" type="String"><desc>The text to display in the status bar when the datepicker is first opened. This attribute is one of the regionalisation attributes.</desc></option><option default="false" name="showStatus" type="Boolean"><desc>True if a status bar should be shown within the datepicker indicating what each control does. False if no status bar is required.</desc></option><option default="this.dateStatus" name="statusForDate" type="Function"><desc>The function to call to determine the status text for a date within the datepicker. The default function uses the ''dateStatus'' value and substitutes in information from the current date.</desc></option><option default="''" name="appendText" type="String"><desc>The text to display after each date field, e.g. to show the required format.</desc></option><option default="'normal'" name="duration" type="String, Number"><desc>Control the speed at which the datepicker appears, it may be a time in milliseconds, a string representing one of the three predefined speeds (&quot;slow&quot;, &quot;normal&quot;, &quot;fast&quot;), or '' for immediately.</desc></option><option default="'focus'" name="showOn" type="String"><desc>Have the datepicker appear automatically when the field receives focus ('focus'), appear only when a button is clicked ('button'), or appear when either event takes place ('both').</desc></option><option default="'show'" name="showAnim" type="String"><desc>Set the name of the animation used to show/hide the datepicker. Use 'show' (the default), 'slideDown', 'fadeIn', or any of the show/hide [http://docs.jquery.com/UI/Effects jQuery UI effects].</desc></option><option default="{}" name="showOptions" type="Options"><desc>If using one of the jQuery UI effects for ''showAnim'', you can provide additional settings for that animation via this option.</desc></option><option default="'...'" name="buttonText" type="String"><desc>The text to display on the trigger button. Use in conjunction with ''showOn'' equal to 'button' or 'both'.</desc></option><option default="''" name="buttonImage" type="String"><desc>The URL for the popup button image. If set, button text becomes the ''alt'' value and is not directly displayed.</desc></option><option default="false" name="buttonImageOnly" type="Boolean"><desc>Set to true to place an image after the field to use as the trigger without it appearing on a button.</desc></option><option default="null" name="beforeShow" type="Function"><desc>Can be a function that takes an input field and current datepicker instance and returns a settings (anonymous) object to update the date picker with. It is called just before the datepicker is displayed.</desc></option><option default="null" name="beforeShowDay" type="Function"><desc>The function takes a date as a parameter and must return an array with [0] equal to true/false indicating whether or not this date is selectable and [1] equal to a CSS class name(s) or '' for the default presentation. It is called for each day in the datepicker before is it displayed.</desc></option><option default="''" name="altField" type="String"><desc>The jQuery selector for another field that is to be updated with the selected date from the datepicker. Use the ''altFormat'' setting below to change the format of the date within this field. Leave as blank for no alternate field.</desc></option><option default="''" name="altFormat" type="String"><desc>The ''dateFormat'' to be used for the ''altField'' above. This allows one date format to be shown to the user for selection purposes, while a different format is actually sent behind the scenes.</desc></option><option default="null" name="onSelect" type="Function"><desc>Allows you to define your own event when the datepicker is selected. The function receives the selected date(s) as text and the datepicker instance as parameters. ''this'' refers to the associated input field.</desc></option><option default="null" name="onChangeMonthYear" type="Function"><desc>Allows you to define your own event when the datepicker moves to a new month and/or year. The function receives the date of the first day of the first displayed month and the datepicker instance as parameters. ''this'' refers to the associated input field.</desc></option><option default="null" name="onClose" type="Function"><desc>Allows you to define your own event when the datepicker is closed, whether or not a date is selected. The function receives the selected date(s) as a date or array of dates and the datepicker instance as parameters. ''this'' refers to the associated input field.</desc></option><option default="false" name="isRTL" type="Boolean"><desc>True if the current language is drawn from right to left. This attribute is one of the regionalisation attributes.</desc></option><option default="true" name="constrainInput" type="Boolean"><desc>True if the input field is constrained to the current date format.</desc></option></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Change the settings for a previously attached datepicker.&lt;br&gt;Since 1.6, &quot;change&quot; has been deprecated and in its place is this method.</desc><longdesc></longdesc><params name="&quot;option&quot;" type="String"><desc></desc></params><params name="settings" type="Options"><desc>The new settings for these date pickers. These are the same as when <![CDATA[<a href='UI/Datepicker/datepicker'>attaching a datepicker</a>]]>.</desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Open a datepicker in a &quot;dialog&quot; box.</desc><longdesc></longdesc><params name="&quot;dialog&quot;" type="String"><desc></desc></params><params name="dateText" type="String"><desc>The initial date for the date picker.</desc></params><params name="onSelect" optional="true" type="Function"><desc>A callback function when a date is selected. The function receives the date text and date picker instance as parameters.</desc></params><params name="settings" optional="true" type="Options"><desc>The new settings for the date picker.</desc></params><params name="pos" optional="true" type="Number[2] or MouseEvent"><desc>The position of the top/left of the dialog as [x, y] or a MouseEvent that contains the coordinates. If not specified the dialog is centered on the screen.</desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Disable an input field and its attached date picker.</desc><longdesc></longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Enable an input field and its attached date picker.</desc><longdesc></longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="boolean" timestamp="2008-11-12T23:00:14Z"><desc>Determine whether a date picker has been disabled.</desc><longdesc>Only the first control is processed.</longdesc><params name="&quot;isDisabled&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Close a previously opened date picker.</desc><longdesc></longdesc><params name="&quot;hide&quot;" type="String"><desc></desc></params><params name="speed" optional="true" type="String"><desc>The speed at which to close the date picker (optional).</desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Call up a previously attached date picker.</desc><longdesc>Only the first entry in the jQuery collection is processed.</longdesc><params name="&quot;show&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Disconnect the datepicker functionality from its associated control.</desc><longdesc></longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="Date or Date[2]" timestamp="2008-11-12T23:00:14Z"><desc>Retrieve the current date(s) for a datepicker.</desc><longdesc>Returns the current date for the datepicker attached to the first control, or an array of two dates for a range.</longdesc><params name="&quot;getDate&quot;" type="String"><desc></desc></params></function><function cat="UI/Datepicker" name="datepicker" return="jQuery" timestamp="2008-11-12T23:00:14Z"><desc>Set the current date(s) for a datepicker.</desc><longdesc>Returns the current date for the datepicker attached to the first control, or an array of two dates for a range.</longdesc><params name="&quot;setDate&quot;" type="String"><desc></desc></params><params name="date" type="Date"><desc>The new current date.</desc></params><params name="endDate" optional="true" type="Date"><desc>The new end date for a date range (optional).</desc></params></function></subcat><subcat value="Utilities"><function cat="UI/Datepicker" name="$.datepicker.setDefaults" return="Datepicker" timestamp="2008-01-24T05:52:40Z"><desc>Change the default settings for all date pickers</desc><longdesc></longdesc><params name="settings" type="Options"><desc>The new settings for all date pickers. See the <![CDATA[<a href='UI/Datepicker/datepicker'>datepicker options</a>]]>.</desc></params><example><desc>Set all date pickers to open on focus or a click on an icon.</desc><code>$.datepicker.setDefaults({
0
+    showOn: 'both',
0
+    buttonImageOnly: true,
0
+    buttonImage: 'calendar.gif',
0
+    buttonText: 'Calendar' });</code></example><example><desc>Set all date pickers to have French text.</desc><code>$.datepicker.setDefaults($.datepicker.regional['fr']);</code></example></function><function cat="UI/Datepicker" name="$.datepicker.formatDate" return="String" timestamp="2008-11-28T21:02:51Z"><desc>Format a date into a string value with a specified format.</desc><longdesc>The format can be combinations of the following:
0
+* d  - day of month (no leading zero)
0
+* dd - day of month (two digit)
0
+* D  - day name short
0
+* DD - day name long
0
+* m  - month of year (no leading zero)
0
+* mm - month of year (two digit)
0
+* M  - month name short
0
+* MM - month name long
0
+* y  - year (two digit)
0
+* yy - year (four digit)
0
+* @  - Unix timestamp (also known as epoch seconds or POSIX time) in milliseconds since 01/01/1970
0
+* '...' - literal text
0
+* '' - single quote
0
+* anything else - literal text
0
+There are also a number of predefined standard date formats available from $.datepicker:
0
+* ATOM - 'yy-mm-dd' (Same as RFC 3339/ISO 8601)
0
+* COOKIE - 'D, dd M yy'
0
+* ISO_8601 - 'yy-mm-dd'
0
+* RFC_822 - 'D, d M y' (See RFC 822)
0
+* RFC_850 - 'DD, dd-M-y' (See RFC 850)
0
+* RFC_1036 - 'D, d M y' (See RFC 1036)
0
+* RFC_1123 - 'D, d M yy' (See RFC 1123)
0
+* RFC_2822 - 'D, d M yy' (See RFC 2822)
0
+* RSS - 'D, d M y' (Same as RFC 822)
0
+* TIMESTAMP - '@'
0
+* W3C - 'yy-mm-dd' (Same as ISO 8601)</longdesc><params name="format" type="String"><desc>The format to use in presenting the date.</desc></params><params name="date" type="Date"><desc>The date value to be displayed.</desc></params><params name="settings" optional="true" type="Object"><desc>Additional parameters for formatting the date. All are optional and default to the datapicker defaults, which are usually standard English.&lt;br/&gt;
0
+Attributes include:&lt;br/&gt;
0
+&lt;i&gt;dayNamesShort&lt;/i&gt; (String[7]) - the short names for the days of the week, starting at Sunday.&lt;br/&gt;
0
+&lt;i&gt;dayNames&lt;/i&gt; (String[7]) - the long names for the days of the week, starting at Sunday.&lt;br/&gt;
0
+&lt;i&gt;monthNamesShort&lt;/i&gt; (String[12]) - the short names for the months of the year.&lt;br/&gt;
0
+&lt;i&gt;monthNames&lt;/i&gt; (String[12]) - the long names for the months of the year.&lt;br/&gt;&lt;br/&gt;</desc></params><example><desc>Display the date in ISO format. Produces '2007-01-26'.</desc><code>$.datepicker.formatDate('yy-mm-dd', new Date(2007, 1 - 1, 26));</code></example><example><desc>Display the date in RSS format.</desc><code>$.datepicker.formatDate($.datepicker.RSS, new Date(2007, 1 - 1, 26));</code></example><example><desc>Display the date in expanded French format. Produces 'Samedi, Juillet 14, 2007'.</desc><code>$.datepicker.formatDate('DD, MM d, yy', new Date(2007, 7 - 1, 14), {dayNamesShort: $.datepicker.regional['fr'].dayNamesShort, dayNames: $.datepicker.regional['fr'].dayNames, monthNamesShort: $.datepicker.regional['fr'].monthNamesShort, monthNames: $.datepicker.regional['fr'].monthNames});</code></example></function><function cat="UI/Datepicker" name="$.datepicker.iso8601Week" return="Number" timestamp="2008-01-24T05:56:44Z"><desc>Determine the week of the year for a given date: 1 to 53.</desc><longdesc>This function uses the ISO 8601 definition of a week: weeks start on a Monday and the first week of the year contains January 4. This means that up to three days from the previous year may be included in the first week of the current year, and that up to three days from the current year may be included in the last week of the previous year.&lt;br/&gt;'''Since v3.1.'''</longdesc><params name="date" type="Date"><desc>The date to find the week for.</desc></params><example><desc>Find the week of the year for a date.</desc><code>$.datepicker.iso8601Week(new Date(2007, 1 - 1, 26));</code></example></function><function cat="UI/Datepicker" name="$.datepicker.parseDate" return="Date" timestamp="2008-07-27T15:02:26Z"><desc>Extract a date from a string value with a specified format.</desc><longdesc>For a full list of the possible formats see the <![CDATA[<a href='UI/Datepicker/%24.datepicker.formatDate'>formatDate</a>]]> function.
0
+A number of exceptions may be thrown:
0
+* 'Invalid arguments' if either ''format'' or ''value'' is null
0
+* 'Missing number at position nn' if ''format'' indicated a numeric value that is not then found
0
+* 'Unknown name at position nn' if ''format'' indicated day or month name that is not then found
0
+* 'Unexpected literal at position nn' if ''format'' indicated a literal value that is not then found
0
+* 'Invalid date' if the date is invalid, such as '31/02/2007'</longdesc><params name="format" type="String"><desc>The format to use in extracting the date.</desc></params><params name="value" type="String"><desc>The date value to be examined.</desc></params><params name="settings" optional="true" type="Object"><desc>Additional parameters for parsing the date. All are optional and default to the datepicker default, which is usually standard English.&lt;br/&gt;
0
+Attributes include:&lt;br/&gt;
0
+''shortYearCutoff'' (Number) - the value (0-99) beyond which years are considered to be in the previous century. Used in conjunction with the 'y' format option. Defaults to the datepicker default, which is usually 10 years in the future.&lt;br/&gt;
0
+&lt;i&gt;dayNamesShort&lt;/i&gt; (String[7]) - the short names for the days of the week, starting at Sunday.&lt;br/&gt;
0
+&lt;i&gt;dayNames&lt;/i&gt; (String[7]) - the long names for the days of the week, starting at Sunday&lt;br/&gt;
0
+&lt;i&gt;monthNamesShort&lt;/i&gt; (String[12]) - the short names for the months of the year.&lt;br/&gt;
0
+&lt;i&gt;monthNames&lt;/i&gt; (String[12]) - the long names for the months of the year.&lt;br/&gt;&lt;br/&gt;</desc></params><example><desc>Extract a date in ISO format.</desc><code>$.datepicker.parseDate('yy-mm-dd', '2007-01-26');</code></example><example><desc>Extract a date in RSS format.</desc><code>$.datepicker.parseDate($.datepicker.RSS, 'Fri, 26 Jan 07');</code></example><example><desc>Extract a date in expanded French format.</desc><code>$.datepicker.parseDate('DD, MM d, yy', 'Samedi, Juillet 14, 2007', {shortYearCutoff: 20, dayNamesShort: $.datepicker.regional['fr'].dayNamesShort, dayNames: $.datepicker.regional['fr'].dayNames, monthNamesShort: $.datepicker.regional['fr'].monthNamesShort, monthNames: $.datepicker.regional['fr'].monthNames});</code></example></function></subcat></cat><cat value="UI/Dialog"><subcat value="Plugin methods"><function cat="UI/Dialog" name="dialog" return="jQuery" timestamp="2008-11-24T14:02:11Z"><desc>Make the selected elements Dialog boxes.</desc><longdesc></longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the dialog. All options are optional.</desc></params><option default="true" name="autoOpen" type="Boolean"><desc>When ''autoOpen'' is ''true'' the dialog will open automatically when ''dialog'' is called. If ''false'' it will stay hidden until ''.dialog(&quot;open&quot;)'' is called on it.</desc></option><option default="false" name="bgiframe" type="Boolean"><desc>When true, the bgiframe plugin will be used, to fix the issue in IE6 where select boxes show on top of other elements, regardless of zIndex. Requires including the bgiframe plugin. Future versions may not require a separate plugin.</desc></option><option name="buttons" type="Object"><desc>Specifies which buttons should be displayed on the dialog. The property key is the text of the button. The value is the callback function for when the button is clicked.  The context of the callback is the dialog element; if you need access to the button, it is available as the target of the event object.</desc></option><option name="dialogClass" type="String"><desc>The specified class name(s) will be added to the dialog, for additional theming.</desc></option><option default="true" name="draggable" type="Boolean"><desc>When ''draggable'' is ''true'' the resulting dialog will be draggable. If ''false'' the dialog will not be draggable.</desc></option><option default="200" name="height" type="Number"><desc>The height of the dialog, in pixels. </desc></option><option name="hide" type="String"><desc>The effect to be used when the dialog is closed.</desc></option><option default="" name="maxHeight" type="Number"><desc>The maximum height to which the dialog can be resized, in pixels. </desc></option><option default="" name="maxWidth" type="Number"><desc>The maximum width to which the dialog can be resized, in pixels. </desc></option><option default="100" name="minHeight" type="Number"><desc>The minimum height to which the dialog can be resized, in pixels. </desc></option><option default="150" name="minWidth" type="Number"><desc>The minimum width to which the dialog can be resized, in pixels. </desc></option><option default="false" name="modal" type="Boolean"><desc>When ''modal'' is set to ''true'' the dialog will have modal behavior; other items on the page will be disabled (i.e. cannot be interacted with). Modal dialogs create an overlay below the dialog but above other page elements. Custom style values for the overlay (e.g. changing its color or opacity) can be provided with the ''overlay'' option.</desc></option><option default="" name="overlay" type="Options"><desc>Key/value object of style properties for the overlay to display behind the dialog (but above other page elements). See <![CDATA[<a href='CSS'>CSS</a>]]> for details.</desc></option><option default="center" name="position" type="String, Array"><desc>Specifies where the dialog should be displayed. Possible values: 'center', 'left', 'right', 'top', 'bottom', or an array containing a coordinate pair (in pixel offset from top left of viewport) or the possible string values (e.g. ['right','top'] for top right corner).</desc></option><option default="true" name="resizable" type="Boolean"><desc>Specifies whether the dialog will be resizeable. Possible values: ''true'', ''false''. </desc></option><option name="show" type="String"><desc>The effect to be used when the dialog is opened.</desc></option><option default="true" name="stack" type="Boolean"><desc>Specifies whether the dialog will stack on top of other dialogs. This will cause the dialog to move to the front of other dialogs when it gains focus. </desc></option><option name="title" type="String"><desc>Specifies the title of the dialog. The title can also be specified by the title attribute on the dialog source element.</desc></option><option default="300" name="width" type="Number"><desc>The width of the dialog, in pixels. </desc></option><option name="open" type="function(event, ui)"><desc>Callback for the dialogopen event. The function gets passed two arguments in accordance with the <![CDATA[<a href='Events/triggerHandler'>triggerHandler</a>]]> interface. The data passed is the opened dialog options object.</desc></option><option name="focus" type="function(event, ui)"><desc>Callback for the dialogfocus event. The function gets passed two arguments in accordance with the <![CDATA[<a href='Events/triggerHandler'>triggerHandler</a>]]> interface. The data passed is the focused dialog options object.</desc></option><option name="dragStart" type="function(event, ui)"><desc>Callback for the beginning of the dialog being dragged.</desc></option><option name="drag" type="function(event, ui)"><desc>Callback for during the dialog being dragged.</desc></option><option name="dragStop" type="function(event, ui)"><desc>Callback for after the dialog has been dragged.</desc></option><option name="resizeStart" type="function(event, ui)"><desc>Callback for the beginning of the dialog being resized.</desc></option><option name="resize" type="function(event, ui)"><desc>Callback for during the dialog being resized.</desc></option><option name="resizeStop" type="function(event, ui)"><desc>Callback for after the dialog has been resize.</desc></option><option name="close" type="function(event, ui)"><desc>Callback for the close.dialog event. The function gets passed two arguments in accordance with the <![CDATA[<a href='Events/triggerHandler'>triggerHandler</a>]]> interface. The data passed is the closed dialog options object.</desc></option></function><function cat="UI/Dialog" name="dialog" return="jQuery" timestamp="2008-11-24T14:02:11Z"><desc>Opens the specified dialog boxes.</desc><longdesc></longdesc><params name="&quot;open&quot;" type="String"><desc></desc></params></function><function cat="UI/Dialog" name="dialog" return="Boolean" timestamp="2008-11-24T14:02:11Z"><desc>Return if the dialog is currently open.</desc><longdesc>Since version 1.6 stable.</longdesc><params name="&quot;isOpen&quot;" type="String"><desc></desc></params></function><function cat="UI/Dialog" name="dialog" return="jQuery" timestamp="2008-11-24T14:02:11Z"><desc>Moves the specified dialog on top of the dialogs stack.</desc><longdesc></longdesc><params name="&quot;moveToTop&quot;" type="String"><desc></desc></params></function><function cat="UI/Dialog" name="dialog" return="jQuery" timestamp="2008-11-24T14:02:11Z"><desc>Closes the specified dialog boxes.</desc><longdesc></longdesc><params name="&quot;close&quot;" type="String"><desc></desc></params></function><function cat="UI/Dialog" name="dialog" return="jQuery" timestamp="2008-11-24T14:02:11Z"><desc> Completely remove the dialog.</desc><longdesc>This method removes the dialog completely. Note however that it does ''not'' remove the contents of the dialog. To do that, use X.dialog('destroy').remove().</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Progressbar"><subcat value="Plugin methods"><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc>Make the selected elements progressbar.</desc><longdesc></longdesc><params name="options" optional="true" type="Options"><desc>A set of key/value pairs that configure the progressbar. All options are optional.</desc></params><option default="1000" name="duration" type="Number"><desc>Time for progressing. </desc></option><option default="1" name="increment" type="Number"><desc>Min stepping of the progressbar. </desc></option><option default="100" name="interval" type="Number"><desc>......</desc></option><option default="true" name="range" type="Boolean"><desc>Whether show range number as text on the bar.</desc></option><option default="" name="text" type="String"><desc>Text to show on the bar.</desc></option><option default="" name="textClass" type="String"><desc>Text CSS class.</desc></option><option default="300" name="width" type="Number"><desc>Width of the progressbar</desc></option><option default="" name="start" type="function(event, ui)"><desc>Callback function triggered when the progressbar is started. </desc></option><option default="" name="pause" type="function(event, ui)"><desc>Callback function triggered when the progressbar is paused. </desc></option><option default="" name="progress" type="function(event, ui)"><desc>Callback function triggered when the progressbar is progressing. </desc></option><option default="" name="stop" type="function(event, ui)"><desc>Callback function triggered when the progressbar is stopped. </desc></option></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Start the progressbar.</desc><longdesc>This method start the progressbar.</longdesc><params name="&quot;start&quot;" type="String"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Stop the progressbar.</desc><longdesc>This method stop the progressbar.</longdesc><params name="&quot;stop&quot;" type="String"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Pause the progressbar.</desc><longdesc>This method pause the progressbar.</longdesc><params name="&quot;pause&quot;" type="String"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Set range of the progressbar.</desc><longdesc>This method set range of the progressbar.</longdesc><params name="&quot;progress&quot;" type="String"><desc></desc></params><params name="value" type="Number"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Enable the progressbar.</desc><longdesc>This method enable the progressbar.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Disable the progressbar.</desc><longdesc>This method disable the progressbar.</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Progressbar" name="progressbar" return="jQuery" timestamp="2008-11-24T14:03:02Z"><desc> Completely remove the progressbar.</desc><longdesc>This method removes the progressbar completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Slider"><subcat value="Plugin methods"><function cat="UI/Slider" name="slider" timestamp="2008-11-24T14:04:01Z"><desc>Makes a slider from the nodeset supplied by the query.</desc><longdesc>With this plugin, you can generate sliders with a wide range of options, including multiple handles, callbacks and more.  Some options will not work correctly unless your external and internal stylesheets come '''before''' the script tags.
0
+
0
+All callbacks receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):
0
+
0
+* '''ui.handle''': jQuery - the current focused handle
0
+* '''ui.value''': Integer - the current handle's value
0
+* '''ui.range''': Integer - the current range value (only with two handles and range: true)</longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the slider. All options are optional, but a slider will not be useful without at least one callback.</desc></params><option default="false" name="animate" type="Boolean"><desc> Whether slide handle smoothly when user click outside handle on the bar.</desc></option><option name="axis" type="String"><desc> Normally you don't need to set this option because the plugin detects the slider orientation automatically. If the orientation is not correctly detected you can set this option to 'horizontal' or 'vertical'.</desc></option><option default="&quot;.ui-slider-handle&quot;" name="handle" type="String"><desc> The jquery selector to use for the handle(s) of the slider </desc></option><option name="handles" type="Object"><desc>Specify boundaries for one or more handles. Format: [{start:Integer, min:Integer, max:Integer, id:String} [, ..]]. Only start is required. If the slider doesn't have handles already, they are automatically created.</desc></option><option default="100" name="max" type="Integer"><desc> The maximum value of the slider. Useful for tracking values via callback, and to set steps.</desc></option><option default="0" name="min" type="Integer"><desc> The minimum value of the slider. Useful for tracking values via callback, and to set steps.</desc></option><option default="false" name="range" type="Boolean"><desc> If set to true, the slider will detect if you have two handles and create a stylable range element between these two. You now also have access to ui.range in your callbacks to get the amount of the range.</desc></option><option name="startValue" type="Integer"><desc> The value the handle will have first.</desc></option><option name="stepping" type="Integer"><desc> If defined, the new value has to be dividable through this number, so the slider jumps from step to step.</desc></option><option default="0" name="steps" type="Integer"><desc> Alternative to stepping, this defines how many steps a slider will have, instead of how many values to jump, as in stepping.</desc></option><option name="start" type="function(event, ui)"><desc>Function that gets called when the user starts sliding.</desc></option><option name="slide" type="function(event, ui)"><desc> Function that gets called on every mouse move during slide.  Takes arguments e and ui, for event and user-interface respectively. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(..).slider('value', index) to get another handles' value.</desc></option><option name="change" type="function(event, ui)"><desc> Function that gets called on slide stop, but only if the slider position has changed.  Takes arguments e and ui, for event and user-interface respectively.  Use ui.value (single-handled sliders) to obtain the value of the current handle, $(..).slider('value', index) to get another handles' value.</desc></option><option name="stop" type="function(event, ui)"><desc>Function that gets called when the user stops sliding.</desc></option></function><function cat="UI/Slider" name="slider" return="jQuery" timestamp="2008-11-24T14:04:01Z"><desc>Moves a slider's handle to the given position.</desc><longdesc>Calling this method moves the specified handle to the given value. If no handle or handle's index/number is specified as second argument, it moves the focused handle.
0
+
0
+If you want to increase/decrease the handles' value, you can also input a relative string format, using &quot;+=&quot; or &quot;-=&quot;. Example: $(..).slider(&quot;moveTo&quot;, &quot;-=10&quot;) (Decrements the current handles' value by 10). 
0
+
0
+Note also that when using a slider with range: true set in the options, move the second slider handle first as if the first handle is forced to overtake the second, you'll get strange results with minus numbers.</longdesc><params name="&quot;moveTo&quot;" type="String"><desc></desc></params><params name="value" type="Integer/String"><desc>The value to move the handle to.</desc></params><params name="index" type="Integer/Element"><desc>The index/number of the handle, zero-based (or alternatively the handle element itself).</desc></params></function><function cat="UI/Slider" name="slider" return="jQuery" timestamp="2008-11-24T14:04:01Z"><desc>Retrieves a handle's value.</desc><longdesc>This method returns a handle's value. If no handle is specified in the second argument by its index, it returns the value of the currently focused handle.</longdesc><params name="&quot;value&quot;" type="String"><desc></desc></params><params name="index" type="Integer"><desc>The index/number of the handle, zero-based.</desc></params></function><function cat="UI/Slider" name="slider" return="jQuery" timestamp="2008-11-24T14:04:01Z"><desc>Temporarily disables the slider.</desc><longdesc>This method temporarily disables the slider. It can later be reenabled by calling $(..).slider(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Slider" name="slider" return="jQuery" timestamp="2008-11-24T14:04:01Z"><desc> Enables the slider.</desc><longdesc>This method re-enables a previously disabled slider.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Slider" name="slider" return="jQuery" timestamp="2008-11-24T14:04:01Z"><desc> Completely removes the sliding functionality.</desc><longdesc>This method removes the sliding functionality completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Tabs"><subcat value="Plugin methods"><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>The method that you use to create a new tabs interface.</desc><longdesc></longdesc><params name="options" optional="true" type="Options"><desc>A set of key/value pairs that configures the tabs interface. All options are optional.</desc></params><option default="0" name="selected" type="Number"><desc>Zero-based index of the tab to be selected on initialization. To set all tabs to unselected set this option to null.</desc></option><option default="false" name="unselect" type="Boolean"><desc>Allows a currently selected tab to become unselected upon clicking.</desc></option><option default="click" name="event" type="String"><desc>The type of event to be used for selecting a tab.</desc></option><option default="[]" name="disabled" type="Array&lt;Number&gt;"><desc>An array containing the position of the tabs (zero-based index) that should be disabled on initialization.</desc></option><option name="cookie" type="Object"><desc>Store the latest active (clicked) tab in a cookie. The cookie is used to determine the active tab on the next page load. Requires cookie plugin. The object needs to have key/value pairs of the form the cookie plugin expects as options. Available options: &amp;#123; expires: 7, path: '/', domain: 'jquery.com', secure: true &amp;#125;</desc></option><option default="Loading&amp;amp;#8230;" name="spinner" type="String"><desc>The HTML content of this string is shown in a tab title while remote content is loading. Pass in empty string to deactivate that behavior.</desc></option><option default="false" name="cache" type="Boolean"><desc>Wether or not to cache remote tabs content, e.g. load only once or with every click. Cached content is being lazy loaded, e.g once and only once for the first click. Note that to prevent the actual Ajax requests from being cached by the browser you need to provide an extra cache: false flag to ajaxOptions.</desc></option><option name="ajaxOptions" type="Options"><desc>Additional Ajax options to consider when loading tab content (see $.ajax).</desc></option><option default="ui-tabs-" name="idPrefix" type="String"><desc>If the remote tab, its anchor element that is, has no title attribute to generate an id from, an id/fragment identifier is created from this prefix and a unique id returned by $.data(el), for example &quot;ui-tabs-54&quot;.</desc></option><option name="fx" type="Options, Array&lt;Options&gt;"><desc>Enable animations for hiding and showing tab panels. The duration option can be a string representing one of the three predefined speeds (&quot;slow&quot;, &quot;normal&quot;, &quot;fast&quot;) or the duration in milliseconds to run an animation (default is &quot;normal&quot;).</desc></option><option default="&amp;lt;li&amp;gt;&amp;lt;a href&amp;#61;&quot;#&amp;#123;href&amp;#125;&quot;&amp;gt;&amp;lt;span&amp;gt;#&amp;#123;label&amp;#125;&amp;lt;/span&amp;gt;&amp;lt;/a&amp;gt;&amp;lt;/li&amp;gt;" name="tabTemplate" type="String"><desc>HTML template from which a new tab is created and added. The placeholders #&amp;#123;href&amp;#125; and #&amp;#123;label&amp;#125; are replaced with the url and tab label that are passed as arguments to the add method.</desc></option><option default="&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;" name="panelTemplate" type="String"><desc>HTML template from which a new tab panel is created in case of adding a tab with the add method or when creating a panel for a remote tab on the fly.</desc></option><option name="select" type="function(event,ui)"><desc>Function that gets called when clicking a tab.</desc></option><option name="load" type="function(event,ui)"><desc>Function that gets called after the content of a remote tab has been loaded.</desc></option><option name="show" type="function(event,ui)"><desc>Function that gets called when a tab is shown.</desc></option><option name="add" type="function(event,ui)"><desc>Function that gets called when a tab was added.</desc></option><option name="remove" type="function(event,ui)"><desc>Function that gets called when a tab was removed.</desc></option><option name="enable" type="function(event,ui)"><desc>Function that gets called when a tab was enabled.</desc></option><option name="disable" type="function(event,ui)"><desc>Function that gets called when a tab was disabled.</desc></option><example><height>155</height><desc>A simple jQuery UI Tabs interface.</desc><code>$(&quot;#example &gt; ul&quot;).tabs();</code><inhead>&lt;link rel=&quot;stylesheet&quot; href=&quot;http://ui.jquery.com/latest/themes/flora/flora.all.css&quot; type=&quot;text/css&quot; media=&quot;screen&quot; title=&quot;Flora (Default)&quot;&gt;
0
+&lt;script type=&quot;text/javascript&quot; src=&quot;http://ui.jquery.com/latest/ui/ui.core.js&quot;&gt;&lt;/script&gt;
0
+&lt;script type=&quot;text/javascript&quot; src=&quot;http://ui.jquery.com/latest/ui/ui.tabs.js&quot;&gt;&lt;/script&gt;</inhead><html>
0
+        &lt;div id=&quot;example&quot; class=&quot;flora&quot;&gt;
0
+            &lt;ul&gt;
0
+                &lt;li&gt;&lt;a href=&quot;#fragment-1&quot;&gt;&lt;span&gt;One&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
0
+                &lt;li&gt;&lt;a href=&quot;#fragment-2&quot;&gt;&lt;span&gt;Two&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
0
+                &lt;li&gt;&lt;a href=&quot;#fragment-3&quot;&gt;&lt;span&gt;Three&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
0
+            &lt;/ul&gt;
0
+            &lt;div id=&quot;fragment-1&quot;&gt;
0
+                &lt;p&gt;First tab is selected by default.&lt;/p&gt;
0
+            &lt;/div&gt;
0
+            &lt;div id=&quot;fragment-2&quot;&gt;
0
+                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0
+                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0
+            &lt;/div&gt;
0
+            &lt;div id=&quot;fragment-3&quot;&gt;
0
+                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0
+                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0
+                Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
0
+            &lt;/div&gt;
0
+        &lt;/div&gt;</html></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Add a new tab.</desc><longdesc></longdesc><params name="&quot;add&quot;" type="String"><desc></desc></params><params name="url" type="String"><desc>Either a URL consisting of a fragment identifier only to create an in-page tab or a full url (relative or absolute, no cross-domain support) to turn the new tab into an Ajax (remote) tab.</desc></params><params name="label" type="String"><desc>The label of the tab to be added.</desc></params><params name="index" optional="true" type="Number"><desc>Zero-based position where to insert the new tab. Optional, by default a new tab is appended at the end.</desc></params><example><desc>Append a new in-page tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;add&quot;, '#fragment-identifier', 'New Tab');</code></example><example><desc>Insert a new in-page tab at the second position.</desc><code>$(&quot;.selector&quot;).tabs(&quot;add&quot;, '#fragment-identifier', 'New Tab', 1);</code></example><example><desc>Append a new remote tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;add&quot;, '/load/content/url', 'New Tab');</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Remove a tab.</desc><longdesc></longdesc><params name="&quot;remove&quot;" type="String"><desc></desc></params><params name="index" type="Number"><desc>Zero-based index of the tab to be removed. </desc></params><example><desc>Remove second tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;remove&quot;, 1);</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Enable a disabled tab.</desc><longdesc>To enable more than one tab at once reset the disabled property like: &lt;code&gt;$('#example').data('disabled.tabs', []);&lt;/code&gt;</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params><params name="index" type="Number"><desc>Zero-based index of the tab to be enabled. </desc></params><example><desc>Enable second tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;enable&quot;, 1);</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Disable a tab.</desc><longdesc>The selected tab cannot be disabled. To disable more than one tab at once use: &lt;code&gt;$('#example').data('disabled.tabs', [1, 2, 3]);&lt;/code&gt;</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params><params name="index" type="Number"><desc>Zero-based index of the tab to be disabled. </desc></params><example><desc>Disable second tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;disable&quot;, 1);</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Select a tab, i.e., simulate a click programmatically.</desc><longdesc></longdesc><params name="&quot;select&quot;" type="String"><desc></desc></params><params name="index" type="Number, String"><desc>Zero-based index of the tab to be selected or the id selector of the panel the tab is associated with (the tab's href fragment identifier, e.g. hash, points to the panel's id).</desc></params><example><desc>Select second tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;select&quot;, 1);</code></example><example><desc>Select tab that is associated with a panel that has the id &quot;foo&quot;.</desc><code>$(&quot;.selector&quot;).tabs(&quot;select&quot;, '#foo');</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Reload the content of an Ajax tab programmatically.</desc><longdesc>This method always loads the tab content from the remote location, even is cache is set to true.</longdesc><params name="&quot;load&quot;" type="String"><desc></desc></params><params name="index" type="Number"><desc>Zero-based index of the tab to be reloaded. </desc></params><example><desc>Reload second tab.</desc><code>$(&quot;.selector&quot;).tabs(&quot;load&quot;, 1);</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Change the url from which an Ajax (remote) tab will be loaded.</desc><longdesc>The specified URL will be used for subsequent loads. Note that you can not only change the URL for an existing remote tab with this method, but also turn an in-page tab into a remote tab.</longdesc><params name="&quot;url&quot;" type="String"><desc></desc></params><params name="index" type="Number"><desc>Zero-based index of the tab of which its URL is to be updated.</desc></params><params name="url" type="String"><desc>A URL the content of the tab is loaded from.</desc></params><example><desc>Set the URL of an Ajax tab to load content from.</desc><code>$(&quot;.selector&quot;).tabs(&quot;url&quot;, '/changed/url');</code></example></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Destroy tabs interface and revert HTML to the state before creating tabs.</desc><longdesc></longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function><function cat="UI/Tabs" name="tabs" return="Number" timestamp="2008-12-24T17:07:11Z"><desc>Retrieve the number of tabs of the first matched tab pane.</desc><longdesc></longdesc><params name="&quot;length&quot;" type="String"><desc></desc></params></function><function cat="UI/Tabs" name="tabs" return="jQuery" timestamp="2008-12-24T17:07:11Z"><desc>Set up an automatic rotation through tabs of a tab pane.</desc><longdesc>'''Part of the UI Tabs extension package.'''</longdesc><params name="&quot;rotate&quot;" type="String"><desc></desc></params><params name="ms" type="Number"><desc>Amount of time in milliseconds until the next tab in the cycle gets activated. Use 0 or null to stop the rotation.</desc></params><params name="continuing" optional="true" type="Boolean"><desc>Whether or not to continue the rotation after a tab has been selected by a user. Default: false.</desc></params><example><desc>Start rotation with an interval of 5 seconds.</desc><code>$(&quot;.selector&quot;).tabs('rotate', 5000);</code></example><example><desc>Stop rotation.</desc><code>$(&quot;.selector&quot;).tabs('rotate', null);</code></example></function></subcat></cat><cat value="UI/Spinner"><subcat value="Plugin methods"><function cat="UI/Spinner" name="spinner" return="jQuery" timestamp="2008-11-12T02:26:07Z"><desc>Creates a Spinner widget.</desc><longdesc>This jQuery widget turns input fields or DOM nodes into a spin button. Handles such as min, max and currency provided.
0
+
0
+Callbacks (init, up, down, spin, change) accept two arguments: The original browser event and a prepared ui object.  The ui object have these fields:
0
+
0
+* '''ui.element''' - a jQuery object containing the spinner element.
0
+* '''ui.options''' - options used to initialize the spinner.
0
+* '''ui.value''' - current value of the spinner.
0
+* '''ui.add''' - add a new item to the spinner (DOM nodes only).</longdesc><params name="options" optional="true" type="Options"><desc>A set of key/value pairs that configure the spinner. All options are optional.</desc></params><option default="false" name="currency" type="Boolean, String"><desc>Accepts a currency symbol, e.g. &amp;pound;. Will also automatically format into a currency value. </desc></option><option default="0" name="decimals" type="Number"><desc>The number of decimal places displayed. </desc></option><option default="&quot;%&quot;" name="format" type="String"><desc>''printf'' style formatting with named arguments, e.g. ''%(name)'', for customising the display value. Used for DOM lists only. See ''items''. </desc></option><option default=" &quot;''&quot;" name="group" type="String"><desc>The symbol to use as a thousand separator / digital group separator. </desc></option><option default="true" name="incremental" type="Boolean"><desc>If ''incremental'' is set to ''true'' stepping delta will increase when spun incessantly. i.e. spinning jumps up a notch at set increments. </desc></option><option default="" name="items" type="Array"><desc>An Array of objects which automatically convert into DOM lists to form spinner items. Used in combination with ''format''. </desc></option><option default="" name="max" type="Number"><desc>The upper limit. </desc></option><option default="" name="min" type="Number"><desc>The lower limit. </desc></option><option default=" '.'" name="point" type="String"><desc>The symbol to use as a decimal point. </desc></option><option default="0" name="start" type="Number"><desc>The default/start position. </desc></option><option default="1" name="stepping" type="Number"><desc>The unit step size. </desc></option><option default="" name="init" type="Function"><desc>Callback triggered when the spinner initializes. </desc></option><option default="" name="up" type="Function"><desc>Callback function triggered when the spinner increments. </desc></option><option default="" name="down" type="Function"><desc>Callback function triggered when the spinner decrements. </desc></option><option default="" name="spin" type="Function"><desc>Callback function triggered when the spinner spins. </desc></option><option default="" name="change" type="Function"><desc>Callback function triggered when the value is changed. </desc></option></function><function cat="UI/Spinner" name="spinner" return="jQuery" timestamp="2008-11-12T02:26:07Z"><desc>Temporarily disables the spinner.</desc><longdesc>This method temporarily disables the spinner. It can later be reenabled by calling $(..).spinner(&quot;enable&quot;).</longdesc><params name="&quot;disable&quot;" type="String"><desc></desc></params></function><function cat="UI/Spinner" name="spinner" return="jQuery" timestamp="2008-11-12T02:26:07Z"><desc> Enables the spinner.</desc><longdesc>This method re-enables a previously disabled spinner.</longdesc><params name="&quot;enable&quot;" type="String"><desc></desc></params></function><function cat="UI/Spinner" name="spinner" return="jQuery" timestamp="2008-11-12T02:26:07Z"><desc> Completely remove the spinner.</desc><longdesc>This method removes the spinner completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Colorpicker"><subcat value="Plugin methods"><function cat="UI/Colorpicker" name="colorpicker" return="jQuery" timestamp="2008-08-17T08:53:25Z"><desc>Make the selected elements colorpicker.</desc><longdesc></longdesc><params name="options" optional="true" type="Options"><desc>A set of key/value pairs that configure the colorpicker. All options are optional.</desc></params><option default="Click" name="eventName" type="String"><desc>The desired event to trigger the colorpicker. </desc></option><option default="ff0000" name="color" type="String or Object"><desc>The default color. String for hex color or hash for RGB and HSB ({r:255, r:0, b:0})  </desc></option><option default="false" name="flat" type="Boolean"><desc>Whatever if the color picker is appended to the element or triggered by an event. </desc></option><option default="" name="show" type="Function"><desc>Callback function triggered when the color picker is shown. </desc></option><option default="" name="beforeShow" type="Function"><desc>Callback function triggered before the color picker is shown. </desc></option><option default="" name="change" type="Function"><desc>Callback function triggered when the color is changed. </desc></option><option default="" name="submit" type="Function"><desc>Callback function triggered when the color it is chosen.</desc></option><option default="" name="hide" type="Function"><desc>Callback function triggered when the color picker is hidden. </desc></option></function><function cat="UI/Colorpicker" name="colorpicker" return="jQuery" timestamp="2008-08-17T08:53:25Z"><desc> Set a new color.</desc><longdesc>This method set a new color.</longdesc><params name="&quot;setColor&quot;" type="String"><desc></desc></params><params name="color" type="String or Object"><desc>The 'color' argument is the same format as the option color, string for hex color or hash for RGB and HSB ({r:255, r:0, b:0}).</desc></params></function><function cat="UI/Colorpicker" name="colorpicker" return="jQuery" timestamp="2008-08-17T08:53:25Z"><desc> Completely remove the colorpicker.</desc><longdesc>This method removes the colorpicker completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Autocomplete"><subcat value="Plugin methods"><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc>Make the selected elements Autocomplete.</desc><longdesc></longdesc><params name="options" type="Options"><desc>A set of key/value pairs that configure the autocomplete. All options are optional.</desc></params><option default="" name="url" type="String"><desc>A URL pointing at a remote resource.</desc></option><option default="" name="data" type="Array"><desc>Local data as an array.</desc></option><option default="1" name="minChars" type="Number"><desc>The minimum number of characters a user has to type before the autocompleter activates.</desc></option><option default="400 for remote, 10 for local" name="delay" type="Number"><desc>The delay in milliseconds the autocompleter waits after a keystroke to activate itself.</desc></option><option default="10" name="cacheLength" type="Number"><desc>The number of backend query results to store in cache. If set to 1 (the current result), no caching will happen. Must be &gt;= 1.</desc></option><option default="true" name="matchSubset" type="Boolean"><desc>Whether or not the autocompleter can use a cache for more specific queries. This means that all matches of &quot;foot&quot; are a subset of all matches for &quot;foo&quot;. Usually this is true, and using this options decreases server load and increases performance. Only useful with cacheLength settings bigger than one, like 10.</desc></option><option default="false" name="matchCase" type="Boolean"><desc>Whether or not the comparison is case sensitive. Important only if you use caching.</desc></option><option default="false" name="matchContains" type="Boolean"><desc>Whether or not the comparison looks inside (i.e. does &quot;ba&quot; match &quot;foo bar&quot;) the search results. Important only if you use caching. Don't mix with autofill.</desc></option><option default="false" name="mustMatch" type="Boolean"><desc>If set to true, the autocompleter will only allow results that are presented by the backend. Note that illegal values result in an empty input box.</desc></option><option default="true" name="selectFirst" type="Boolean"><desc>If this is set to true, the first autocomplete value will be automatically selected on tab/return, even if it has not been handpicked by keyboard or mouse action. If there is a handpicked (highlighted) result, that result will take precedence.</desc></option><option name="extraParams" type="Object"><desc>Extra parameters for the backend. If you were to specify { bar:4 }, the autocompleter would call my_autocomplete_backend.php?q=foo&amp;bar=4 (assuming the input box contains &quot;foo&quot;). The param can be a function that is called to calculate the param before each request.</desc></option><option default="Assumes that a single row contains a single value." name="formatItem" type="Function"><desc>Provides advanced markup for an item. For each row of results, this function will be called. The returned value will be displayed inside an LI element in the results list. Autocompleter will provide 4 parameters: the results row, the position of the row in the list of results (starting at 1), the number of items in the list of results and the search term.</desc></option><option default="formatItem is used" name="formatMatch" type="Function"><desc>Use this option if you want to limit the data that autocomplete searches for matches. For example, there may be items you want displayed to the user, but don't want included in the data that's searched. Gets called with the same arguments as formatItem.</desc></option><option default="Assumes either plain data to use as result or uses the same value as provided by formatItem." name="formatResult" type="Function"><desc>Similar to formatItem, but provides the formatting for the value to be put into the input field. Again three arguments: Data, position (starting with one) and total number of data.</desc></option><option default="false" name="multiple" type="Boolean"><desc>Whether to allow more than one autocompleted-value to enter.</desc></option><option default="&quot;, &quot;" name="multipleSeparator" type="String"><desc>Separator to put between values when using multiple option.</desc></option><option default="width of the input element" name="width" type="Number"><desc>Specify a custom width for the select box.</desc></option><option default="false" name="autoFill" type="Boolean"><desc>Fill the textinput while still selecting a value, replacing the value if more is typed or something else is selected.</desc></option><option default="10" name="max" type="Number"><desc>Limit the number of items in the select box. Is also sent as a &quot;limit&quot; parameter with a remote request.</desc></option><option default="Wraps the search term in a &lt;strong&gt; element " name="highlight" type="Boolean, Function"><desc>Whether and how to highlight matches in the select box. Set to false to disable. Set to a function to customize. The function gets the value as the first argument and the search term as the second and must return the formatted value.</desc></option><option default="true " name="scroll" type="Boolean"><desc>Whether to scroll when more results than configured via scrollHeight are available.</desc></option><option default="180" name="scrollHeight" type="Number"><desc>height of scrolled autocomplete control in pixels</desc></option></function><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc>Handle the result of a search event.</desc><longdesc>Is executed when the user selects a value or a programmatic search event is triggered (see 'search').
0
+
0
+You can add and remove (using unbind(&quot;result&quot;)) this event at any time.</longdesc><params name="&quot;result&quot;" type="String"><desc></desc></params><params name="handler" type="Function"><desc>The event handler, gets a default event object as first and the selected list item as second argument.</desc></params><example><desc>Bind a handler to the result event to display the selected value in a #result element.
0
+The first argument is a generic event object, in this case with type &quot;result&quot;.
0
+The second argument refers to the selected data, which can be a plain string value or an array or object.
0
+The third argument is the formatted value that is inserted into the input field.</desc><code>$('input#suggest').autocomplete(&quot;result&quot;,function(event, data, formatted) {
0
+  $(&quot;#result&quot;).html( !data ? &quot;No match!&quot; : &quot;Selected: &quot; + formatted);
0
+ });</code></example></function><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc>Trigger a search event.</desc><longdesc>See 'result' for binding to that event.
0
+
0
+A search event mimics the same behaviour as when the user selects a value from
0
+the list of autocomplete items. You can use it to execute anything that does something
0
+with the selected value, beyond simply putting the value into the input and submitting it.</longdesc><params name="&quot;search&quot;" type="String"><desc></desc></params></function><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc>Flush (empty) the cache of matched input's autocompleters.</desc><longdesc></longdesc><params name="&quot;flushCache&quot;" type="String"><desc></desc></params></function><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc>Updates the options for the current autocomplete field.</desc><longdesc>This allows you to change things like the URL, max items to display, etc.
0
+If you're changing the URL, be sure to call the 'flushCache' method.</longdesc><params name="&quot;setData&quot;" type="String"><desc></desc></params><params name="options" type="Options"><desc>The options to set.</desc></params></function><function cat="UI/Autocomplete" name="autocomplete" return="jQuery" timestamp="2008-10-27T21:29:28Z"><desc> Completely remove the autocomplete.</desc><longdesc>This method removes the autocomplete completely.</longdesc><params name="&quot;destroy&quot;" type="String"><desc></desc></params></function></subcat></cat><cat value="UI/Theming/API"/></docs>
0
lib/jquery/.svn/all-wcprops
17 additions, 0 deletions not shown
0
lib/jquery/.svn/entries
52 additions, 0 deletions not shown
0
lib/jquery/.svn/format
1 additions, 0 deletions not shown
0
lib/jquery/.svn/text-base/jquery-1.3.min.js.svn-base
19 additions, 0 deletions not shown
0
lib/jquery/.svn/text-base/jquery-1.3b1.js.svn-base
4102 additions, 0 deletions not shown
0
lib/jquery/jquery-1.3.min.js
19 additions, 0 deletions not shown
0
lib/jquery/jquery-1.3b1.js
4102 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/all-wcprops
47 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/entries
113 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/format
1 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/prop-base/jquery.history.js.svn-base
13 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/text-base/api-browser.js.svn-base
487 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/text-base/api-loader.js.svn-base
504 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/text-base/cookie.js.svn-base
36 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/text-base/jquery.history.js.svn-base
172 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/text-base/jquery.tojson.js.svn-base
81 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/text-base/json2.js.svn-base
478 additions, 0 deletions not shown
0
lib/jqueryapi/.svn/text-base/pretty.js.svn-base
1484 additions, 0 deletions not shown
0
lib/jqueryapi/api-browser.js
487 additions, 0 deletions not shown
0
lib/jqueryapi/api-loader.js
504 additions, 0 deletions not shown
0
lib/jqueryapi/cookie.js
36 additions, 0 deletions not shown
0
lib/jqueryapi/jquery.history.js
172 additions, 0 deletions not shown
0
lib/jqueryapi/jquery.tojson.js
81 additions, 0 deletions not shown
0
lib/jqueryapi/json2.js
478 additions, 0 deletions not shown
0
lib/jqueryapi/pretty.js
1484 additions, 0 deletions not shown
0
no-scroll-application.xml
101 additions, 0 deletions not shown
0
src/.svn/all-wcprops
11 additions, 0 deletions not shown
0
src/.svn/entries
58 additions, 0 deletions not shown
0
src/.svn/format
1 additions, 0 deletions not shown
0
src/.svn/text-base/jQueryAPI.js.svn-base
42 additions, 0 deletions not shown
0
src/Chrome/.svn/all-wcprops
23 additions, 0 deletions not shown
0
src/Chrome/.svn/entries
64 additions, 0 deletions not shown
0
src/Chrome/.svn/format
1 additions, 0 deletions not shown
0
src/Chrome/.svn/text-base/APIBrowser.js.svn-base
91 additions, 0 deletions not shown
0
src/Chrome/.svn/text-base/Popup.js.svn-base
48 additions, 0 deletions not shown
0
src/Chrome/.svn/text-base/Splash.js.svn-base
101 additions, 0 deletions not shown
0
src/Chrome/APIBrowser.js
91 additions, 0 deletions not shown
0
src/Chrome/Popup.js
48 additions, 0 deletions not shown
0
src/Chrome/Splash.js
101 additions, 0 deletions not shown
0
src/Database/.svn/all-wcprops
41 additions, 0 deletions not shown
0
src/Database/.svn/entries
100 additions, 0 deletions not shown
0
src/Database/.svn/format
1 additions, 0 deletions not shown
0
src/Database/.svn/text-base/ConnectToFile.js.svn-base
37 additions, 0 deletions not shown
0
src/Database/.svn/text-base/CreateDB.js.svn-base
12 additions, 0 deletions not shown
0
src/Database/.svn/text-base/ErrorHandler.js.svn-base
7 additions, 0 deletions not shown
0
src/Database/.svn/text-base/Query.js.svn-base
44 additions, 0 deletions not shown
0
src/Database/.svn/text-base/SaveOrCreateOption.js.svn-base
40 additions, 0 deletions not shown
0
src/Database/.svn/text-base/SetupFirstRun.js.svn-base
5 additions, 0 deletions not shown
0
src/Database/ConnectToFile.js
37 additions, 0 deletions not shown
0
src/Database/CreateDB.js
12 additions, 0 deletions not shown
0
src/Database/ErrorHandler.js
7 additions, 0 deletions not shown
0
src/Database/Query.js
44 additions, 0 deletions not shown
0
src/Database/SaveOrCreateOption.js
40 additions, 0 deletions not shown
0
src/Database/SetupFirstRun.js
5 additions, 0 deletions not shown
0
src/Menu/.svn/all-wcprops
29 additions, 0 deletions not shown
0
src/Menu/.svn/entries
76 additions, 0 deletions not shown
0
src/Menu/.svn/format
1 additions, 0 deletions not shown
0
src/Menu/.svn/text-base/AddMenuItems.js.svn-base
37 additions, 0 deletions not shown
0
src/Menu/.svn/text-base/Initialise.js.svn-base
12 additions, 0 deletions not shown
0
src/Menu/.svn/text-base/MenuItemClickHandler.js.svn-base
25 additions, 0 deletions not shown
0
src/Menu/.svn/text-base/SystrayClickHandler.js.svn-base
3 additions, 0 deletions not shown
0
src/Menu/AddMenuItems.js
37 additions, 0 deletions not shown
0
src/Menu/Initialise.js
12 additions, 0 deletions not shown
0
src/Menu/MenuItemClickHandler.js
25 additions, 0 deletions not shown
0
src/Menu/SystrayClickHandler.js
3 additions, 0 deletions not shown
0
src/Network/.svn/all-wcprops
29 additions, 0 deletions not shown
0
src/Network/.svn/entries
76 additions, 0 deletions not shown
0
src/Network/.svn/format
1 additions, 0 deletions not shown
0
src/Network/.svn/text-base/Initialise.js.svn-base
19 additions, 0 deletions not shown
0
src/Network/.svn/text-base/Offline.js.svn-base
4 additions, 0 deletions not shown
0
src/Network/.svn/text-base/Online.js.svn-base
8 additions, 0 deletions not shown
0
src/Network/.svn/text-base/URLStatus.js.svn-base
8 additions, 0 deletions not shown
0
src/Network/Initialise.js
19 additions, 0 deletions not shown
0
src/Network/Offline.js
4 additions, 0 deletions not shown
0
src/Network/Online.js
8 additions, 0 deletions not shown
0
src/Network/URLStatus.js
8 additions, 0 deletions not shown
0
src/System/.svn/all-wcprops
11 additions, 0 deletions not shown
0
src/System/.svn/entries
40 additions, 0 deletions not shown
0
src/System/.svn/format
1 additions, 0 deletions not shown
0
src/System/.svn/text-base/ParseCLI.js.svn-base
19 additions, 0 deletions not shown
0
src/System/ParseCLI.js
19 additions, 0 deletions not shown
0
src/Update/.svn/all-wcprops
17 additions, 0 deletions not shown
0
src/Update/.svn/entries
52 additions, 0 deletions not shown
0
src/Update/.svn/format
1 additions, 0 deletions not shown
0
src/Update/.svn/text-base/AppVersionCheck.js.svn-base
68 additions, 0 deletions not shown
0
src/Update/.svn/text-base/InvokeApplicationUpdate.js.svn-base
21 additions, 0 deletions not shown
0
src/Update/AppVersionCheck.js
68 additions, 0 deletions not shown
0
src/Update/InvokeApplicationUpdate.js
21 additions, 0 deletions not shown
0
src/jQueryAPI.js
42 additions, 0 deletions not shown
0
update.xml
7 additions, 0 deletions not shown

Comments

Parsed with GitHub Flavored Markdown
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server