├── .github
└── workflows
│ └── deploy.yml
├── .gitignore
├── .vscode
└── settings.json
├── LICENSE
├── README.md
├── _config.ts
├── deno.json
├── screen-shot.png
└── src
├── _includes
└── layout.eta
├── css
├── styles-print.css
└── styles.css
├── files
├── android-chrome-192x192.png
├── android-chrome-256x256.png
├── apple-touch-icon.png
├── browserconfig.xml
├── favicon-16x16.png
├── favicon-32x32.png
├── favicon.ico
├── favicon.png
├── jquery.pdf
├── jquery.png
├── manifest.json
├── mstile-144x144.png
├── mstile-150x150.png
├── mstile-310x150.png
├── mstile-310x310.png
├── mstile-70x70.png
├── safari-pinned-tab.svg
├── sw-toolbox.js
└── sw.js
├── index.yml
└── js
├── api-search.js
├── deps.js
├── main.js
├── modal.js
├── settings.js
└── versions-selector.js
/.github/workflows/deploy.yml:
--------------------------------------------------------------------------------
1 | name: Publish on GitHub Pages
2 |
3 | on:
4 | push:
5 | branches: [ master ]
6 |
7 | permissions:
8 | contents: read
9 | pages: write
10 | id-token: write
11 |
12 | jobs:
13 | build:
14 | runs-on: ubuntu-latest
15 |
16 | steps:
17 | - name: Clone repository
18 | uses: actions/checkout@v3
19 |
20 | - name: Setup Deno environment
21 | uses: denoland/setup-deno@v1
22 | with:
23 | deno-version: v1.x
24 |
25 | - name: Build site
26 | run: deno task build
27 |
28 | - name: Setup Pages
29 | uses: actions/configure-pages@v2
30 |
31 | - name: Upload artifact
32 | uses: actions/upload-pages-artifact@v1
33 | with:
34 | path: '_site'
35 |
36 | - name: Deploy to GitHub Pages
37 | id: deployment
38 | uses: actions/deploy-pages@v1
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | _site
2 |
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "deno.enable": true,
3 | "deno.lint": true,
4 | "deno.unstable": true
5 | }
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Oscar Otero
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # JQuery cheatsheet
2 |
3 | jQuery interactive cheatsheet http://oscarotero.com/jquery/
4 |
5 | 
6 |
7 | ## Installation:
8 |
9 | - Make sure you have [Deno installed](https://deno.land/)
10 | - Run `deno task serve`.
11 | - Open `http://localhost:3000` in your browser.
12 |
--------------------------------------------------------------------------------
/_config.ts:
--------------------------------------------------------------------------------
1 | import lume from "lume/mod.ts";
2 | import eta from "lume/plugins/eta.ts";
3 | import postcss from "lume/plugins/postcss.ts";
4 | import basePath from "lume/plugins/base_path.ts";
5 |
6 | const site = lume({
7 | src: "./src",
8 | location: new URL("https://oscarotero.com/jquery"),
9 | });
10 |
11 | site
12 | .copy("files", ".")
13 | .copy("vendor")
14 | .copy("js")
15 | .use(eta())
16 | .use(postcss())
17 | .use(basePath())
18 | .remoteFile(
19 | "/vendor/jquery/jquery.js",
20 | "https://code.jquery.com/jquery-3.5.1.min.js",
21 | )
22 | .remoteFile(
23 | "/vendor/Magnific-Popup/jquery.magnific-popup.js",
24 | "https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.min.js",
25 | )
26 | .remoteFile(
27 | "/vendor/Magnific-Popup/magnific-popup.css",
28 | "https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.min.css",
29 | )
30 | .remoteFile(
31 | "/vendor/normalize.css/normalize.css",
32 | "https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css",
33 | )
34 | .remoteFile(
35 | "/vendor/selectize/selectize.js",
36 | "https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.13.3/js/standalone/selectize.min.js",
37 | )
38 | .remoteFile(
39 | "/vendor/selectize/selectize.css",
40 | "https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.13.3/css/selectize.min.css",
41 | );
42 |
43 | export default site;
44 |
--------------------------------------------------------------------------------
/deno.json:
--------------------------------------------------------------------------------
1 | {
2 | "imports": {
3 | "lume/": "https://deno.land/x/lume@v1.19.1/"
4 | },
5 | "lock": false,
6 | "tasks": {
7 | "lume": "echo \"import 'lume/cli.ts'\" | deno run --unstable -A -",
8 | "build": "deno task lume",
9 | "serve": "deno task lume -s"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/screen-shot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/screen-shot.png
--------------------------------------------------------------------------------
/src/_includes/layout.eta:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 |
13 |
14 |
15 | <%= title %>
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 |
46 |
47 |
48 |
49 |
50 |
51 | jQuery
52 | Quick API Reference
53 |
54 |
55 |
56 |
57 |
64 |
65 |
66 |
67 |
98 |
99 |
100 |
101 | Preferences...
102 |
103 |
104 |
105 | <% sections.forEach(article => { %>
106 |
107 | <%= article.title %>
108 |
109 |
110 |
111 | <% article.sections.forEach(section => { %>
112 |
113 | <% if (section.break) { %>
114 |
115 | <% } %>
116 |
117 |
118 | <%= section.title %>
119 |
120 |
121 | <% section.items.forEach(item => { %>
122 |
123 | <%
124 | let itemClass = `v${item.from.replace('.', '-')} ${item.doc.replace('.', '-')}`;
125 |
126 | if (item.deprecated) {
127 | itemClass += ` v${item.deprecated.replace('.', '-')}-d`;
128 | }
129 |
130 | if (item.removed) {
131 | itemClass += ` v${item.removed.replace('.', '-')}-r`;
132 | }
133 | %>
134 |
135 | -
136 |
140 | <%= item.text %>
141 |
142 |
143 | <% }) %>
144 |
145 |
146 | <% }) %>
147 |
148 |
149 |
150 | <% }) %>
151 |
152 |
153 |
175 |
176 |
177 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
193 |
194 |
--------------------------------------------------------------------------------
/src/css/styles-print.css:
--------------------------------------------------------------------------------
1 | @import "//fonts.googleapis.com/css?family=Droid+Sans:regular,bold";
2 | @import "../vendor/normalize.css/normalize.css";
3 |
4 | body {
5 | font-family: 'Droid Sans', Helvetica, sans-serif;
6 | padding: 1em;
7 | }
8 | a {
9 | color: inherit;
10 | text-decoration: none;
11 | }
12 | .ads,
13 | .filter-group,
14 | #about-link,
15 | .mfp-hide {
16 | display: none;
17 | }
18 | .main-header {
19 | padding: .5rem;
20 |
21 | & h1 {
22 | font-size: 1em;
23 | margin: 0;
24 | }
25 | }
26 | .main-content {
27 | display: flex;
28 | flex-wrap: wrap;
29 |
30 | & > article {
31 | border: solid 2px;
32 | margin: .5rem;
33 | padding: 1rem;
34 | page-break-inside: avoid;
35 |
36 | & > div {
37 | display: flex;
38 |
39 | & > div + div {
40 | margin-left: 1rem;
41 | }
42 | }
43 | }
44 | & h1 {
45 | text-transform: uppercase;
46 | font-size: .9em;
47 | margin: 0;
48 | }
49 | & h2 {
50 | font-size: 0.9rem;
51 | line-height: 1em;
52 | margin: 0 0 .2em 0;
53 | }
54 | & section {
55 | margin-top: 1em;
56 | }
57 | & ul {
58 | list-style: none;
59 | padding: 0;
60 | font-size: 0.8rem;
61 | margin: 0;
62 | }
63 | }
--------------------------------------------------------------------------------
/src/css/styles.css:
--------------------------------------------------------------------------------
1 | @import "https://fonts.googleapis.com/css?family=Droid+Sans:regular,bold";
2 | @import "../vendor/selectize/selectize.css";
3 | @import "../vendor/Magnific-Popup/magnific-popup.css";
4 | @import "../vendor/normalize.css/normalize.css";
5 |
6 | /* Variables */
7 | :root {
8 | --black: #1B1B1B;
9 | --gray: #777;
10 | --gray-light: #BFBFBF;
11 | --gray-xlight: #EFEFEF;
12 |
13 | --dark: rgba(0,0,0,0.85);
14 | --yellow: #FFDD3A;
15 | --orange: #FFA03C;
16 | --red: #E45B5B;
17 | --pink: #E678DC;
18 | --blue: #6B96D5;
19 | --turquoise: #3CC0DC;
20 | --green: #40D26E;
21 | --lemon: #CFF417;
22 | }
23 |
24 | body {
25 | background: var(--black);
26 | font-family: 'Droid Sans', Helvetica, sans-serif;
27 | }
28 | fieldset, iframe {
29 | border: none;
30 | padding: 0;
31 | margin: 0;
32 | }
33 |
34 | /* Main header */
35 | .main-header {
36 | padding: .8rem 1rem;
37 | box-sizing: border-box;
38 | color: var(--gray);
39 | background: var(--black);
40 | top: 0;
41 | left: 0;
42 | right: 0;
43 | z-index: 2;
44 | position: fixed;
45 | top: 0;
46 | left: 0;
47 | width: 100%;
48 |
49 | & a {
50 | color: inherit;
51 | text-decoration: none;
52 |
53 | &:hover {
54 | text-decoration: underline;
55 | }
56 | }
57 |
58 | & h1 {
59 | font-size: .9rem;
60 | font-weight: normal;
61 | padding: 0;
62 | margin: 0;
63 | white-space: nowrap;
64 |
65 | & strong {
66 | color: white;
67 | }
68 |
69 | }
70 |
71 | & .filter-group {
72 | margin: .5em 0;
73 | max-width: 400px;
74 | }
75 |
76 | & .filter {
77 | & .selectize-input {
78 | padding: .5rem 1rem;
79 | display: block !important;
80 | border: none;
81 | border-radius: 0;
82 | background: var(--gray-light);
83 |
84 | &:hover {
85 | background: white;
86 | }
87 | }
88 | & .selectize-dropdown,
89 | & .selectize-dropdown-content {
90 | border: none;
91 | border-radius: 0 0 6px 6px;
92 | }
93 | & .selectize-dropdown {
94 | color: var(--gray);
95 |
96 | & .active {
97 | background: var(--gray-xlight);
98 | }
99 |
100 | & .highlight {
101 | color: var(--black);
102 | background: none;
103 | text-decoration: underline;
104 | }
105 | }
106 | }
107 |
108 | & .filter-version {
109 | width: 100%;
110 |
111 | & .selectize-input {
112 | border-radius: 6px 6px 0 0;
113 | }
114 | }
115 | & .filter-search {
116 | width: 100%;
117 | margin-top: 2px;
118 |
119 | & .selectize-input {
120 | border-radius: 0 0 6px 6px;
121 | cursor: text !important;
122 |
123 | &.dropdown-active {
124 | border-bottom-left-radius: 0;
125 | border-bottom-right-radius: 0;
126 | }
127 | }
128 |
129 | & .selectize-dropdown-content {
130 | padding: 0;
131 |
132 | & .option {
133 | border-left-style: solid;
134 | border-left-width: 8px;
135 | }
136 | }
137 | }
138 |
139 | & .about {
140 | font-size: 0.9rem;
141 | outline: 0;
142 | }
143 |
144 | @media (min-width: 750px) {
145 | display: flex;
146 | justify-content: space-between;
147 | align-items: center;
148 |
149 | & .about {
150 | display: block;
151 | padding: 0 1rem;
152 | }
153 |
154 | & .filter-group {
155 | width: 100%;
156 | max-width: 30rem;
157 | margin: 0 2rem;
158 | display: flex;
159 |
160 | & .filter-version {
161 | margin-right: 2px;
162 | width: 8rem;
163 |
164 | & .selectize-input {
165 | border-radius: 6px 0 0 6px;
166 |
167 | &.dropdown-active {
168 | border-bottom-left-radius: 0;
169 | }
170 | }
171 | }
172 | & .filter-search {
173 | margin-top: 0;
174 | & .selectize-input {
175 | border-radius: 0 6px 6px 0;
176 |
177 | &.dropdown-active {
178 | border-bottom-right-radius: 0;
179 | }
180 | }
181 | }
182 | }
183 | }
184 | }
185 |
186 | /* Main content */
187 | .main-content {
188 | padding: 9.2rem 0 0;
189 | display: flex;
190 | flex-wrap: wrap;
191 |
192 | & article {
193 | flex-shrink: 0;
194 | flex-grow: 1;
195 | background: white;
196 | margin-right: 1px;
197 | margin-bottom: 1px;
198 |
199 | & h1 {
200 | font-size: .9em;
201 | margin: 0;
202 | padding: .5rem 1rem;
203 | background: rgba(0,0,0,0.1);
204 | text-transform: uppercase;
205 |
206 | @media (min-width: 750px) {
207 | padding-top: 2rem;
208 | }
209 | }
210 |
211 | & a {
212 | color: inherit;
213 | }
214 |
215 | & > div {
216 | padding: 1rem;
217 |
218 | & div {
219 | min-width: 100px;
220 | }
221 |
222 | & section {
223 | margin-top: .8rem;
224 | }
225 | }
226 | }
227 |
228 | & section {
229 | & h2 {
230 | font-size: 0.9rem;
231 | line-height: 1em;
232 | margin: 0 0 .2em 0;
233 | }
234 |
235 | & ul {
236 | font-size: 0.8rem;
237 | line-height: 1em;
238 | list-style: none;
239 | margin: 0;
240 | padding: 0;
241 |
242 | & li a {
243 | text-decoration: none;
244 | display: block;
245 | padding: .15em .5em;
246 |
247 | @media (min-height: 800px) {
248 | padding-top: .2em;
249 | padding-bottom: .2em;
250 | }
251 | }
252 | }
253 | & h2.deactivate,
254 | & a.deactivate,
255 | & a.old-version {
256 | opacity: 0.3;
257 | }
258 | & a.removed {
259 | text-decoration: line-through;
260 | }
261 | }
262 |
263 | @media (min-width: 600px) {
264 | & article > div {
265 | display: flex;
266 | flex-shrink: 0;
267 | align-content: flex-start;
268 |
269 | & > div {
270 | flex-grow: 1;
271 | }
272 |
273 | & > div + div {
274 | margin-left: 1rem;
275 | }
276 |
277 | & section:first-child {
278 | margin-top: 0;
279 | }
280 | }
281 | }
282 |
283 | @media (min-width: 750px) {
284 | padding-top: 2.5rem;
285 |
286 | &.ly-horizontal {
287 | flex-wrap: nowrap;
288 | }
289 | }
290 | }
291 |
292 | .main-content {
293 | &.hide-removed a.removed {
294 | display: none;
295 | }
296 | &.hide-deprecated a.old-version {
297 | display: none;
298 | }
299 | }
300 |
301 | /* SELECTORS theme */
302 | .selectors {
303 | --color: var(--yellow);
304 | --dark: rgba(0,0,0,0.85);
305 |
306 | @nest article& {
307 | background: var(--color);
308 | color: var(--dark);
309 |
310 | & a:hover {
311 | background: var(--dark);
312 | color: var(--color);
313 | }
314 | }
315 |
316 | &.option {
317 | border-color: var(--color);
318 | }
319 | }
320 |
321 | /* ATTRIBUTES theme */
322 | .attributes {
323 | --color: var(--orange);
324 |
325 | @nest article& {
326 | background: var(--color);
327 | color: var(--dark);
328 |
329 | & a:hover {
330 | background: var(--dark);
331 | color: var(--color);
332 | }
333 | }
334 |
335 | &.option {
336 | border-color: var(--color);
337 | }
338 | }
339 |
340 | /* MANIPULATION theme */
341 | .manipulation {
342 | --color: var(--red);
343 |
344 | @nest article& {
345 | background: var(--color);
346 | color: var(--dark);
347 |
348 | & a:hover {
349 | background: var(--dark);
350 | color: var(--color);
351 | }
352 | }
353 |
354 | &.option {
355 | border-color: var(--color);
356 | }
357 | }
358 |
359 | /* TRAVERSING theme */
360 | .traversing {
361 | --color: var(--pink);
362 |
363 | @nest article& {
364 | background: var(--color);
365 | color: var(--dark);
366 |
367 | & a:hover {
368 | background: var(--dark);
369 | color: var(--color);
370 | }
371 | }
372 |
373 | &.option {
374 | border-color: var(--color);
375 | }
376 | }
377 |
378 | /* EVENTS theme */
379 | .events {
380 | --color: var(--blue);
381 |
382 | @nest article& {
383 | background: var(--color);
384 | color: var(--dark);
385 |
386 | & a:hover {
387 | background: var(--dark);
388 | color: var(--color);
389 | }
390 | }
391 |
392 | &.option {
393 | border-color: var(--color);
394 | }
395 | }
396 |
397 | /* EFFECTS theme */
398 | .effects {
399 | --color: var(--turquoise);
400 |
401 | @nest article& {
402 | background: var(--color);
403 | color: var(--dark);
404 |
405 | & a:hover {
406 | background: var(--dark);
407 | color: var(--color);
408 | }
409 | }
410 |
411 | &.option {
412 | border-color: var(--color);
413 | }
414 | }
415 |
416 | /* AJAX theme */
417 | .ajax {
418 | --color: var(--green);
419 |
420 | @nest article& {
421 | background: var(--color);
422 | color: var(--dark);
423 |
424 | & a:hover {
425 | background: var(--dark);
426 | color: var(--color);
427 | }
428 | }
429 |
430 | &.option {
431 | border-color: var(--color);
432 | }
433 | }
434 |
435 | /* CORE theme */
436 | .core {
437 | --color: var(--lemon);
438 |
439 | @nest article& {
440 | background: var(--color);
441 | color: var(--dark);
442 |
443 | & a:hover {
444 | background: var(--dark);
445 | color: var(--color);
446 | }
447 | }
448 |
449 | &.option {
450 | border-color: var(--color);
451 | }
452 | }
453 |
454 |
455 |
456 | /* Popups */
457 | .mfp-bg {
458 | background: rgba(0,0,0,0.5);
459 | }
460 | .mfp-content {
461 | background: white;
462 | box-shadow: 0 0 10px rgba(0,0,0,.3);
463 | }
464 | .modal-doc {
465 | & .mfp-container {
466 | padding: 0;
467 |
468 | & .mfp-content {
469 | width: calc(100% - 40px);
470 | height: calc(100% - 40px);
471 | background: white;
472 | }
473 | }
474 | }
475 |
476 | .modal-about {
477 | & .mfp-content {
478 | max-width: 400px;
479 | }
480 | & fieldset {
481 | padding: 1rem;
482 | }
483 |
484 | & h4 {
485 | margin: 0 0 1rem 0;
486 | }
487 | & label {
488 | font-size: 0.8em;
489 | padding: 5px 0;
490 | display: block;
491 |
492 | & > input {
493 | margin-right: .3em;
494 | }
495 | }
496 |
497 | & p {
498 | padding: 1rem;
499 | font-size: 0.8rem;
500 | border-top: solid 1px var(--gray-light);
501 | margin: 0;
502 |
503 | & a {
504 | color: inherit;
505 |
506 | &:hover {
507 | text-decoration: none;
508 | }
509 | }
510 | }
511 | }
512 |
513 | /* Modal */
514 | #modal {
515 | padding: 5px;
516 | width: 100%;
517 | height: 100%;
518 | box-sizing: border-box;
519 | display: flex;
520 | flex-direction: column;
521 |
522 | & ul {
523 | list-style: none;
524 | margin: 0 0 5px 0;
525 | padding: 0;
526 | display: flex;
527 | font-size: 0.8rem;
528 |
529 | & li {
530 | margin-right: 5px;
531 | }
532 |
533 | & a {
534 | display: block;
535 | color: black;
536 | padding: 0.5em 1em;
537 | text-decoration: none;
538 |
539 | &:hover {
540 | background: var(--gray-xlight);
541 | }
542 |
543 | &.selected {
544 | color: white;
545 | background: black;
546 | }
547 | }
548 | }
549 | & > div {
550 | flex-grow: 1;
551 | position: relative;
552 | }
553 |
554 | & iframe {
555 | position: absolute;
556 | top: 0;
557 | left: 0;
558 | width: 100%;
559 | height: 100%;
560 | }
561 | }
562 |
563 | /* Offline */
564 | html.is-offline {
565 | --offline-color: #C00;
566 |
567 | border-top: solid 3px var(--offline-color);
568 |
569 | & .main-header {
570 | & h1 {
571 | &::after {
572 | content: "Offline";
573 | display: inline-block;
574 | font-size: .8em;
575 | background: var(--offline-color);
576 | color: white;
577 | padding: .3em;
578 | border-radius: 3px;
579 | text-transform: uppercase;
580 | margin-left: .5em;
581 | }
582 | }
583 | }
584 | & .main-content section ul li a {
585 | pointer-events: none;
586 | }
587 | }
588 |
--------------------------------------------------------------------------------
/src/files/android-chrome-192x192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/android-chrome-192x192.png
--------------------------------------------------------------------------------
/src/files/android-chrome-256x256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/android-chrome-256x256.png
--------------------------------------------------------------------------------
/src/files/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/apple-touch-icon.png
--------------------------------------------------------------------------------
/src/files/browserconfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | #da532c
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/files/favicon-16x16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/favicon-16x16.png
--------------------------------------------------------------------------------
/src/files/favicon-32x32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/favicon-32x32.png
--------------------------------------------------------------------------------
/src/files/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/favicon.ico
--------------------------------------------------------------------------------
/src/files/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/favicon.png
--------------------------------------------------------------------------------
/src/files/jquery.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/jquery.pdf
--------------------------------------------------------------------------------
/src/files/jquery.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/jquery.png
--------------------------------------------------------------------------------
/src/files/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "En marea",
3 | "icons": [
4 | {
5 | "src": "\/jquery\/android-chrome-192x192.png",
6 | "sizes": "192x192",
7 | "type": "image\/png"
8 | },
9 | {
10 | "src": "\/jquery\/android-chrome-256x256.png",
11 | "sizes": "256x256",
12 | "type": "image\/png"
13 | }
14 | ],
15 | "theme_color": "#ffffff",
16 | "display": "standalone"
17 | }
18 |
--------------------------------------------------------------------------------
/src/files/mstile-144x144.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/mstile-144x144.png
--------------------------------------------------------------------------------
/src/files/mstile-150x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/mstile-150x150.png
--------------------------------------------------------------------------------
/src/files/mstile-310x150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/mstile-310x150.png
--------------------------------------------------------------------------------
/src/files/mstile-310x310.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/mstile-310x310.png
--------------------------------------------------------------------------------
/src/files/mstile-70x70.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/oscarotero/jquery-cheatsheet/b9d740692f75645541ba405041f9c99575579ed7/src/files/mstile-70x70.png
--------------------------------------------------------------------------------
/src/files/safari-pinned-tab.svg:
--------------------------------------------------------------------------------
1 |
2 |
4 |
16 |
--------------------------------------------------------------------------------
/src/files/sw-toolbox.js:
--------------------------------------------------------------------------------
1 | /*
2 | Copyright 2014 Google Inc. All Rights Reserved.
3 |
4 | Licensed under the Apache License, Version 2.0 (the "License");
5 | you may not use this file except in compliance with the License.
6 | You may obtain a copy of the License at
7 |
8 | http://www.apache.org/licenses/LICENSE-2.0
9 |
10 | Unless required by applicable law or agreed to in writing, software
11 | distributed under the License is distributed on an "AS IS" BASIS,
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | See the License for the specific language governing permissions and
14 | limitations under the License.
15 | */
16 |
17 | (function (f) {
18 | if (typeof exports === "object" && typeof module !== "undefined") {
19 | module.exports = f();
20 | } else if (typeof define === "function" && define.amd) define([], f);
21 | else {
22 | var g;
23 | if (typeof window !== "undefined") g = window;
24 | else if (typeof global !== "undefined") g = global;
25 | else if (typeof self !== "undefined") g = self;
26 | else g = this;
27 | g.toolbox = f();
28 | }
29 | })(function () {
30 | var define, module, exports;
31 | return (function e(t, n, r) {
32 | function s(o, u) {
33 | if (!n[o]) {
34 | if (!t[o]) {
35 | var a = typeof require == "function" && require;
36 | if (!u && a) return a(o, !0);
37 | if (i) return i(o, !0);
38 | var f = new Error("Cannot find module '" + o + "'");
39 | throw f.code = "MODULE_NOT_FOUND", f;
40 | }
41 | var l = n[o] = { exports: {} };
42 | t[o][0].call(
43 | l.exports,
44 | function (e) {
45 | var n = t[o][1][e];
46 | return s(n ? n : e);
47 | },
48 | l,
49 | l.exports,
50 | e,
51 | t,
52 | n,
53 | r,
54 | );
55 | }
56 | return n[o].exports;
57 | }
58 | var i = typeof require == "function" && require;
59 | for (var o = 0; o < r.length; o++) s(r[o]);
60 | return s;
61 | })(
62 | {
63 | 1: [function (require, module, exports) {
64 | "use strict";
65 | function debug(e, n) {
66 | n = n || {};
67 | var t = n.debug || globalOptions.debug;
68 | t && console.log("[sw-toolbox] " + e);
69 | }
70 | function openCache(e) {
71 | var n;
72 | return e && e.cache && (n = e.cache.name),
73 | n = n || globalOptions.cache.name,
74 | caches.open(n);
75 | }
76 | function fetchAndCache(e, n) {
77 | n = n || {};
78 | var t = n.successResponses || globalOptions.successResponses;
79 | return fetch(e.clone()).then(function (c) {
80 | return "GET" === e.method && t.test(c.status) &&
81 | openCache(n).then(function (t) {
82 | t.put(e, c).then(function () {
83 | var c = n.cache || globalOptions.cache;
84 | (c.maxEntries || c.maxAgeSeconds) && c.name &&
85 | queueCacheExpiration(e, t, c);
86 | });
87 | }),
88 | c.clone();
89 | });
90 | }
91 | function queueCacheExpiration(e, n, t) {
92 | var c = cleanupCache.bind(null, e, n, t);
93 | cleanupQueue = cleanupQueue ? cleanupQueue.then(c) : c();
94 | }
95 | function cleanupCache(e, n, t) {
96 | var c = e.url,
97 | a = t.maxAgeSeconds,
98 | u = t.maxEntries,
99 | o = t.name,
100 | r = Date.now();
101 | return debug(
102 | "Updating LRU order for " + c + ". Max entries is " + u +
103 | ", max age is " + a,
104 | ),
105 | idbCacheExpiration.getDb(o).then(function (e) {
106 | return idbCacheExpiration.setTimestampForUrl(e, c, r);
107 | }).then(function (e) {
108 | return idbCacheExpiration.expireEntries(e, u, a, r);
109 | }).then(function (e) {
110 | debug("Successfully updated IDB.");
111 | var t = e.map(function (e) {
112 | return n["delete"](e);
113 | });
114 | return Promise.all(t).then(function () {
115 | debug("Done with cache cleanup.");
116 | });
117 | })["catch"](function (e) {
118 | debug(e);
119 | });
120 | }
121 | function renameCache(e, n, t) {
122 | return debug("Renaming cache: [" + e + "] to [" + n + "]", t),
123 | caches["delete"](n).then(function () {
124 | return Promise.all([caches.open(e), caches.open(n)]).then(
125 | function (n) {
126 | var t = n[0], c = n[1];
127 | return t.keys().then(function (e) {
128 | return Promise.all(e.map(function (e) {
129 | return t.match(e).then(function (n) {
130 | return c.put(e, n);
131 | });
132 | }));
133 | }).then(function () {
134 | return caches["delete"](e);
135 | });
136 | },
137 | );
138 | });
139 | }
140 | var globalOptions = require("./options"),
141 | idbCacheExpiration = require("./idb-cache-expiration"),
142 | cleanupQueue;
143 | module.exports = {
144 | debug: debug,
145 | fetchAndCache: fetchAndCache,
146 | openCache: openCache,
147 | renameCache: renameCache,
148 | };
149 | }, { "./idb-cache-expiration": 2, "./options": 3 }],
150 | 2: [function (require, module, exports) {
151 | "use strict";
152 | function openDb(e) {
153 | return new Promise(function (r, n) {
154 | var t = indexedDB.open(DB_PREFIX + e, DB_VERSION);
155 | t.onupgradeneeded = function () {
156 | var e = t.result.createObjectStore(STORE_NAME, {
157 | keyPath: URL_PROPERTY,
158 | });
159 | e.createIndex(TIMESTAMP_PROPERTY, TIMESTAMP_PROPERTY, {
160 | unique: !1,
161 | });
162 | },
163 | t.onsuccess = function () {
164 | r(t.result);
165 | },
166 | t.onerror = function () {
167 | n(t.error);
168 | };
169 | });
170 | }
171 | function getDb(e) {
172 | return e in cacheNameToDbPromise ||
173 | (cacheNameToDbPromise[e] = openDb(e)),
174 | cacheNameToDbPromise[e];
175 | }
176 | function setTimestampForUrl(e, r, n) {
177 | return new Promise(function (t, o) {
178 | var i = e.transaction(STORE_NAME, "readwrite"),
179 | u = i.objectStore(STORE_NAME);
180 | u.put({ url: r, timestamp: n }),
181 | i.oncomplete = function () {
182 | t(e);
183 | },
184 | i.onabort = function () {
185 | o(i.error);
186 | };
187 | });
188 | }
189 | function expireOldEntries(e, r, n) {
190 | return r
191 | ? new Promise(function (t, o) {
192 | var i = 1e3 * r,
193 | u = [],
194 | c = e.transaction(STORE_NAME, "readwrite"),
195 | s = c.objectStore(STORE_NAME),
196 | a = s.index(TIMESTAMP_PROPERTY);
197 | a.openCursor().onsuccess = function (e) {
198 | var r = e.target.result;
199 | if (r && n - i > r.value[TIMESTAMP_PROPERTY]) {
200 | var t = r.value[URL_PROPERTY];
201 | u.push(t), s["delete"](t), r["continue"]();
202 | }
203 | },
204 | c.oncomplete = function () {
205 | t(u);
206 | },
207 | c.onabort = o;
208 | })
209 | : Promise.resolve([]);
210 | }
211 | function expireExtraEntries(e, r) {
212 | return r
213 | ? new Promise(function (n, t) {
214 | var o = [],
215 | i = e.transaction(STORE_NAME, "readwrite"),
216 | u = i.objectStore(STORE_NAME),
217 | c = u.index(TIMESTAMP_PROPERTY),
218 | s = c.count();
219 | c.count().onsuccess = function () {
220 | var e = s.result;
221 | e > r && (c.openCursor().onsuccess = function (n) {
222 | var t = n.target.result;
223 | if (t) {
224 | var i = t.value[URL_PROPERTY];
225 | o.push(i),
226 | u["delete"](i),
227 | e - o.length > r && t["continue"]();
228 | }
229 | });
230 | },
231 | i.oncomplete = function () {
232 | n(o);
233 | },
234 | i.onabort = t;
235 | })
236 | : Promise.resolve([]);
237 | }
238 | function expireEntries(e, r, n, t) {
239 | return expireOldEntries(e, n, t).then(function (n) {
240 | return expireExtraEntries(e, r).then(function (e) {
241 | return n.concat(e);
242 | });
243 | });
244 | }
245 | var DB_PREFIX = "sw-toolbox-",
246 | DB_VERSION = 1,
247 | STORE_NAME = "store",
248 | URL_PROPERTY = "url",
249 | TIMESTAMP_PROPERTY = "timestamp",
250 | cacheNameToDbPromise = {};
251 | module.exports = {
252 | getDb: getDb,
253 | setTimestampForUrl: setTimestampForUrl,
254 | expireEntries: expireEntries,
255 | };
256 | }, {}],
257 | 3: [function (require, module, exports) {
258 | "use strict";
259 | var scope;
260 | scope = self.registration
261 | ? self.registration.scope
262 | : self.scope || new URL("./", self.location).href,
263 | module.exports = {
264 | cache: {
265 | name: "$$$toolbox-cache$$$" + scope + "$$$",
266 | maxAgeSeconds: null,
267 | maxEntries: null,
268 | },
269 | debug: !1,
270 | networkTimeoutSeconds: null,
271 | preCacheItems: [],
272 | successResponses: /^0|([123]\d\d)|(40[14567])|410$/,
273 | };
274 | }, {}],
275 | 4: [function (require, module, exports) {
276 | "use strict";
277 | var url = new URL("./", self.location),
278 | basePath = url.pathname,
279 | pathRegexp = require("path-to-regexp"),
280 | Route = function (e, t, i, s) {
281 | t instanceof RegExp
282 | ? this.fullUrlRegExp = t
283 | : (0 !== t.indexOf("/") && (t = basePath + t),
284 | this.keys = [],
285 | this.regexp = pathRegexp(t, this.keys)),
286 | this.method = e,
287 | this.options = s,
288 | this.handler = i;
289 | };
290 | Route.prototype.makeHandler = function (e) {
291 | var t;
292 | if (this.regexp) {
293 | var i = this.regexp.exec(e);
294 | t = {},
295 | this.keys.forEach(function (e, s) {
296 | t[e.name] = i[s + 1];
297 | });
298 | }
299 | return function (e) {
300 | return this.handler(e, t, this.options);
301 | }.bind(this);
302 | }, module.exports = Route;
303 | }, { "path-to-regexp": 14 }],
304 | 5: [function (require, module, exports) {
305 | "use strict";
306 | function regexEscape(e) {
307 | return e.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
308 | }
309 | var Route = require("./route"),
310 | keyMatch = function (e, t) {
311 | for (var r = e.entries(), o = r.next(), n = []; !o.done;) {
312 | var u = new RegExp(o.value[0]);
313 | u.test(t) && n.push(o.value[1]), o = r.next();
314 | }
315 | return n;
316 | },
317 | Router = function () {
318 | this.routes = new Map(),
319 | this.routes.set(RegExp, new Map()),
320 | this["default"] = null;
321 | };
322 | ["get", "post", "put", "delete", "head", "any"].forEach(function (e) {
323 | Router.prototype[e] = function (t, r, o) {
324 | return this.add(e, t, r, o);
325 | };
326 | }),
327 | Router.prototype.add = function (e, t, r, o) {
328 | o = o || {};
329 | var n;
330 | t instanceof RegExp
331 | ? n = RegExp
332 | : (n = o.origin || self.location.origin,
333 | n = n instanceof RegExp ? n.source : regexEscape(n)),
334 | e = e.toLowerCase();
335 | var u = new Route(e, t, r, o);
336 | this.routes.has(n) || this.routes.set(n, new Map());
337 | var a = this.routes.get(n);
338 | a.has(e) || a.set(e, new Map());
339 | var s = a.get(e), i = u.regexp || u.fullUrlRegExp;
340 | s.set(i.source, u);
341 | },
342 | Router.prototype.matchMethod = function (e, t) {
343 | var r = new URL(t), o = r.origin, n = r.pathname;
344 | return this._match(e, keyMatch(this.routes, o), n) ||
345 | this._match(e, [this.routes.get(RegExp)], t);
346 | },
347 | Router.prototype._match = function (e, t, r) {
348 | if (0 === t.length) return null;
349 | for (var o = 0; o < t.length; o++) {
350 | var n = t[o], u = n && n.get(e.toLowerCase());
351 | if (u) {
352 | var a = keyMatch(u, r);
353 | if (a.length > 0) return a[0].makeHandler(r);
354 | }
355 | }
356 | return null;
357 | },
358 | Router.prototype.match = function (e) {
359 | return this.matchMethod(e.method, e.url) ||
360 | this.matchMethod("any", e.url);
361 | },
362 | module.exports = new Router();
363 | }, { "./route": 4 }],
364 | 6: [function (require, module, exports) {
365 | "use strict";
366 | function cacheFirst(e, r, t) {
367 | return helpers.debug("Strategy: cache first [" + e.url + "]", t),
368 | helpers.openCache(t).then(function (r) {
369 | return r.match(e).then(function (r) {
370 | return r ? r : helpers.fetchAndCache(e, t);
371 | });
372 | });
373 | }
374 | var helpers = require("../helpers");
375 | module.exports = cacheFirst;
376 | }, { "../helpers": 1 }],
377 | 7: [function (require, module, exports) {
378 | "use strict";
379 | function cacheOnly(e, r, c) {
380 | return helpers.debug("Strategy: cache only [" + e.url + "]", c),
381 | helpers.openCache(c).then(function (r) {
382 | return r.match(e);
383 | });
384 | }
385 | var helpers = require("../helpers");
386 | module.exports = cacheOnly;
387 | }, { "../helpers": 1 }],
388 | 8: [function (require, module, exports) {
389 | "use strict";
390 | function fastest(e, n, t) {
391 | return helpers.debug("Strategy: fastest [" + e.url + "]", t),
392 | new Promise(function (r, s) {
393 | var c = !1,
394 | o = [],
395 | a = function (e) {
396 | o.push(e.toString()),
397 | c
398 | ? s(
399 | new Error(
400 | 'Both cache and network failed: "' + o.join('", "') +
401 | '"',
402 | ),
403 | )
404 | : c = !0;
405 | },
406 | h = function (e) {
407 | e instanceof Response ? r(e) : a("No result returned");
408 | };
409 | helpers.fetchAndCache(e.clone(), t).then(h, a),
410 | cacheOnly(e, n, t).then(h, a);
411 | });
412 | }
413 | var helpers = require("../helpers"), cacheOnly = require("./cacheOnly");
414 | module.exports = fastest;
415 | }, { "../helpers": 1, "./cacheOnly": 7 }],
416 | 9: [function (require, module, exports) {
417 | module.exports = {
418 | networkOnly: require("./networkOnly"),
419 | networkFirst: require("./networkFirst"),
420 | cacheOnly: require("./cacheOnly"),
421 | cacheFirst: require("./cacheFirst"),
422 | fastest: require("./fastest"),
423 | };
424 | }, {
425 | "./cacheFirst": 6,
426 | "./cacheOnly": 7,
427 | "./fastest": 8,
428 | "./networkFirst": 10,
429 | "./networkOnly": 11,
430 | }],
431 | 10: [function (require, module, exports) {
432 | "use strict";
433 | function networkFirst(e, r, t) {
434 | t = t || {};
435 | var s = t.successResponses || globalOptions.successResponses,
436 | n = t.networkTimeoutSeconds || globalOptions.networkTimeoutSeconds;
437 | return helpers.debug("Strategy: network first [" + e.url + "]", t),
438 | helpers.openCache(t).then(function (r) {
439 | var o, u, i = [];
440 | if (n) {
441 | var c = new Promise(function (t) {
442 | o = setTimeout(function () {
443 | r.match(e).then(function (e) {
444 | e && t(e);
445 | });
446 | }, 1e3 * n);
447 | });
448 | i.push(c);
449 | }
450 | var a = helpers.fetchAndCache(e, t).then(function (e) {
451 | if (o && clearTimeout(o), s.test(e.status)) return e;
452 | throw helpers.debug(
453 | "Response was an HTTP error: " + e.statusText,
454 | t,
455 | ),
456 | u = e,
457 | new Error("Bad response");
458 | })["catch"](function (s) {
459 | return helpers.debug(
460 | "Network or response error, fallback to cache [" + e.url +
461 | "]",
462 | t,
463 | ),
464 | r.match(e).then(function (e) {
465 | if (e) return e;
466 | if (u) return u;
467 | throw s;
468 | });
469 | });
470 | return i.push(a), Promise.race(i);
471 | });
472 | }
473 | var globalOptions = require("../options"),
474 | helpers = require("../helpers");
475 | module.exports = networkFirst;
476 | }, { "../helpers": 1, "../options": 3 }],
477 | 11: [function (require, module, exports) {
478 | "use strict";
479 | function networkOnly(e, r, t) {
480 | return helpers.debug("Strategy: network only [" + e.url + "]", t),
481 | fetch(e);
482 | }
483 | var helpers = require("../helpers");
484 | module.exports = networkOnly;
485 | }, { "../helpers": 1 }],
486 | 12: [function (require, module, exports) {
487 | "use strict";
488 | function cache(e, t) {
489 | return helpers.openCache(t).then(function (t) {
490 | return t.add(e);
491 | });
492 | }
493 | function uncache(e, t) {
494 | return helpers.openCache(t).then(function (t) {
495 | return t["delete"](e);
496 | });
497 | }
498 | function precache(e) {
499 | e instanceof Promise || validatePrecacheInput(e),
500 | options.preCacheItems = options.preCacheItems.concat(e);
501 | }
502 | require("serviceworker-cache-polyfill");
503 | var options = require("./options"),
504 | router = require("./router"),
505 | helpers = require("./helpers"),
506 | strategies = require("./strategies");
507 | helpers.debug("Service Worker Toolbox is loading");
508 | var flatten = function (e) {
509 | return e.reduce(function (e, t) {
510 | return e.concat(t);
511 | }, []);
512 | },
513 | validatePrecacheInput = function (e) {
514 | var t = Array.isArray(e);
515 | if (
516 | t && e.forEach(function (e) {
517 | "string" == typeof e || e instanceof Request || (t = !1);
518 | }), !t
519 | ) {
520 | throw new TypeError(
521 | "The precache method expects either an array of strings and/or Requests or a Promise that resolves to an array of strings and/or Requests.",
522 | );
523 | }
524 | return e;
525 | };
526 | self.addEventListener("install", function (e) {
527 | var t = options.cache.name + "$$$inactive$$$";
528 | helpers.debug("install event fired"),
529 | helpers.debug("creating cache [" + t + "]"),
530 | e.waitUntil(
531 | helpers.openCache({ cache: { name: t } }).then(function (e) {
532 | return Promise.all(options.preCacheItems).then(flatten).then(
533 | validatePrecacheInput,
534 | ).then(function (t) {
535 | return helpers.debug(
536 | "preCache list: " + (t.join(", ") || "(none)"),
537 | ),
538 | e.addAll(t);
539 | });
540 | }),
541 | );
542 | }),
543 | self.addEventListener("activate", function (e) {
544 | helpers.debug("activate event fired");
545 | var t = options.cache.name + "$$$inactive$$$";
546 | e.waitUntil(helpers.renameCache(t, options.cache.name));
547 | }),
548 | self.addEventListener("fetch", function (e) {
549 | var t = router.match(e.request);
550 | t
551 | ? e.respondWith(t(e.request))
552 | : router["default"] && "GET" === e.request.method &&
553 | e.respondWith(router["default"](e.request));
554 | }),
555 | module.exports = {
556 | networkOnly: strategies.networkOnly,
557 | networkFirst: strategies.networkFirst,
558 | cacheOnly: strategies.cacheOnly,
559 | cacheFirst: strategies.cacheFirst,
560 | fastest: strategies.fastest,
561 | router: router,
562 | options: options,
563 | cache: cache,
564 | uncache: uncache,
565 | precache: precache,
566 | };
567 | }, {
568 | "./helpers": 1,
569 | "./options": 3,
570 | "./router": 5,
571 | "./strategies": 9,
572 | "serviceworker-cache-polyfill": 15,
573 | }],
574 | 13: [function (require, module, exports) {
575 | module.exports = Array.isArray || function (r) {
576 | return "[object Array]" == Object.prototype.toString.call(r);
577 | };
578 | }, {}],
579 | 14: [function (require, module, exports) {
580 | function parse(e) {
581 | for (
582 | var t, r = [], n = 0, o = 0, a = "";
583 | null != (t = PATH_REGEXP.exec(e));
584 | ) {
585 | var p = t[0], i = t[1], s = t.index;
586 | if (a += e.slice(o, s), o = s + p.length, i) a += i[1];
587 | else {
588 | var c = e[o],
589 | u = t[2],
590 | l = t[3],
591 | f = t[4],
592 | g = t[5],
593 | x = t[6],
594 | h = t[7];
595 | a && (r.push(a), a = "");
596 | var d = null != u && null != c && c !== u,
597 | y = "+" === x || "*" === x,
598 | m = "?" === x || "*" === x,
599 | R = t[2] || "/",
600 | T = f || g || (h ? ".*" : "[^" + R + "]+?");
601 | r.push({
602 | name: l || n++,
603 | prefix: u || "",
604 | delimiter: R,
605 | optional: m,
606 | repeat: y,
607 | partial: d,
608 | asterisk: !!h,
609 | pattern: escapeGroup(T),
610 | });
611 | }
612 | }
613 | return o < e.length && (a += e.substr(o)), a && r.push(a), r;
614 | }
615 | function compile(e) {
616 | return tokensToFunction(parse(e));
617 | }
618 | function encodeURIComponentPretty(e) {
619 | return encodeURI(e).replace(/[\/?#]/g, function (e) {
620 | return "%" + e.charCodeAt(0).toString(16).toUpperCase();
621 | });
622 | }
623 | function encodeAsterisk(e) {
624 | return encodeURI(e).replace(/[?#]/g, function (e) {
625 | return "%" + e.charCodeAt(0).toString(16).toUpperCase();
626 | });
627 | }
628 | function tokensToFunction(e) {
629 | for (var t = new Array(e.length), r = 0; r < e.length; r++) {
630 | "object" == typeof e[r] &&
631 | (t[r] = new RegExp("^(?:" + e[r].pattern + ")$"));
632 | }
633 | return function (r, n) {
634 | for (
635 | var o = "",
636 | a = r || {},
637 | p = n || {},
638 | i = p.pretty ? encodeURIComponentPretty : encodeURIComponent,
639 | s = 0;
640 | s < e.length;
641 | s++
642 | ) {
643 | var c = e[s];
644 | if ("string" != typeof c) {
645 | var u, l = a[c.name];
646 | if (null == l) {
647 | if (c.optional) {
648 | c.partial && (o += c.prefix);
649 | continue;
650 | }
651 | throw new TypeError(
652 | 'Expected "' + c.name + '" to be defined',
653 | );
654 | }
655 | if (isarray(l)) {
656 | if (!c.repeat) {
657 | throw new TypeError(
658 | 'Expected "' + c.name +
659 | '" to not repeat, but received `' + JSON.stringify(l) +
660 | "`",
661 | );
662 | }
663 | if (0 === l.length) {
664 | if (c.optional) continue;
665 | throw new TypeError(
666 | 'Expected "' + c.name + '" to not be empty',
667 | );
668 | }
669 | for (var f = 0; f < l.length; f++) {
670 | if (u = i(l[f]), !t[s].test(u)) {
671 | throw new TypeError(
672 | 'Expected all "' + c.name + '" to match "' + c.pattern +
673 | '", but received `' + JSON.stringify(u) + "`",
674 | );
675 | }
676 | o += (0 === f ? c.prefix : c.delimiter) + u;
677 | }
678 | } else {
679 | if (
680 | u = c.asterisk ? encodeAsterisk(l) : i(l), !t[s].test(u)
681 | ) {
682 | throw new TypeError(
683 | 'Expected "' + c.name + '" to match "' + c.pattern +
684 | '", but received "' + u + '"',
685 | );
686 | }
687 | o += c.prefix + u;
688 | }
689 | } else o += c;
690 | }
691 | return o;
692 | };
693 | }
694 | function escapeString(e) {
695 | return e.replace(/([.+*?=^!:${}()[\]|\/])/g, "\\$1");
696 | }
697 | function escapeGroup(e) {
698 | return e.replace(/([=!:$\/()])/g, "\\$1");
699 | }
700 | function attachKeys(e, t) {
701 | return e.keys = t, e;
702 | }
703 | function flags(e) {
704 | return e.sensitive ? "" : "i";
705 | }
706 | function regexpToRegexp(e, t) {
707 | var r = e.source.match(/\((?!\?)/g);
708 | if (r) {
709 | for (var n = 0; n < r.length; n++) {
710 | t.push({
711 | name: n,
712 | prefix: null,
713 | delimiter: null,
714 | optional: !1,
715 | repeat: !1,
716 | partial: !1,
717 | asterisk: !1,
718 | pattern: null,
719 | });
720 | }
721 | }
722 | return attachKeys(e, t);
723 | }
724 | function arrayToRegexp(e, t, r) {
725 | for (var n = [], o = 0; o < e.length; o++) {
726 | n.push(pathToRegexp(e[o], t, r).source);
727 | }
728 | var a = new RegExp("(?:" + n.join("|") + ")", flags(r));
729 | return attachKeys(a, t);
730 | }
731 | function stringToRegexp(e, t, r) {
732 | for (
733 | var n = parse(e), o = tokensToRegExp(n, r), a = 0;
734 | a < n.length;
735 | a++
736 | ) {
737 | "string" != typeof n[a] && t.push(n[a]);
738 | }
739 | return attachKeys(o, t);
740 | }
741 | function tokensToRegExp(e, t) {
742 | t = t || {};
743 | for (
744 | var r = t.strict,
745 | n = t.end !== !1,
746 | o = "",
747 | a = e[e.length - 1],
748 | p = "string" == typeof a && /\/$/.test(a),
749 | i = 0;
750 | i < e.length;
751 | i++
752 | ) {
753 | var s = e[i];
754 | if ("string" == typeof s) o += escapeString(s);
755 | else {
756 | var c = escapeString(s.prefix), u = "(?:" + s.pattern + ")";
757 | s.repeat && (u += "(?:" + c + u + ")*"),
758 | u = s.optional
759 | ? s.partial ? c + "(" + u + ")?" : "(?:" + c + "(" + u + "))?"
760 | : c + "(" + u + ")",
761 | o += u;
762 | }
763 | }
764 | return r || (o = (p ? o.slice(0, -2) : o) + "(?:\\/(?=$))?"),
765 | o += n ? "$" : r && p ? "" : "(?=\\/|$)",
766 | new RegExp("^" + o, flags(t));
767 | }
768 | function pathToRegexp(e, t, r) {
769 | return t = t || [],
770 | isarray(t) ? r || (r = {}) : (r = t, t = []),
771 | e instanceof RegExp
772 | ? regexpToRegexp(e, t)
773 | : isarray(e)
774 | ? arrayToRegexp(e, t, r)
775 | : stringToRegexp(e, t, r);
776 | }
777 | var isarray = require("isarray");
778 | module.exports = pathToRegexp,
779 | module.exports.parse = parse,
780 | module.exports.compile = compile,
781 | module.exports.tokensToFunction = tokensToFunction,
782 | module.exports.tokensToRegExp = tokensToRegExp;
783 | var PATH_REGEXP = new RegExp(
784 | [
785 | "(\\\\.)",
786 | "([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^()])+)\\))?|\\(((?:\\\\.|[^()])+)\\))([+*?])?|(\\*))",
787 | ].join("|"),
788 | "g",
789 | );
790 | }, { "isarray": 13 }],
791 | 15: [function (require, module, exports) {
792 | !function () {
793 | var t = Cache.prototype.addAll,
794 | e = navigator.userAgent.match(/(Firefox|Chrome)\/(\d+\.)/);
795 | if (e) var r = e[1], n = parseInt(e[2]);
796 | t &&
797 | (!e || "Firefox" === r && n >= 46 || "Chrome" === r && n >= 50) ||
798 | (Cache.prototype.addAll = function (t) {
799 | function e(t) {
800 | this.name = "NetworkError", this.code = 19, this.message = t;
801 | }
802 | var r = this;
803 | return e.prototype = Object.create(Error.prototype),
804 | Promise.resolve().then(function () {
805 | if (arguments.length < 1) throw new TypeError();
806 | return t = t.map(function (t) {
807 | return t instanceof Request ? t : String(t);
808 | }),
809 | Promise.all(t.map(function (t) {
810 | "string" == typeof t && (t = new Request(t));
811 | var r = new URL(t.url).protocol;
812 | if ("http:" !== r && "https:" !== r) {
813 | throw new e("Invalid scheme");
814 | }
815 | return fetch(t.clone());
816 | }));
817 | }).then(function (n) {
818 | if (
819 | n.some(function (t) {
820 | return !t.ok;
821 | })
822 | ) {
823 | throw new e("Incorrect response status");
824 | }
825 | return Promise.all(n.map(function (e, n) {
826 | return r.put(t[n], e);
827 | }));
828 | }).then(function () {});
829 | },
830 | Cache.prototype.add = function (t) {
831 | return this.addAll([t]);
832 | });
833 | }();
834 | }, {}],
835 | },
836 | {},
837 | [12],
838 | )(12);
839 | });
840 |
841 | //# sourceMappingURL=./build/sw-toolbox.map.json
842 |
--------------------------------------------------------------------------------
/src/files/sw.js:
--------------------------------------------------------------------------------
1 | self.importScripts("sw-toolbox.js");
2 |
3 | self.toolbox.options.debug = true;
4 |
5 | self.toolbox.router.default = self.toolbox.fastest;
6 |
7 | self.addEventListener("install", function (event) {
8 | event.waitUntil(self.skipWaiting());
9 | });
10 |
11 | self.addEventListener("activate", function (event) {
12 | event.waitUntil(self.clients.claim());
13 | });
14 |
--------------------------------------------------------------------------------
/src/index.yml:
--------------------------------------------------------------------------------
1 | layout: layout.eta
2 | title: jQuery Cheat Sheet
3 | description: jQuery cheat sheet in HTML with links to the original API documentation. Created by Oscar Otero
4 | author: Oscar Otero - https://oscarotero.com
5 | keywords: jQuery, javascript, cheatsheet, api, resource, web developer
6 | twitter: "@misteroom"
7 |
8 | versions:
9 | - name: "3.5"
10 | value: "3.5"
11 |
12 | - name: "3.4"
13 | value: "3.4"
14 |
15 | - name: "3.3"
16 | value: "3.3"
17 |
18 | - name: "3.2"
19 | value: "3.2"
20 |
21 | - name: "3.1"
22 | value: "3.1"
23 |
24 | - name: "3.0"
25 | value: "3.0"
26 |
27 | - name: "1.10 / 2.0"
28 | value: "1.10"
29 |
30 | - name: "1.9"
31 | value: "1.9"
32 |
33 | - name: "1.8"
34 | value: "1.8"
35 |
36 | - name: "1.7"
37 | value: "1.7"
38 |
39 | - name: "1.6"
40 | value: "1.6"
41 |
42 | - name: "1.5"
43 | value: "1.5"
44 |
45 | - name: "1.4.4"
46 | value: "1.4.4"
47 |
48 | - name: "1.4.3"
49 | value: "1.4.3"
50 |
51 | - name: "1.4.2"
52 | value: "1.4.2"
53 |
54 | - name: "1.4.1"
55 | value: "1.4.1"
56 |
57 | - name: "1.4"
58 | value: "1.4"
59 |
60 | - name: "1.3"
61 | value: "1.3"
62 |
63 | - name: "1.2.6"
64 | value: "1.2.6"
65 |
66 | - name: "1.2.3"
67 | value: "1.2.3"
68 |
69 | - name: "1.2"
70 | value: "1.2"
71 |
72 | - name: "1.1.3"
73 | value: "1.1.3"
74 |
75 | - name: "1.1.2"
76 | value: "1.1.2"
77 |
78 | - name: "1.1"
79 | value: "1.1"
80 |
81 | - name: "1.0.4"
82 | value: "1.0.4"
83 |
84 | - name: "1.0"
85 | value: "1.0"
86 |
87 | sections:
88 | - title: Selectors
89 | slug: selectors
90 | sections:
91 |
92 | - title: Basics
93 | items:
94 |
95 | - text: "*"
96 | title: Selects all elements.
97 | doc: all-selector
98 | from: "1.0"
99 |
100 | - text: .class
101 | title: Selects all elements with the given class.
102 | doc: class-selector
103 | from: "1.0"
104 |
105 | - text: element
106 | title: Selects all elements with the given tag name.
107 | doc: element-selector
108 | from: "1.0"
109 |
110 | - text: "#id"
111 | title: Selects a single element with the given id attribute.
112 | doc: id-selector
113 | from: "1.0"
114 |
115 | - text: "selector1, selectorN, ..."
116 | title: Selects the combined results of all the specified selectors.
117 | doc: multiple-selector
118 | from: "1.0"
119 |
120 | - title: Hierarchy
121 | items:
122 |
123 | - text: "parent > child"
124 | title: Selects all direct child elements specified by 'child' of elements specified by 'parent'.
125 | doc: child-selector
126 | from: "1.0"
127 |
128 | - text: ancestor descendant
129 | title: Selects all elements that are descendants of a given ancestor.
130 | doc: descendant-selector
131 | from: "1.0"
132 |
133 | - text: prev + next
134 | title: Selects all next elements matching 'next' that are immediately preceded by a sibling 'prev'.
135 | doc: next-adjacent-Selector
136 | from: "1.0"
137 |
138 | - text: prev ~ siblings
139 | title: "Selects all sibling elements that follow after the 'prev' element, have the same parent, and match the filtering 'siblings' selector."
140 | doc: next-siblings-selector
141 | from: "1.0"
142 |
143 | - title: Basic Filters
144 | autosort: true
145 | items:
146 |
147 | - text: :animated
148 | title: Select all elements that are in the progress of an animation at the time the selector is run.
149 | doc: animated-selector
150 | from: "1.2"
151 |
152 | - text: :eq()
153 | title: Select the element at index n within the matched set.
154 | doc: eq-selector
155 | from: "1.0"
156 | deprecated: "3.4"
157 |
158 | - text: :even
159 | title: "Selects even elements, zero-indexed. See also odd."
160 | doc: even-selector
161 | from: "1.0"
162 | deprecated: "3.4"
163 |
164 | - text: :first
165 | title: Selects the first matched element.
166 | doc: first-selector
167 | from: "1.0"
168 | deprecated: "3.4"
169 |
170 | - text: :gt()
171 | title: Select all elements at an index greater than index within the matched set.
172 | doc: gt-selector
173 | from: "1.0"
174 | deprecated: "3.4"
175 |
176 | - text: :header
177 | title: "Selects all elements that are headers, like h1, h2, h3 and so on."
178 | doc: header-selector
179 | from: "1.2"
180 |
181 | - text: :lang()
182 | title: Selects all elements of the specified language.
183 | doc: lang-selector
184 | from: "1.9"
185 |
186 | - text: :last
187 | title: Selects the last matched element.
188 | doc: last-selector
189 | from: "1.0"
190 | deprecated: "3.4"
191 |
192 | - text: :lt()
193 | title: Select all elements at an index less than index within the matched set.
194 | doc: lt-selector
195 | from: "1.0"
196 | deprecated: "3.4"
197 |
198 | - text: :not()
199 | title: Selects all elements that do not match the given selector.
200 | doc: not-selector
201 | from: "1.0"
202 |
203 | - text: :odd
204 | title: "Selects odd elements, zero-indexed. See also even."
205 | doc: odd-selector
206 | from: "1.0"
207 | deprecated: "3.4"
208 |
209 | - text: :root
210 | title: Selects the element that is the root of the document.
211 | doc: root-selector
212 | from: "1.9"
213 |
214 | - text: :target
215 | title: Selects the target element indicated by the fragment identifier of the document's URI.
216 | doc: target-selector
217 | from: "1.9"
218 |
219 | - title: Content Filters
220 | autosort: true
221 | items:
222 |
223 | - text: :contains()
224 | title: Select all elements that contain the specified text.
225 | doc: contains-selector
226 | from: "1.1.4"
227 |
228 | - text: :empty
229 | title: Select all elements that have no children (including text nodes).
230 | doc: empty-selector
231 | from: "1.0"
232 |
233 | - text: :has()
234 | title: Selects elements which contain at least one element that matches the specified selector.
235 | doc: has-selector
236 | from: "1.1.4"
237 |
238 | - text: :parent
239 | title: "Select all elements that are the parent of another element, including text nodes."
240 | doc: parent-selector
241 | from: "1.0"
242 |
243 |
244 | - title: Visibility Filters
245 | break: true
246 | autosort: true
247 | items:
248 |
249 | - text: :hidden
250 | title: Selects all elements that are hidden.
251 | doc: hidden-selector
252 | from: "1.0"
253 |
254 | - text: :visible
255 | title: Selects all elements that are visible.
256 | doc: visible-selector
257 | from: "1.0"
258 |
259 | - title: Attribute
260 | items:
261 |
262 | - text: '[name|="value"]'
263 | title: Selects elements that have the specified attribute with a value either equal to a given string or starting with that string followed by a hyphen (-).
264 | doc: attribute-contains-prefix-selector
265 | from: "1.0"
266 |
267 | - text: '[name*="value"]'
268 | title: Selects elements that have the specified attribute with a value containing the a given substring.
269 | doc: attribute-contains-selector
270 | from: "1.0"
271 |
272 | - text: '[name~="value"]'
273 | title: "Selects elements that have the specified attribute with a value containing a given word, delimited by spaces."
274 | doc: attribute-contains-word-selector
275 | from: "1.0"
276 |
277 | - text: '[name$="value"]'
278 | title: Selects elements that have the specified attribute with a value ending exactly with a given string. The comparison is case sensitive.
279 | doc: attribute-ends-with-selector
280 | from: "1.0"
281 |
282 | - text: '[name="value"]'
283 | title: Selects elements that have the specified attribute with a value exactly equal to a certain value.
284 | doc: attribute-equals-selector
285 | from: "1.0"
286 |
287 | - text: '[name!="value"]'
288 | title: "Select elements that either don't have the specified attribute, or do have the specified attribute but not with a certain value."
289 | doc: attribute-not-equal-selector
290 | from: "1.0"
291 |
292 | - text: '[name^="value"]'
293 | title: Selects elements that have the specified attribute with a value beginning exactly with a given string.
294 | doc: attribute-starts-with-selector
295 | from: "1.0"
296 |
297 | - text: '[name]'
298 | title: "Selects elements that have the specified attribute, with any value."
299 | doc: has-attribute-selector
300 | from: "1.0"
301 |
302 | - text: '[name="value"][name2="value2"]'
303 | title: Matches elements that match all of the specified attribute filters.
304 | doc: multiple-attribute-selector
305 | from: "1.0"
306 |
307 | - title: Child Filters
308 | autosort: true
309 | items:
310 |
311 | - text: :first-child
312 | title: Selects all elements that are the first child of their parent.
313 | doc: first-child-selector
314 | from: "1.1.4"
315 |
316 | - text: :first-of-type
317 | title: Selects all elements that are the first among siblings of the same element name.
318 | doc: first-of-type-selector
319 | from: "1.9"
320 |
321 | - text: :last-child
322 | title: Selects all elements that are the last child of their parent.
323 | doc: last-child-selector
324 | from: "1.1.4"
325 |
326 | - text: :last-of-type
327 | title: Selects all elements that are the last among siblings of the same element name.
328 | doc: last-of-type-selector
329 | from: "1.9"
330 |
331 | - text: :nth-child()
332 | title: Selects all elements that are the nth-child of their parent.
333 | doc: nth-child-selector
334 | from: "1.1.4"
335 |
336 | - text: :nth-last-child()
337 | title: "Selects all elements that are the nth-child of their parent, counting from the last element to the first."
338 | doc: nth-last-child-selector
339 | from: "1.9"
340 |
341 | - text: :nth-last-of-type()
342 | title: "Selects all elements that are the nth-child of their parent, counting from the last element to the first."
343 | doc: nth-last-of-type-selector
344 | from: "1.9"
345 |
346 | - text: :nth-of-type()
347 | title: Selects all elements that are the nth child of their parent in relation to siblings with the same element name.
348 | doc: nth-of-type-selector
349 | from: "1.9"
350 |
351 | - text: :only-child
352 | title: Selects all elements that are the only child of their parent.
353 | doc: only-child-selector
354 | from: "1.1.4"
355 |
356 | - text: :only-of-type()
357 | title: Selects all elements that have no siblings with the same element name.
358 | doc: only-of-type-selector
359 | from: "1.9"
360 |
361 | - title: Forms
362 | break: true
363 | autosort: true
364 | items:
365 |
366 | - text: :button
367 | title: Selects all button elements and elements of type button.
368 | doc: button-selector
369 | from: "1.0"
370 |
371 | - text: :checkbox
372 | title: Selects all elements of type checkbox.
373 | doc: checkbox-selector
374 | from: "1.0"
375 |
376 | - text: :checked
377 | title: Matches all elements that are checked.
378 | doc: checked-selector
379 | from: "1.0"
380 |
381 | - text: :disabled
382 | title: Selects all elements that are disabled.
383 | doc: disabled-selector
384 | from: "1.0"
385 |
386 | - text: :enabled
387 | title: Selects all elements that are enabled.
388 | doc: enabled-selector
389 | from: "1.0"
390 |
391 | - text: :focus
392 | title: Selects element if it is currently focused.
393 | doc: focus-selector
394 | from: "1.6"
395 |
396 | - text: :file
397 | title: Selects all elements of type file.
398 | doc: file-selector
399 | from: "1.0"
400 |
401 | - text: :image
402 | title: Selects all elements of type image.
403 | doc: image-selector
404 | from: "1.0"
405 |
406 | - text: :input
407 | title: "Selects all input, textarea, select and button elements."
408 | doc: input-selector
409 | from: "1.0"
410 |
411 | - text: :password
412 | title: Selects all elements of type password.
413 | doc: password-selector
414 | from: "1.0"
415 |
416 | - text: :radio
417 | title: Selects all elements of type radio.
418 | doc: radio-selector
419 | from: "1.0"
420 |
421 | - text: :reset
422 | title: Selects all elements of type reset.
423 | doc: reset-selector
424 | from: "1.0"
425 |
426 | - text: :selected
427 | title: Selects all elements that are selected.
428 | doc: selected-selector
429 | from: "1.0"
430 |
431 | - text: :submit
432 | title: Selects all elements of type submit.
433 | doc: submit-selector
434 | from: "1.0"
435 |
436 | - text: :text
437 | title: Selects all elements of type text.
438 | doc: text-selector
439 | from: "1.0"
440 |
441 | - title: Attributes / CSS
442 | slug: attributes
443 | sections:
444 |
445 | - title: Attributes
446 | autosort: true
447 | items:
448 |
449 | - text: .attr()
450 | title: Get the value of an attribute for the first element in the set of matched elements or set one or more attributes for every matched element.
451 | doc: attr
452 | src: jQuery.fn.attr
453 | from: "1.0"
454 |
455 | - text: .prop()
456 | title: Get the value of a property for the first element in the set of matched elements or set one or more properties for every matched element.
457 | doc: prop
458 | src: jQuery.fn.prop
459 | from: "1.6"
460 |
461 | - text: .removeAttr()
462 | title: Remove an attribute from each element in the set of matched elements.
463 | doc: removeAttr
464 | src: jQuery.fn.removeAttr
465 | from: "1.0"
466 |
467 | - text: .removeProp()
468 | title: Remove a property for the set of matched elements.
469 | doc: removeProp
470 | src: jQuery.fn.removeProp
471 | from: "1.6"
472 |
473 | - text: .val()
474 | title: Get the current value of the first element in the set of matched elements or set the value of every matched element.
475 | doc: val
476 | src: jQuery.fn.val
477 | from: "1.0"
478 |
479 | - title: CSS
480 | autosort: true
481 | items:
482 |
483 | - text: .addClass()
484 | title: Adds the specified class(es) to each of the set of matched elements.
485 | doc: addClass
486 | src: jQuery.fn.addClass
487 | from: "1.0"
488 |
489 | - text: .css()
490 | title: Get the value of a style property for the first element in the set of matched elements or set one or more CSS properties for every matched element.
491 | doc: css
492 | src: jQuery.fn.css
493 | from: "1.0"
494 |
495 | - text: jQuery.cssHooks
496 | title: "Provides a way to hook directly into jQuery to override how particular CSS properties are retrieved or set. Amongst other uses, cssHooks can be used to create custom, browser-normalized properties for CSS3 features such as box-shadows and gradients."
497 | doc: jQuery.cssHooks
498 | src: jQuery.cssHooks
499 | from: "1.4.3"
500 |
501 | - text: jQuery.cssNumber
502 | title: "An object containing all CSS properties that may be used without a unit. The .css() method uses this object to see if it may append px to unitless values.."
503 | doc: jQuery.cssNumber
504 | src: jQuery.cssNumber
505 | from: "1.4.3"
506 |
507 | - text: jQuery.escapeSelector()
508 | title: "Escapes any character that has a special meaning in a CSS selector."
509 | doc: jQuery.escapeSelector
510 | src: jQuery.escapeSelector
511 | from: "3.0"
512 |
513 | - text: .hasClass()
514 | title: Determine whether any of the matched elements are assigned the given class.
515 | doc: hasClass
516 | src: jQuery.fn.hasClass
517 | from: "1.2"
518 |
519 | - text: .removeClass()
520 | title: "Remove a single class, multiple classes, or all classes from each element in the set of matched elements."
521 | doc: removeClass
522 | src: jQuery.fn.removeClass
523 | from: "1.0"
524 |
525 | - text: .toggleClass()
526 | title: "Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the switch argument."
527 | doc: toggleClass
528 | src: jQuery.fn.toggleClass
529 | from: "1.0"
530 |
531 | - title: Dimensions
532 | break: true
533 | autosort: true
534 | items:
535 |
536 | - text: .height()
537 | title: Get the current computed height for the first element in the set of matched elements or set the height of every matched element.
538 | doc: height
539 | src: jQuery.fn.height
540 | from: "1.0"
541 |
542 | - text: .innerHeight()
543 | title: "Get the current computed height for the first element in the set of matched elements, including padding but not border."
544 | doc: innerHeight
545 | src: jQuery.fn.innerHeight
546 | from: "1.2.6"
547 |
548 | - text: .innerWidth()
549 | title: "Get the current computed width for the first element in the set of matched elements, including padding but not border."
550 | doc: innerWidth
551 | src: jQuery.fn.innerWidth
552 | from: "1.2.6"
553 |
554 | - text: .outerHeight()
555 | title: "Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin."
556 | doc: outerHeight
557 | src: jQuery.fn.outerHeight
558 | from: "1.2.6"
559 |
560 | - text: .outerWidth()
561 | title: "Get the current computed width for the first element in the set of matched elements, including padding and border."
562 | doc: outerWidth
563 | src: jQuery.fn.outerWidth
564 | from: "1.2.6"
565 |
566 | - text: .width()
567 | title: Get the current computed width for the first element in the set of matched elements or set the width of every matched element.
568 | doc: width
569 | src: jQuery.fn.width
570 | from: "1.0"
571 |
572 | - title: Offset
573 | autosort: true
574 | items:
575 |
576 | - text: .offset()
577 | title: "Get the current coordinates of the first element, or set the coordinates of every element, in the set of matched elements, relative to the document."
578 | doc: offset
579 | src: jQuery.fn.offset
580 | from: "1.2"
581 |
582 | - text: .offsetParent()
583 | title: Get the closest ancestor element that is positioned.
584 | doc: offsetParent
585 | src: jQuery.fn.offsetParent
586 | from: "1.2.6"
587 |
588 | - text: .position()
589 | title: "Get the current coordinates of the first element in the set of matched elements, relative to the offset parent."
590 | doc: position
591 | src: jQuery.fn.position
592 | from: "1.2"
593 |
594 | - text: .scrollLeft()
595 | title: Get the current horizontal position of the scroll bar for the first element in the set of matched elements or set the horizontal position of the scroll bar for every matched element.
596 | doc: scrollLeft
597 | src: jQuery.fn.scrollLeft
598 | from: "1.2.6"
599 |
600 | - text: .scrollTop()
601 | title: Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element.
602 | doc: scrollTop
603 | src: jQuery.fn.scrollTop
604 | from: "1.2.6"
605 |
606 | - title: Data
607 | autosort: true
608 | items:
609 |
610 | - text: jQuery.data()
611 | title: Store arbitrary data associated with the specified element and/or return the value that was set.
612 | doc: jQuery.data
613 | src: jQuery.data
614 | from: "1.2.3"
615 |
616 | - text: .data()
617 | title: Store arbitrary data associated with the matched elements or return the value at the named data store for the first element in the set of matched elements.
618 | doc: data
619 | src: jQuery.fn.data
620 | from: "1.2.3"
621 |
622 | - text: jQuery.hasData()
623 | title: Determine whether an element has any jQuery data associated with it.
624 | doc: jQuery.hasData
625 | src: jQuery.hasData
626 | from: "1.5"
627 |
628 | - text: jQuery.removeData()
629 | title: Remove a previously-stored piece of data.
630 | doc: jQuery.removeData
631 | src: jQuery.removeData
632 | from: "1.2.3"
633 |
634 | - text: .removeData()
635 | title: Remove a previously-stored piece of data.
636 | doc: removeData
637 | src: jQuery.fn.removeData
638 | from: "1.2.3"
639 |
640 | - title: Manipulation
641 | slug: manipulation
642 | sections:
643 |
644 | - title: Copying
645 | autosort: true
646 | items:
647 |
648 | - text: .clone()
649 | title: Create a deep copy of the set of matched elements.
650 | doc: clone
651 | src: jQuery.fn.clone
652 | from: "1.0"
653 |
654 | - title: "DOM Insertion, Around"
655 | autosort: true
656 | items:
657 |
658 | - text: .wrap()
659 | title: Wrap an HTML structure around each element in the set of matched elements.
660 | doc: wrap
661 | src: jQuery.fn.wrap
662 | from: "1.0"
663 |
664 | - text: .wrapAll()
665 | title: Wrap an HTML structure around all elements in the set of matched elements.
666 | doc: wrapAll
667 | src: jQuery.fn.wrapAll
668 | from: "1.2"
669 |
670 | - text: .wrapInner()
671 | title: Wrap an HTML structure around the content of each element in the set of matched elements.
672 | doc: wrapInner
673 | src: jQuery.fn.wrapInner
674 | from: "1.2"
675 |
676 | - title: "DOM Insertion, Inside"
677 | autosort: true
678 | items:
679 |
680 | - text: .append()
681 | title: "Insert content, specified by the parameter, to the end of each element in the set of matched elements."
682 | doc: append
683 | src: jQuery.fn.append
684 | from: "1.0"
685 |
686 | - text: .appendTo()
687 | title: Insert every element in the set of matched elements to the end of the target.
688 | doc: appendTo
689 | src: jQuery.fn.appendTo
690 | from: "1.0"
691 |
692 | - text: .html()
693 | title: Get the HTML contents of the first element in the set of matched elements or set the HTML contents of every matched element.
694 | doc: html
695 | src: jQuery.fn.html
696 | from: "1.0"
697 |
698 | - text: .prepend()
699 | title: "Insert content, specified by the parameter, to the beginning of each element in the set of matched elements."
700 | doc: prepend
701 | src: jQuery.fn.prepend
702 | from: "1.0"
703 |
704 | - text: .prependTo()
705 | title: Insert every element in the set of matched elements to the beginning of the target.
706 | doc: prependTo
707 | src: jQuery.fn.prependTo
708 | from: "1.0"
709 |
710 | - text: .text()
711 | title: "Get the combined text contents of each element in the set of matched elements, including their descendants, or set the text contents of the matched elements."
712 | doc: text
713 | src: jQuery.fn.text
714 | from: "1.0"
715 |
716 | - title: "DOM Insertion, Outside"
717 | autosort: true
718 | items:
719 |
720 | - text: .after()
721 | title: "Insert content, specified by the parameter, after each element in the set of matched elements."
722 | doc: after
723 | src: jQuery.fn.after
724 | from: "1.0"
725 |
726 | - text: .before()
727 | title: "Insert content, specified by the parameter, before each element in the set of matched elements."
728 | doc: before
729 | src: jQuery.fn.before
730 | from: "1.0"
731 |
732 | - text: .insertAfter()
733 | title: Insert every element in the set of matched elements after the target.
734 | doc: insertAfter
735 | src: jQuery.fn.insertAfter
736 | from: "1.0"
737 |
738 | - text: .insertBefore()
739 | title: Insert every element in the set of matched elements before the target.
740 | doc: insertBefore
741 | src: jQuery.fn.insertBefore
742 | from: "1.0"
743 |
744 | - title: DOM Removal
745 | autosort: true
746 | items:
747 |
748 | - text: .detach()
749 | title: Remove the set of matched elements from the DOM.
750 | doc: detach
751 | src: jQuery.fn.detach
752 | from: "1.4"
753 |
754 | - text: .empty()
755 | title: Remove all child nodes of the set of matched elements from the DOM.
756 | doc: empty
757 | src: jQuery.fn.empty
758 | from: "1.0"
759 |
760 | - text: .remove()
761 | title: Remove the set of matched elements from the DOM.
762 | doc: remove
763 | src: jQuery.fn.remove
764 | from: "1.0"
765 |
766 | - text: .unwrap()
767 | title: "Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place."
768 | doc: unwrap
769 | src: jQuery.fn.unwrap
770 | from: "1.4"
771 |
772 | - title: DOM Replacement
773 | autosort: true
774 | items:
775 |
776 | - text: .replaceAll()
777 | title: Replace each target element with the set of matched elements.
778 | doc: replaceAll
779 | src: jQuery.fn.replaceAll
780 | from: "1.2"
781 |
782 | - text: .replaceWith()
783 | title: Replace each element in the set of matched elements with the provided new content.
784 | doc: replaceWith
785 | src: jQuery.fn.replaceWith
786 | from: "1.2"
787 |
788 | - title: Traversing
789 | slug: traversing
790 | sections:
791 |
792 | - title: Filtering
793 | autosort: true
794 | items:
795 |
796 | - text: .eq()
797 | title: Reduce the set of matched elements to the one at the specified index.
798 | doc: eq
799 | src: jQuery.fn.eq
800 | from: "1.1.2"
801 |
802 | - text: .even()
803 | title: Reduce the set of matched elements to the even ones in the set, numbered from zero.
804 | doc: even
805 | src: jQuery.fn.even
806 | from: "3.5"
807 |
808 | - text: .filter()
809 | title: Reduce the set of matched elements to those that match the selector or pass the function's test.
810 | doc: filter
811 | src: jQuery.fn.filter
812 | from: "1.0"
813 |
814 | - text: .first()
815 | title: Reduce the set of matched elements to the first in the set.
816 | doc: first
817 | src: jQuery.fn.first
818 | from: "1.4"
819 |
820 | - text: .has()
821 | title: Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.
822 | doc: has
823 | src: jQuery.fn.has
824 | from: "1.4"
825 |
826 | - text: .is()
827 | title: Check the current matched set of elements against a selector and return true if at least one of these elements matches the selector.
828 | doc: is
829 | src: jQuery.fn.is
830 | from: "1.0"
831 |
832 | - text: .last()
833 | title: Reduce the set of matched elements to the final one in the set.
834 | doc: last
835 | src: jQuery.fn.last
836 | from: "1.4"
837 |
838 | - text: .map()
839 | title: "Pass each element in the current matched set through a function, producing a new jQuery object containing the return values."
840 | doc: map
841 | src: jQuery.fn.map
842 | from: "1.2"
843 |
844 | - text: .not()
845 | title: Remove elements from the set of matched elements.
846 | doc: not
847 | src: jQuery.fn.not
848 | from: "1.0"
849 |
850 | - text: .odd()
851 | title: Reduce the set of matched elements to the odd ones in the set, numbered from zero.
852 | doc: odd
853 | src: jQuery.fn.odd
854 | from: "3.5"
855 |
856 | - text: .slice()
857 | title: Reduce the set of matched elements to a subset specified by a range of indices.
858 | doc: slice
859 | src: jQuery.fn.slice
860 | from: "1.1.4"
861 |
862 | - title: Miscellaneous Traversing
863 | autosort: true
864 | items:
865 |
866 | - text: .add()
867 | title: Add elements to the set of matched elements.
868 | doc: add
869 | src: jQuery.fn.add
870 | from: "1.0"
871 |
872 | - text: .addBack()
873 | title: "Add the previous set of elements on the stack to the current set, optionally filtered by a selector."
874 | doc: addBack
875 | src: jQuery.fn.addBack
876 | from: "1.8"
877 |
878 | - text: .andSelf()
879 | title: Add the previous set of elements on the stack to the current set.
880 | doc: andSelf
881 | src: jQuery.fn.andSelf
882 | from: "1.2"
883 | deprecated: "1.8"
884 | removed: "3.0"
885 |
886 | - text: .contents()
887 | title: "Get the children of each element in the set of matched elements, including text and comment nodes."
888 | doc: contents
889 | src: jQuery.fn.contents
890 | from: "1.2"
891 |
892 | - text: .each()
893 | title: "Iterate over a jQuery object, executing a function for each matched element."
894 | doc: each
895 | src: jQuery.fn.each
896 | from: "1.0"
897 |
898 | - text: .end()
899 | title: End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.
900 | doc: end
901 | src: jQuery.fn.end
902 | from: "1.0"
903 |
904 | - title: Tree Traversal
905 | autosort: true
906 | items:
907 |
908 | - text: .children()
909 | title: "Get the children of each element in the set of matched elements, optionally filtered by a selector."
910 | doc: children
911 | src: jQuery.fn.children
912 | from: "1.0"
913 |
914 | - text: .closest()
915 | title: "Get the first ancestor element that matches the selector, beginning at the current element and progressing up through the DOM tree."
916 | doc: closest
917 | src: jQuery.fn.closest
918 | from: "1.3"
919 |
920 | - text: .find()
921 | title: "Get the descendants of each element in the current set of matched elements, filtered by a selector."
922 | doc: find
923 | src: jQuery.fn.find
924 | from: "1.0"
925 |
926 | - text: .next()
927 | title: "Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector."
928 | doc: next
929 | src: jQuery.fn.next
930 | from: "1.0"
931 |
932 | - text: .nextAll()
933 | title: "Get all following siblings of each element in the set of matched elements, optionally filtered by a selector."
934 | doc: nextAll
935 | src: jQuery.fn.nextAll
936 | from: "1.2"
937 |
938 | - text: .nextUntil()
939 | title: Get all following siblings of each element up to but not including the element matched by the selector.
940 | doc: nextUntil
941 | src: jQuery.fn.nextUntil
942 | from: "1.4"
943 |
944 | - text: .parent()
945 | title: "Get the parent of each element in the current set of matched elements, optionally filtered by a selector."
946 | doc: parent
947 | src: jQuery.fn.parent
948 | from: "1.0"
949 |
950 | - text: .parents()
951 | title: "Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector."
952 | doc: parents
953 | src: jQuery.fn.parents
954 | from: "1.0"
955 |
956 | - text: .parentsUntil()
957 | title: "Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector."
958 | doc: parentsUntil
959 | src: jQuery.fn.parentsUntil
960 | from: "1.4"
961 |
962 | - text: .prev()
963 | title: "Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector."
964 | doc: prev
965 | src: jQuery.fn.prev
966 | from: "1.0"
967 |
968 | - text: .prevAll()
969 | title: "Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector."
970 | doc: prevAll
971 | src: jQuery.fn.prevAll
972 | from: "1.2"
973 |
974 | - text: .prevUntil()
975 | title: Get all preceding siblings of each element up to but not including the element matched by the selector.
976 | doc: prevUntil
977 | src: jQuery.fn.prevUntil
978 | from: "1.4"
979 |
980 | - text: .siblings()
981 | title: "Get the siblings of each element in the set of matched elements, optionally filtered by a selector."
982 | doc: siblings
983 | src: jQuery.fn.siblings
984 | from: "1.0"
985 |
986 | - title: Events
987 | slug: events
988 | sections:
989 |
990 | - title: Browser Events
991 | autosort: true
992 | items:
993 |
994 | - text: .error()
995 | title: Bind an event handler to the 'error' JavaScript event.
996 | doc: error
997 | src: jQuery.fn.error
998 | from: "1.0"
999 | deprecated: "1.8"
1000 | removed: "3.0"
1001 |
1002 | - text: .resize()
1003 | title: "Bind an event handler to the 'resize' JavaScript event, or trigger that event on an element."
1004 | doc: resize
1005 | src: jQuery.fn.resize
1006 | from: "1.0"
1007 |
1008 | - text: .scroll()
1009 | title: "Bind an event handler to the 'scroll' JavaScript event, or trigger that event on an element."
1010 | doc: scroll
1011 | src: jQuery.fn.scroll
1012 | from: "1.0"
1013 |
1014 | - title: Document Loading
1015 | autosort: true
1016 | items:
1017 |
1018 | - text: .load()
1019 | title: Bind an event handler to the 'load' JavaScript event.
1020 | doc: load-event
1021 | src: jQuery.fn.load
1022 | from: "1.0"
1023 | deprecated: "1.8"
1024 | removed: "3.0"
1025 |
1026 | - text: .ready()
1027 | title: Specify a function to execute when the DOM is fully loaded.
1028 | doc: ready
1029 | src: jQuery.fn.ready
1030 | from: "1.0"
1031 |
1032 | - text: .unload()
1033 | title: Bind an event handler to the 'unload' JavaScript event.
1034 | doc: unload
1035 | src: jQuery.fn.unload
1036 | from: "1.0"
1037 | deprecated: "1.8"
1038 | removed: "3.0"
1039 |
1040 | - title: Event Handler Attachment
1041 | autosort: true
1042 | items:
1043 |
1044 | - text: .bind()
1045 | title: Attach a handler to an event for the elements.
1046 | doc: bind
1047 | src: jQuery.fn.bind
1048 | from: "1.0"
1049 |
1050 | - text: .delegate()
1051 | title: "Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements."
1052 | doc: delegate
1053 | src: jQuery.fn.delegate
1054 | from: "1.4.2"
1055 |
1056 | - text: .die()
1057 | title: Remove all event handlers previously attached using .live() from the elements.
1058 | doc: die
1059 | src: jQuery.fn.die
1060 | from: "1.3"
1061 | deprecated: "1.7"
1062 | removed: "1.9"
1063 |
1064 | - text: .live()
1065 | title: "Attach a handler to the event for all elements which match the current selector, now and in the future."
1066 | doc: live
1067 | src: jQuery.fn.live
1068 | from: "1.3"
1069 | deprecated: "1.7"
1070 | removed: "1.9"
1071 |
1072 | - text: .off()
1073 | title: Remove an event handler.
1074 | doc: off
1075 | src: jQuery.fn.off
1076 | from: "1.7"
1077 |
1078 | - text: .on()
1079 | title: Attach an event handler function for one or more events to the selected elements.
1080 | doc: on
1081 | src: jQuery.fn.on
1082 | from: "1.7"
1083 |
1084 | - text: .one()
1085 | title: Attach a handler to an event for the elements. The handler is executed at most once per element.
1086 | doc: one
1087 | src: jQuery.fn.one
1088 | from: "1.1"
1089 |
1090 | - text: .trigger()
1091 | title: Execute all handlers and behaviors attached to the matched elements for the given event type.
1092 | doc: trigger
1093 | src: jQuery.fn.trigger
1094 | from: "1.0"
1095 |
1096 | - text: .triggerHandler()
1097 | title: Execute all handlers attached to an element for an event.
1098 | doc: triggerHandler
1099 | src: jQuery.fn.triggerHandler
1100 | from: "1.2"
1101 |
1102 | - text: .unbind()
1103 | title: Remove a previously-attached event handler from the elements.
1104 | doc: unbind
1105 | src: jQuery.fn.unbind
1106 | from: "1.0"
1107 |
1108 | - text: .undelegate()
1109 | title: Remove a handler from the event for all elements which match the current selector, now or in the future, based upon a specific set of root elements.
1110 | doc: undelegate
1111 | src: jQuery.fn.undelegate
1112 | from: "1.4.2"
1113 |
1114 | - title: Form Events
1115 | autosort: true
1116 | items:
1117 |
1118 | - text: .blur()
1119 | title: "Bind an event handler to the 'blur' JavaScript event, or trigger that event on an element."
1120 | doc: blur
1121 | src: jQuery.fn.blur
1122 | from: "1.0"
1123 |
1124 | - text: .change()
1125 | title: "Bind an event handler to the 'change' JavaScript event, or trigger that event on an element."
1126 | doc: change
1127 | src: jQuery.fn.change
1128 | from: "1.0"
1129 |
1130 | - text: .focus()
1131 | title: "Bind an event handler to the 'focus' JavaScript event, or trigger that event on an element."
1132 | doc: focus
1133 | src: jQuery.fn.focus
1134 | from: "1.0"
1135 |
1136 | - text: .focusin()
1137 | title: "Bind an event handler to the 'focusin' JavaScript event."
1138 | doc: focusin
1139 | src: jQuery.fn.focusin
1140 | from: "1.4"
1141 |
1142 | - text: .focusout()
1143 | title: "Bind an event handler to the 'focusout' JavaScript event."
1144 | doc: focusout
1145 | src: jQuery.fn.focusout
1146 | from: "1.4"
1147 |
1148 | - text: .select()
1149 | title: "Bind an event handler to the 'select' JavaScript event, or trigger that event on an element."
1150 | doc: select
1151 | src: jQuery.fn.select
1152 | from: "1.0"
1153 |
1154 | - text: .submit()
1155 | title: "Bind an event handler to the 'submit' JavaScript event, or trigger that event on an element."
1156 | doc: submit
1157 | src: jQuery.fn.submit
1158 | from: "1.0"
1159 |
1160 | - title: Keyboard Events
1161 | autosort: true
1162 | items:
1163 |
1164 | - text: .keydown()
1165 | title: "Bind an event handler to the 'keydown' JavaScript event, or trigger that event on an element."
1166 | doc: keydown
1167 | src: jQuery.fn.keydown
1168 | from: "1.0"
1169 |
1170 | - text: .keypress()
1171 | title: "Bind an event handler to the 'keypress' JavaScript event, or trigger that event on an element."
1172 | doc: keypress
1173 | src: jQuery.fn.keypress
1174 | from: "1.0"
1175 |
1176 | - text: .keyup()
1177 | title: "Bind an event handler to the 'keyup' JavaScript event, or trigger that event on an element."
1178 | doc: keyup
1179 | src: jQuery.fn.keyup
1180 | from: "1.0"
1181 |
1182 | - title: Mouse Events
1183 | break: true
1184 | autosort: true
1185 | items:
1186 |
1187 | - text: .click()
1188 | title: "Bind an event handler to the 'click' JavaScript event, or trigger that event on an element."
1189 | doc: click
1190 | src: jQuery.fn.click
1191 | from: "1.0"
1192 |
1193 | - text: .contextMenu()
1194 | title: "Bind an event handler to the 'contextmenu' JavaScript event, or trigger that event on an element."
1195 | doc: contextmenu
1196 | src: jQuery.fn.contextmenu
1197 | from: "1.0"
1198 |
1199 | - text: .dblclick()
1200 | title: "Bind an event handler to the 'dblclick' JavaScript event, or trigger that event on an element."
1201 | doc: dblclick
1202 | src: jQuery.fn.dblclick
1203 | from: "1.0"
1204 |
1205 | - text: .hover()
1206 | title: "Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements."
1207 | doc: hover
1208 | src: jQuery.fn.hover
1209 | from: "1.0"
1210 |
1211 | - text: .mousedown()
1212 | title: "Bind an event handler to the 'mousedown' JavaScript event, or trigger that event on an element."
1213 | doc: mousedown
1214 | src: jQuery.fn.mousedown
1215 | from: "1.0"
1216 |
1217 | - text: .mouseenter()
1218 | title: "Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element."
1219 | doc: mouseenter
1220 | src: jQuery.fn.mouseenter
1221 | from: "1.0"
1222 |
1223 | - text: .mouseleave()
1224 | title: "Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element."
1225 | doc: mouseleave
1226 | src: jQuery.fn.mouseleave
1227 | from: "1.0"
1228 |
1229 | - text: .mousemove()
1230 | title: "Bind an event handler to the 'mousemove' JavaScript event, or trigger that event on an element."
1231 | doc: mousemove
1232 | src: jQuery.fn.mousemove
1233 | from: "1.0"
1234 |
1235 | - text: .mouseout()
1236 | title: "Bind an event handler to the 'mouseout' JavaScript event, or trigger that event on an element."
1237 | doc: mouseout
1238 | src: jQuery.fn.mouseout
1239 | from: "1.0"
1240 |
1241 | - text: .mouseover()
1242 | title: "Bind an event handler to the 'mouseover' JavaScript event, or trigger that event on an element."
1243 | doc: mouseover
1244 | src: jQuery.fn.mouseover
1245 | from: "1.0"
1246 |
1247 | - text: .mouseup()
1248 | title: "Bind an event handler to the 'mouseup' JavaScript event, or trigger that event on an element."
1249 | doc: mouseup
1250 | src: jQuery.fn.mouseup
1251 | from: "1.0"
1252 |
1253 | - text: .toggle()
1254 | title: "Bind two or more handlers to the matched elements, to be executed on alternate clicks."
1255 | doc: toggle-event
1256 | src: jQuery.fn.toggle
1257 | from: "1.0"
1258 | deprecated: "1.8"
1259 | removed: "1.9"
1260 |
1261 | - title: Event Object
1262 | autosort: true
1263 | items:
1264 |
1265 | - text: event.currentTarget
1266 | title: The current DOM element within the event bubbling phase.
1267 | doc: event.currentTarget
1268 | from: "1.3"
1269 |
1270 | - text: event.delegateTarget
1271 | title: The element where the currently-called jQuery event handler was attached.
1272 | doc: event.delegateTarget
1273 | from: "1.7"
1274 |
1275 | - text: event.data
1276 | title: The optional data passed to jQuery.fn.bind when the current executing handler was bound.
1277 | doc: event.data
1278 | from: "1.1"
1279 |
1280 | - text: event.isDefaultPrevented()
1281 | title: Returns whether event.preventDefault() was ever called on this event object.
1282 | doc: event.isDefaultPrevented
1283 | from: "1.3"
1284 |
1285 | - text: event.isImmediatePropagationStopped()
1286 | title: Returns whether event.stopImmediatePropagation() was ever called on this event object.
1287 | doc: event.isImmediatePropagationStopped
1288 | from: "1.3"
1289 |
1290 | - text: event.isPropagationStopped()
1291 | title: Returns whether event.stopPropagation() was ever called on this event object.
1292 | doc: event.isPropagationStopped
1293 | from: "1.3"
1294 |
1295 | - text: event.metaKey
1296 | title: Indicates whether the META key was pressed when the event fired.
1297 | doc: event.metaKey
1298 | from: "1.0.4"
1299 |
1300 | - text: event.namespace
1301 | title: The namespace specified when the event was triggered.
1302 | doc: event.namespace
1303 | from: "1.4.3"
1304 |
1305 | - text: event.pageX
1306 | title: The mouse position relative to the left edge of the document.
1307 | doc: event.pageX
1308 | from: "1.0.4"
1309 |
1310 | - text: event.pageY
1311 | title: The mouse position relative to the top edge of the document.
1312 | doc: event.pageY
1313 | from: "1.0.4"
1314 |
1315 | - text: event.preventDefault()
1316 | title: "If this method is called, the default action of the event will not be triggered."
1317 | doc: event.preventDefault
1318 | from: "1.0"
1319 |
1320 | - text: event.relatedTarget
1321 | title: "The other DOM element involved in the event, if any."
1322 | doc: event.relatedTarget
1323 | from: "1.1.4"
1324 |
1325 | - text: event.result
1326 | title: "The last value returned by an event handler that was triggered by this event, unless the value was undefined."
1327 | doc: event.result
1328 | from: "1.3"
1329 |
1330 | - text: event.stopImmediatePropagation()
1331 | title: Prevents other event handlers from being called.
1332 | doc: event.stopImmediatePropagation
1333 | from: "1.3"
1334 |
1335 | - text: event.stopPropagation()
1336 | title: "Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event."
1337 | doc: event.stopPropagation
1338 | from: "1.0"
1339 |
1340 | - text: event.target
1341 | title: The DOM element that initiated the event.
1342 | doc: event.target
1343 | from: "1.0"
1344 |
1345 | - text: event.timeStamp
1346 | title: "The difference in milliseconds between the time an event is triggered and January 1, 1970."
1347 | doc: event.timeStamp
1348 | from: "1.2.6"
1349 |
1350 | - text: event.type
1351 | title: Describes the nature of the event.
1352 | doc: event.type
1353 | from: "1.0"
1354 |
1355 | - text: event.which
1356 | title: "For key or button events, this attribute indicates the specific button or key that was pressed."
1357 | doc: event.which
1358 | from: "1.1.3"
1359 |
1360 | - title: Effects
1361 | slug: effects
1362 | sections:
1363 |
1364 | - title: Basics
1365 | autosort: true
1366 | items:
1367 |
1368 | - text: .hide()
1369 | title: Hide the matched elements.
1370 | doc: hide
1371 | src: jQuery.fn.hide
1372 | from: "1.0"
1373 |
1374 | - text: .show()
1375 | title: Display the matched elements.
1376 | doc: show
1377 | src: jQuery.fn.show
1378 | from: "1.0"
1379 |
1380 | - text: .toggle()
1381 | title: Display or hide the matched elements.
1382 | doc: toggle
1383 | src: jQuery.fn.toggle
1384 | from: "1.0"
1385 |
1386 | - title: Custom
1387 | autosort: true
1388 | items:
1389 |
1390 | - text: .animate()
1391 | title: Perform a custom animation of a set of CSS properties.
1392 | doc: animate
1393 | src: jQuery.fn.animate
1394 | from: "1.0"
1395 |
1396 | - text: .clearQueue()
1397 | title: Remove from the queue all items that have not yet been run.
1398 | doc: clearQueue
1399 | src: jQuery.fn.clearQueue
1400 | from: "1.4"
1401 |
1402 | - text: .delay()
1403 | title: Set a timer to delay execution of subsequent items in the queue.
1404 | doc: delay
1405 | src: jQuery.fn.delay
1406 | from: "1.4"
1407 |
1408 | - text: .dequeue()
1409 | title: Execute the next function on the queue for the matched elements.
1410 | doc: dequeue
1411 | src: jQuery.fn.dequeue
1412 | from: "1.2"
1413 |
1414 | - text: jQuery.dequeue()
1415 | title: Execute the next function on the queue for the matched element.
1416 | doc: jQuery.dequeue
1417 | src: jQuery.dequeue
1418 | from: "1.3"
1419 |
1420 | - text: .finish()
1421 | title: "Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements."
1422 | doc: finish
1423 | src: jQuery.fn.finish
1424 | from: "1.9"
1425 |
1426 | - text: jQuery.fx.interval
1427 | title: The rate (in milliseconds) at which animations fire.
1428 | doc: jQuery.fx.interval
1429 | src: jQuery.fx.interval
1430 | from: "1.4.3"
1431 |
1432 | - text: jQuery.fx.off
1433 | title: Globally disable all animations.
1434 | doc: jQuery.fx.off
1435 | src: jQuery.fx.off
1436 | from: "1.3"
1437 |
1438 | - text: jQuery.speed
1439 | title: Creates an object containing a set of properties ready to be used in the definition of custom animations.
1440 | doc: jQuery.speed
1441 | src: jQuery.speed
1442 | from: "1.0"
1443 |
1444 | - text: .queue()
1445 | title: Show or manipulate the queue of functions to be executed on the matched elements.
1446 | doc: queue
1447 | src: jQuery.fn.queue
1448 | from: "1.2"
1449 |
1450 | - text: jQuery.queue()
1451 | title: Show or manipulate the queue of functions to be executed on the matched element.
1452 | doc: jQuery.queue
1453 | src: jQuery.queue
1454 | from: "1.3"
1455 |
1456 | - text: .stop()
1457 | title: Stop the currently-running animation on the matched elements.
1458 | doc: stop
1459 | src: jQuery.fn.stop
1460 | from: "1.2"
1461 |
1462 | - title: Fading
1463 | autosort: true
1464 | items:
1465 |
1466 | - text: .fadeIn()
1467 | title: Display the matched elements by fading them to opaque.
1468 | doc: fadeIn
1469 | src: jQuery.fn.fadeIn
1470 | from: "1.0"
1471 |
1472 | - text: .fadeOut()
1473 | title: Hide the matched elements by fading them to transparent.
1474 | doc: fadeOut
1475 | src: jQuery.fn.fadeOut
1476 | from: "1.0"
1477 |
1478 | - text: .fadeTo()
1479 | title: Adjust the opacity of the matched elements.
1480 | doc: fadeTo
1481 | src: jQuery.fn.fadeTo
1482 | from: "1.0"
1483 |
1484 | - text: .fadeToggle()
1485 | title: Display or hide the matched elements by animating their opacity.
1486 | doc: fadeToggle
1487 | src: jQuery.fn.fadeToggle
1488 | from: "1.4.4"
1489 |
1490 | - title: Sliding
1491 | autosort: true
1492 | items:
1493 |
1494 | - text: .slideDown()
1495 | title: Display the matched elements with a sliding motion.
1496 | doc: slideDown
1497 | src: jQuery.fn.slideDown
1498 | from: "1.0"
1499 |
1500 | - text: .slideToggle()
1501 | title: Display or hide the matched elements with a sliding motion.
1502 | doc: slideToggle
1503 | src: jQuery.fn.slideToggle
1504 | from: "1.0"
1505 |
1506 | - text: .slideUp()
1507 | title: Hide the matched elements with a sliding motion.
1508 | doc: slideUp
1509 | src: jQuery.fn.slideUp
1510 | from: "1.0"
1511 |
1512 | - title: Ajax
1513 | slug: ajax
1514 | sections:
1515 |
1516 | - title: Global Ajax Event Handlers
1517 | autosort: true
1518 | items:
1519 |
1520 | - text: .ajaxComplete()
1521 | title: Register a handler to be called when Ajax requests complete. This is an Ajax Event.
1522 | doc: ajaxComplete
1523 | src: jQuery.fn.ajaxComplete
1524 | from: "1.0"
1525 |
1526 | - text: .ajaxError()
1527 | title: Register a handler to be called when Ajax requests complete with an error. This is an Ajax Event.
1528 | doc: ajaxError
1529 | src: jQuery.fn.ajaxError
1530 | from: "1.0"
1531 |
1532 | - text: .ajaxSend()
1533 | title: Attach a function to be executed before an Ajax request is sent. This is an Ajax Event.
1534 | doc: ajaxSend
1535 | src: jQuery.fn.ajaxSend
1536 | from: "1.0"
1537 |
1538 | - text: .ajaxStart()
1539 | title: Register a handler to be called when the first Ajax request begins. This is an Ajax Event.
1540 | doc: ajaxStart
1541 | src: jQuery.fn.ajaxStart
1542 | from: "1.0"
1543 |
1544 | - text: .ajaxStop()
1545 | title: Register a handler to be called when all Ajax requests have completed. This is an Ajax Event.
1546 | doc: ajaxStop
1547 | src: jQuery.fn.ajaxStop
1548 | from: "1.0"
1549 |
1550 | - text: .ajaxSuccess()
1551 | title: Attach a function to be executed whenever an Ajax request completes successfully. This is an Ajax Event.
1552 | doc: ajaxSuccess
1553 | src: jQuery.fn.ajaxSuccess
1554 | from: "1.0"
1555 |
1556 | - title: Helper Functions
1557 | autosort: true
1558 | items:
1559 |
1560 | - text: jQuery.param()
1561 | title: "Create a serialized representation of an array or object, suitable for use in a URL query string or Ajax request."
1562 | doc: jQuery.param
1563 | src: jQuery.param
1564 | from: "1.2"
1565 |
1566 | - text: .serialize()
1567 | title: Encode a set of form elements as a string for submission.
1568 | doc: serialize
1569 | src: jQuery.fn.serialize
1570 | from: "1.0"
1571 |
1572 | - text: .serializeArray()
1573 | title: Encode a set of form elements as an array of names and values.
1574 | doc: serializeArray
1575 | src: jQuery.fn.serializeArray
1576 | from: "1.2"
1577 |
1578 | - title: Low-Level Interface
1579 | autosort: true
1580 | items:
1581 |
1582 | - text: jQuery.ajax()
1583 | title: Perform an asynchronous HTTP (Ajax) request.
1584 | doc: jQuery.ajax
1585 | src: jQuery.ajax
1586 | from: "1.0"
1587 |
1588 | - text: jQuery.prefilter()
1589 | title: Handle custom Ajax options or modify existing options before each request is sent and before they are processed by $.ajax().
1590 | doc: jQuery.ajaxPrefilter
1591 | src: jQuery.ajaxPrefilter
1592 | from: "1.5"
1593 |
1594 | - text: jQuery.ajaxSetup()
1595 | title: Set default values for future Ajax requests.
1596 | doc: jQuery.ajaxSetup
1597 | src: jQuery.ajaxSetup
1598 | from: "1.1"
1599 |
1600 | - text: jQuery.ajaxTransport()
1601 | title: Creates an object that handles the actual transmission of Ajax data.
1602 | doc: jQuery.ajaxTransport
1603 | src: jQuery.ajaxTransport
1604 | from: "1.5"
1605 |
1606 | - title: Shorthand Methods
1607 | autosort: true
1608 | items:
1609 |
1610 | - text: jQuery.get()
1611 | title: Load data from the server using a HTTP GET request.
1612 | doc: jQuery.get
1613 | src: jQuery.get
1614 | from: "1.0"
1615 |
1616 | - text: jQuery.getJSON()
1617 | title: Load JSON-encoded data from the server using a GET HTTP request.
1618 | doc: jQuery.getJSON
1619 | src: jQuery.getJSON
1620 | from: "1.0"
1621 |
1622 | - text: jQuery.getScript()
1623 | title: "Load a JavaScript file from the server using a GET HTTP request, then execute it."
1624 | doc: jQuery.getScript
1625 | src: jQuery.getScript
1626 | from: "1.0"
1627 |
1628 | - text: jQuery.post()
1629 | title: Load data from the server using a HTTP POST request.
1630 | doc: jQuery.post
1631 | src: jQuery.post
1632 | from: "1.0"
1633 |
1634 | - text: .load()
1635 | title: Load data from the server and place the returned HTML into the matched element.
1636 | doc: load
1637 | src: jQuery.fn.load
1638 | from: "1.0"
1639 |
1640 | - title: Core
1641 | slug: core
1642 | sections:
1643 |
1644 | - title: jQuery Object
1645 | autosort: true
1646 | items:
1647 |
1648 | - text: jQuery()
1649 | title: Return a collection of matched elements either found in the DOM based on passed argument(s) or created by passing an HTML string.
1650 | doc: jQuery
1651 | src: jQuery
1652 | from: "1.0"
1653 |
1654 | - text: jQuery.noConflict()
1655 | title: "Relinquish jQuery's control of the $ variable."
1656 | doc: jQuery.noConflict
1657 | src: jQuery.noConflict
1658 | from: "1.0"
1659 |
1660 | - text: jQuery.readyException()
1661 | title: "Handles errors thrown synchronously in functions wrapped in jQuery()."
1662 | doc: jQuery.readyException
1663 | src: jQuery.readyException
1664 | from: "3.1"
1665 |
1666 | - text: jQuery.sub()
1667 | title: Creates a new copy of jQuery whose properties and methods can be modified without affecting the original jQuery object.
1668 | doc: jQuery.sub
1669 | src: jQuery.sub
1670 | from: "1.5"
1671 | deprecated: "1.7"
1672 | removed: "1.9"
1673 |
1674 | - text: jQuery.holdReady()
1675 | title: Holds or releases the execution of jQuery's ready event.
1676 | doc: jQuery.holdReady
1677 | src: jQuery.holdReady
1678 | from: "1.6"
1679 | deprecated: "3.2"
1680 |
1681 | - text: jQuery.when()
1682 | title: "Provides a way to execute callback functions based on one or more objects, usually Deferred objects that represent asynchronous events."
1683 | doc: jQuery.when
1684 | src: jQuery.when
1685 | from: "1.5"
1686 |
1687 | - title: Deferred Object
1688 | autosort: true
1689 | items:
1690 |
1691 | - text: jQuery.Deferred()
1692 | title: A factory function that returns a chainable utility object with methods to register multiple callbacks into callback queues, invoke callback queues, and relay the success or failure state of any synchronous or asynchronous function.
1693 | doc: jQuery.Deferred
1694 | from: "1.5"
1695 |
1696 | - text: deferred.always()
1697 | title: Add handlers to be called when the Deferred object is either resolved or rejected.
1698 | doc: deferred.always
1699 | from: "1.6"
1700 |
1701 | - text: deferred.done()
1702 | title: Add handlers to be called when the Deferred object is resolved.
1703 | doc: deferred.done
1704 | from: "1.5"
1705 |
1706 | - text: deferred.fail()
1707 | title: Add handlers to be called when the Deferred object is rejected.
1708 | doc: deferred.fail
1709 | from: "1.5"
1710 |
1711 | - text: deferred.isRejected()
1712 | title: Determine whether a Deferred object has been rejected.
1713 | doc: deferred.isRejected
1714 | from: "1.5"
1715 | deprecated: "1.7"
1716 | removed: "1.8"
1717 |
1718 | - text: deferred.isResolved()
1719 | title: Determine whether a Deferred object has been resolved.
1720 | doc: deferred.isResolved
1721 | from: "1.5"
1722 | deprecated: "1.7"
1723 | removed: "1.8"
1724 |
1725 | - text: deferred.notify()
1726 | title: Call the progressCallbacks on a Deferred object with the given args.
1727 | doc: deferred.notify
1728 | from: "1.7"
1729 |
1730 | - text: deferred.notifyWith()
1731 | title: Call the progressCallbacks on a Deferred object with the given context and args.
1732 | doc: deferred.notifyWith
1733 | from: "1.7"
1734 |
1735 | - text: deferred.pipe()
1736 | title: Utility method to filter and/or chain Deferreds.
1737 | doc: deferred.pipe
1738 | from: "1.6"
1739 | deprecated: "1.8"
1740 |
1741 | - text: deferred.progress()
1742 | title: Add handlers to be called when the Deferred object generates progress notifications.
1743 | doc: deferred.progress
1744 | from: "1.7"
1745 |
1746 | - text: deferred.promise()
1747 | title: "Return a Deferred's Promise object."
1748 | doc: deferred.promise
1749 | from: "1.5"
1750 |
1751 | - text: deferred.reject()
1752 | title: Reject a Deferred object and call any failCallbacks with the given args.
1753 | doc: deferred.reject
1754 | from: "1.5"
1755 |
1756 | - text: deferred.rejectWith()
1757 | title: Reject a Deferred object and call any failCallbacks with the given context and args.
1758 | doc: deferred.rejectWith
1759 | from: "1.5"
1760 |
1761 | - text: deferred.resolve()
1762 | title: Resolve a Deferred object and call any doneCallbacks with the given args.
1763 | doc: deferred.resolve
1764 | from: "1.5"
1765 |
1766 | - text: deferred.resolveWith()
1767 | title: Resolve a Deferred object and call any doneCallbacks with the given context and args.
1768 | doc: deferred.resolveWith
1769 | from: "1.5"
1770 |
1771 | - text: deferred.state()
1772 | title: Determine the current state of a Deferred object.
1773 | doc: deferred.state
1774 | from: "1.7"
1775 |
1776 | - text: deferred.then()
1777 | title: Add handlers to be called when the Deferred object is resolved or rejected.
1778 | doc: deferred.then
1779 | from: "1.5"
1780 |
1781 | - text: .promise()
1782 | title: "Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished."
1783 | doc: promise
1784 | from: "1.6"
1785 |
1786 | - title: Utilities
1787 | break: true
1788 | autosort: true
1789 | items:
1790 |
1791 | - text: jQuery.boxModel
1792 | title: "States if the current page, in the user's browser, is being rendered using the W3C CSS Box Model."
1793 | doc: jQuery.boxModel
1794 | src: jQuery.boxModel
1795 | from: "1.0"
1796 | deprecated: "1.3"
1797 | removed: "1.8"
1798 |
1799 | - text: jQuery.browser
1800 | title: "Contains flags for the useragent, read from navigator.userAgent. We recommend against using this property; please try to use feature detection instead (see jQuery.support). jQuery.browser may be moved to a plugin in a future release of jQuery."
1801 | doc: jQuery.browser
1802 | src: jQuery.browser
1803 | from: "1.0"
1804 | deprecated: "1.3"
1805 | removed: "1.9"
1806 |
1807 | - text: jQuery.contains()
1808 | title: Check to see if a DOM node is within another DOM node.
1809 | doc: jQuery.contains
1810 | src: jQuery.contains
1811 | from: "1.4"
1812 |
1813 | - text: jQuery.each()
1814 | title: "A generic iterator function, which can be used to seamlessly iterate over both objects and arrays. Arrays and array-like objects with a length property (such as a function's arguments object) are iterated by numeric index, from 0 to length-1. Other objects are iterated via their named properties."
1815 | doc: jQuery.each
1816 | src: jQuery.each
1817 | from: "1.0"
1818 |
1819 | - text: jQuery.extend()
1820 | title: Merge the contents of two or more objects together into the first object.
1821 | doc: jQuery.extend
1822 | src: jQuery.extend
1823 | from: "1.0"
1824 |
1825 | - text: jQuery.globalEval()
1826 | title: Execute some JavaScript code globally.
1827 | doc: jQuery.globalEval
1828 | src: jQuery.globalEval
1829 | from: "1.0.4"
1830 |
1831 | - text: jQuery.grep()
1832 | title: Finds the elements of an array which satisfy a filter function. The original array is not affected.
1833 | doc: jQuery.grep
1834 | src: jQuery.grep
1835 | from: "1.0"
1836 |
1837 | - text: jQuery.inArray()
1838 | title: Search for a specified value within an array and return its index (or -1 if not found).
1839 | doc: jQuery.inArray
1840 | src: jQuery.inArray
1841 | from: "1.2"
1842 |
1843 | - text: jQuery.isArray()
1844 | title: Determine whether the argument is an array.
1845 | doc: jQuery.isArray
1846 | src: jQuery.isArray
1847 | from: "1.3"
1848 | deprecated: "3.2"
1849 |
1850 | - text: jQuery.isEmptyObject()
1851 | title: Check to see if an object is empty (contains no properties).
1852 | doc: jQuery.isEmptyObject
1853 | src: jQuery.isEmptyObject
1854 | from: "1.4"
1855 |
1856 | - text: jQuery.isFunction()
1857 | title: Determine if the argument passed is a Javascript function object.
1858 | doc: jQuery.isFunction
1859 | src: jQuery.isFunction
1860 | from: "1.2"
1861 | deprecated: "3.3"
1862 |
1863 | - text: jQuery.isNumeric()
1864 | title: Determines whether its argument is a number.
1865 | doc: jQuery.isNumeric
1866 | src: jQuery.isNumeric
1867 | from: "1.7"
1868 | deprecated: "3.3"
1869 |
1870 | - text: jQuery.isPlainObject()
1871 | title: "Check to see if an object is a plain object (created using '{}' or 'new Object')."
1872 | doc: jQuery.isPlainObject
1873 | src: jQuery.isPlainObject
1874 | from: "1.4"
1875 |
1876 | - text: jQuery.isWindow()
1877 | title: Determine whether the argument is a window.
1878 | doc: jQuery.isWindow
1879 | src: jQuery.isWindow
1880 | from: "1.4.3"
1881 | deprecated: "3.3"
1882 |
1883 | - text: jQuery.isXMLDoc()
1884 | title: Check to see if a DOM node is within an XML document (or is an XML document).
1885 | doc: jQuery.isXMLDoc
1886 | src: jQuery.isXMLDoc
1887 | from: "1.1.4"
1888 |
1889 | - text: jQuery.makeArray()
1890 | title: Convert an array-like object into a true JavaScript array.
1891 | doc: jQuery.makeArray
1892 | src: jQuery.makeArray
1893 | from: "1.2"
1894 |
1895 | - text: jQuery.map()
1896 | title: Translate all items in an array or array-like object to another array of items.
1897 | doc: jQuery.map
1898 | src: jQuery.map
1899 | from: "1.0"
1900 |
1901 | - text: jQuery.merge()
1902 | title: Merge the contents of two arrays together into the first array.
1903 | doc: jQuery.merge
1904 | src: jQuery.merge
1905 | from: "1.0"
1906 |
1907 | - text: jQuery.noop()
1908 | title: An empty function.
1909 | doc: jQuery.noop
1910 | src: jQuery.noop
1911 | from: "1.4"
1912 |
1913 | - text: jQuery.now()
1914 | title: Return a number representing the current time.
1915 | doc: jQuery.now
1916 | src: jQuery.now
1917 | from: "1.4.3"
1918 | deprecated: "3.3"
1919 |
1920 | - text: jQuery.parseHTML()
1921 | title: Parses a string into an array of DOM nodes.
1922 | doc: jQuery.parseHTML
1923 | src: jQuery.parseHTML
1924 | from: "1.8"
1925 |
1926 | - text: jQuery.parseJSON()
1927 | title: Takes a well-formed JSON string and returns the resulting JavaScript object.
1928 | doc: jQuery.parseJSON
1929 | src: jQuery.parseJSON
1930 | from: "1.4.1"
1931 | deprecated: "3.0"
1932 |
1933 | - text: jQuery.parseXML()
1934 | title: Parses a string into an XML document.
1935 | doc: jQuery.parseXML
1936 | src: jQuery.parseXML
1937 | from: "1.5"
1938 |
1939 | - text: jQuery.proxy()
1940 | title: Takes a function and returns a new one that will always have a particular context.
1941 | doc: jQuery.proxy
1942 | src: jQuery.proxy
1943 | from: "1.4"
1944 | deprecated: "3.3"
1945 |
1946 | - text: jQuery.support
1947 | title: A collection of properties that represent the presence of different browser features or bugs.
1948 | doc: jQuery.support
1949 | src: jQuery.support
1950 | from: "1.3"
1951 | deprecated: "1.9"
1952 |
1953 | - text: jQuery.trim()
1954 | title: Remove the whitespace from the beginning and end of a string.
1955 | doc: jQuery.trim
1956 | src: jQuery.trim
1957 | from: "1.0"
1958 | deprecated: "3.5"
1959 |
1960 | - text: jQuery.type()
1961 | title: "Determine the internal JavaScript [[Class]] of an object."
1962 | doc: jQuery.type
1963 | src: jQuery.type
1964 | from: "1.4.3"
1965 | deprecated: "3.3"
1966 |
1967 | - text: jQuery.unique()
1968 | title: "Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers."
1969 | doc: jQuery.unique
1970 | src: jQuery.unique
1971 | from: "1.1.3"
1972 | deprecated: "3.0"
1973 |
1974 | - text: jQuery.uniqueSort()
1975 | title: "Sorts an array of DOM elements, in place, with the duplicates removed. Note that this only works on arrays of DOM elements, not strings or numbers."
1976 | doc: jQuery.uniqueSort
1977 | src: jQuery.uniqueSort
1978 | from: "3.0"
1979 |
1980 | - title: DOM Element Methods
1981 | break: true
1982 | autosort: true
1983 | items:
1984 |
1985 | - text: .get()
1986 | title: Retrieve the DOM elements matched by the jQuery object.
1987 | doc: get
1988 | src: jQuery.fn.get
1989 | from: "1.0"
1990 |
1991 | - text: .index()
1992 | title: Search for a given element from among the matched elements.
1993 | doc: index
1994 | src: jQuery.fn.index
1995 | from: "1.0"
1996 |
1997 | - text: .size()
1998 | title: Return the number of elements in the jQuery object.
1999 | doc: size
2000 | src: jQuery.fn.size
2001 | from: "1.0"
2002 | deprecated: "1.8"
2003 | removed: "3.0"
2004 |
2005 | - text: .toArray()
2006 | title: "Retrieve all the DOM elements contained in the jQuery set, as an array."
2007 | doc: toArray
2008 | src: jQuery.fn.toArray
2009 | from: "1.4"
2010 |
2011 | - title: Internals
2012 | autosort: true
2013 | items:
2014 |
2015 | - text: .jquery
2016 | title: A string containing the jQuery version number.
2017 | doc: jquery-2
2018 | src: jQuery.fn.jquery
2019 | from: "1.0"
2020 |
2021 | - text: .context
2022 | title: The DOM node context originally passed to jQuery(); if none was passed then context will likely be the document.
2023 | doc: context
2024 | src: jQuery.fn.context
2025 | from: "1.3"
2026 | deprecated: "1-10"
2027 | removed: "3.0"
2028 |
2029 | - text: jQuery.error()
2030 | title: Takes a string and throws an exception containing it.
2031 | doc: jQuery.error
2032 | src: jQuery.error
2033 | from: "1.4.1"
2034 |
2035 | - text: .length
2036 | title: The number of elements in the jQuery object.
2037 | doc: length
2038 | src: jQuery.fn.length
2039 | from: "1.0"
2040 |
2041 | - text: .pushStack()
2042 | title: Add a collection of DOM elements onto the jQuery stack.
2043 | doc: pushStack
2044 | src: jQuery.fn.pushStack
2045 | from: "1.0"
2046 |
2047 | - text: .selector
2048 | title: A selector representing selector originally passed to jQuery().
2049 | doc: selector
2050 | src: jQuery.fn.selector
2051 | from: "1.3"
2052 | deprecated: "1.7"
2053 | removed: "3.0"
2054 |
2055 | - title: Callbacks Object
2056 | autosort: true
2057 | items:
2058 |
2059 | - text: jQuery.Callbacks()
2060 | title: A multi-purpose callbacks list object that provides a powerful way to manage callback lists.
2061 | doc: jQuery.Callbacks
2062 | src: jQuery.Callbacks
2063 | from: "1.7"
2064 |
2065 | - text: callbacks.add()
2066 | title: Add a callback or a collection of callbacks to a callback list.
2067 | doc: callbacks.add
2068 | from: "1.7"
2069 |
2070 | - text: callbacks.disable()
2071 | title: Disable a callback list from doing anything more.
2072 | doc: callbacks.disable
2073 | from: "1.7"
2074 |
2075 | - text: callbacks.disabled()
2076 | title: Determine if the callbacks list has been disabled.
2077 | doc: callbacks.disabled
2078 | from: "1.7"
2079 |
2080 | - text: callbacks.empty()
2081 | title: Remove all of the callbacks from a list.
2082 | doc: callbacks.empty
2083 | from: "1.7"
2084 |
2085 | - text: callbacks.fire()
2086 | title: Call all of the callbacks with the given arguments.
2087 | doc: callbacks.fire
2088 | from: "1.7"
2089 |
2090 | - text: callbacks.fired()
2091 | title: Determine if the callbacks have already been called at least once.
2092 | doc: callbacks.fired
2093 | from: "1.7"
2094 |
2095 | - text: callbacks.fireWith()
2096 | title: Call all callbacks in a list with the given context and arguments.
2097 | doc: callbacks.fireWith
2098 | from: "1.7"
2099 |
2100 | - text: callbacks.has()
2101 | title: Determine whether a supplied callback is in a list.
2102 | doc: callbacks.has
2103 | from: "1.7"
2104 |
2105 | - text: callbacks.lock()
2106 | title: Lock a callback list in its current state.
2107 | doc: callbacks.lock
2108 | from: "1.7"
2109 |
2110 | - text: callbacks.locked()
2111 | title: Determine if the callbacks list has been locked.
2112 | doc: callbacks.locked
2113 | from: "1.7"
2114 |
2115 | - text: callbacks.remove()
2116 | title: Remove a callback or a collection of callbacks from a callback list.
2117 | doc: callbacks.remove
2118 | from: "1.7"
2119 |
--------------------------------------------------------------------------------
/src/js/api-search.js:
--------------------------------------------------------------------------------
1 | export default function init($selector, $links) {
2 | $selector.selectize({
3 | sortField: "sort",
4 | render: {
5 | option: function (data) {
6 | const regex = /\./g;
7 | let className = "option v" + data.from.replace(regex, "-") + " " +
8 | data.type;
9 |
10 | if (data.deprecated) {
11 | className += " v" + data.deprecated.replace(regex, "-") + "-d";
12 | }
13 |
14 | if (data.removed) {
15 | className += " v" + data.removed.replace(regex, "-") + "-r";
16 | }
17 |
18 | return '' + data.text + "
";
19 | },
20 | },
21 | });
22 |
23 | $selector.change(function () {
24 | const value = $selector.val();
25 |
26 | if (value) {
27 | $links.filter("." + value.replace(".", "-")).first().click();
28 | }
29 | });
30 |
31 | const selectize = $selector[0].selectize;
32 |
33 | $(window).keydown(function (event) {
34 | if (
35 | !event.metaKey && !event.shiftKey && !event.ctrlKey && !event.altKey &&
36 | event.keyCode != 27 && !$(":focus").is("input")
37 | ) {
38 | const open = function () {
39 | selectize.open();
40 | $selector.siblings(".selectize-control").find(".selectize-input input")
41 | .focus();
42 | };
43 |
44 | open();
45 | }
46 | });
47 |
48 | $selector.siblings(".selectize-control").find(".selectize-input input")
49 | .keydown(function (event) {
50 | if (event.which === 27) { //esc
51 | $selector.siblings(".selectize-control").find(".selectize-input input")
52 | .blur();
53 | selectize.blur();
54 | selectize.clear();
55 | }
56 | });
57 |
58 | selectize.on("dropdown_open", function () {
59 | selectize.clear();
60 | });
61 | }
62 |
--------------------------------------------------------------------------------
/src/js/deps.js:
--------------------------------------------------------------------------------
1 | // import "../_vendor/jquery/jquery.js";
2 | // import "../_vendor/Magnific-Popup/jquery.magnific-popup.js";
3 | // import "../_vendor/selectize.js/js/selectize.js";
4 |
--------------------------------------------------------------------------------
/src/js/main.js:
--------------------------------------------------------------------------------
1 | import "./deps.js";
2 | import versions from "./versions-selector.js";
3 | import search from "./api-search.js";
4 | import modal from "./modal.js";
5 | import settings from "./settings.js";
6 |
7 | const $links = $(".main-content a");
8 |
9 | versions($("#version"), $links);
10 | search($("#search"), $links);
11 | modal($("#modal"), $links);
12 | settings($("#about-link"), $links);
13 |
14 | handleOffline();
15 | $(window).on("online offline", handleOffline);
16 |
17 | function handleOffline() {
18 | if (navigator.onLine) {
19 | $("html").removeClass("is-offline");
20 | } else {
21 | $("html").addClass("is-offline");
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/js/modal.js:
--------------------------------------------------------------------------------
1 | import { getValue } from "./settings.js";
2 |
3 | export default function init($modal, $links) {
4 | // Open links
5 | $links.click(function (e) {
6 | const $this = $(this);
7 |
8 | if ($this.hasClass("deactivate")) {
9 | e.preventDefault();
10 | return;
11 | }
12 |
13 | switch (getValue("open_links")) {
14 | case "modal-window":
15 | e.preventDefault();
16 |
17 | $modal.find(".link-api a").attr("href", $this.attr("href")).click();
18 |
19 | $.magnificPopup.open({
20 | items: {
21 | src: $modal,
22 | type: "inline",
23 | },
24 | mainClass: "modal-doc",
25 | close: function () {
26 | $modal.find("iframe").attr("src", "about:blank");
27 | },
28 | });
29 | return;
30 |
31 | case "new-window":
32 | e.preventDefault();
33 |
34 | window.open($this.attr("href"));
35 | return;
36 |
37 | case "same-window":
38 | document.location.href = $this.attr("href");
39 | return;
40 | }
41 | });
42 |
43 | //Modal menu
44 | const $menu = $modal.find("> ul a");
45 |
46 | $menu.on("click", function (e) {
47 | const $this = $(this);
48 |
49 | if ($this.attr("target") !== "_blank") {
50 | e.preventDefault();
51 |
52 | $menu.removeClass("selected");
53 | $this.addClass("selected");
54 |
55 | $modal.find("iframe").attr("src", $this.attr("href"));
56 | }
57 | });
58 | }
59 |
--------------------------------------------------------------------------------
/src/js/settings.js:
--------------------------------------------------------------------------------
1 | const settings = {
2 | open_links: "modal-window",
3 | layout: "horizontal",
4 | hide_removed: false,
5 | hide_deprecated: false,
6 | };
7 |
8 | export default function init($link) {
9 | $link.magnificPopup({
10 | type: "inline",
11 | mainClass: "modal-about",
12 | });
13 |
14 | const $settings = $($link.attr("href"));
15 |
16 | $settings.find(":radio").click(function () {
17 | const $this = $(this);
18 | const name = $this.attr("name");
19 |
20 | settings[name] = $this.val();
21 |
22 | if (name === "layout") {
23 | changeLayout(settings[name]);
24 | }
25 |
26 | localStorage.setItem("settings", JSON.stringify(settings));
27 | });
28 |
29 | $settings.find(":checkbox").click(function () {
30 | const $this = $(this);
31 | const name = $this.attr("name");
32 |
33 | settings[name] = $this.is(":checked");
34 |
35 | if (name === "hide_removed") {
36 | hide(name, settings[name]);
37 | }
38 |
39 | if (name === "hide_deprecated") {
40 | hide(name, settings[name]);
41 | }
42 |
43 | localStorage.setItem("settings", JSON.stringify(settings));
44 | });
45 |
46 | const savedSettings = localStorage.getItem("settings");
47 |
48 | if (savedSettings) {
49 | $.extend(settings, JSON.parse(savedSettings));
50 | }
51 |
52 | $.each(settings, function (name, value) {
53 | $settings.find(':radio[name="' + name + '"][value="' + value + '"]').prop(
54 | "checked",
55 | true,
56 | );
57 |
58 | if (name === "layout") {
59 | changeLayout(value);
60 | }
61 |
62 | $settings.find(':checkbox[name="' + name + '"][value="' + value + '"]')
63 | .prop("checked", true);
64 |
65 | if (name === "hide_removed") {
66 | hide(name, settings[name]);
67 | }
68 |
69 | if (name === "hide_deprecated") {
70 | hide(name, settings[name]);
71 | }
72 | });
73 | }
74 |
75 | export function getValue(name) {
76 | return settings[name];
77 | }
78 |
79 | function changeLayout(value) {
80 | if (value === "horizontal") {
81 | $(".main-content").removeClass("ly-vertical").addClass("ly-horizontal");
82 | } else {
83 | $(".main-content").removeClass("ly-horizontal").addClass("ly-vertical");
84 | }
85 | }
86 |
87 | function hide(name, value) {
88 | $(".main-content").toggleClass(name.replace("_", "-"), value);
89 | }
90 |
--------------------------------------------------------------------------------
/src/js/versions-selector.js:
--------------------------------------------------------------------------------
1 | let currentVersion;
2 |
3 | export default function init($selector, $links) {
4 | $selector.selectize();
5 |
6 | $selector.change(function () {
7 | const value = $selector.val();
8 | let activate = false;
9 | currentVersion = value;
10 |
11 | $links.removeClass("old-version removed");
12 |
13 | $.each($selector.data("selectize").options, function (_, option) {
14 | if (option.value == value) {
15 | activate = true;
16 | }
17 |
18 | const selector = ".v" + option.value.replace(/\./g, "-");
19 |
20 | if (!activate) {
21 | $links.filter(selector).addClass("old-version removed");
22 | } else {
23 | $links.filter(selector + "-d").addClass("old-version"); //Deprecated
24 | $links.filter(selector + "-r").addClass("removed"); //Removed
25 | }
26 | });
27 | });
28 |
29 | $selector.change();
30 | }
31 |
32 | export function getCurrent() {
33 | return currentVersion;
34 | }
35 |
--------------------------------------------------------------------------------