forked from kspearrin/Visual-Studio-jQuery-Code-Snippets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
SnippetListing.html
147 lines (146 loc) · 18.5 KB
/
SnippetListing.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<table>
<thead>
<tr><th>Type</th><th>Shortcut</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td>HTML</td><td>jq</td><td>A script tag with a $(document).ready() shortcut.</td></tr>
<tr><td>HTML</td><td>jqScript</td><td>A script tag with a jQuery src.</td></tr>
<tr><td>HTML</td><td>jqScriptCdnGoogle</td><td>A script tag with a jQuery src using Google's CDN.</td></tr>
<tr><td>HTML</td><td>jqScriptCdnMs</td><td>A script tag with a jQuery src using Microsoft's CDN.</td></tr>
<tr><td>HTML</td><td>jqScriptMin</td><td>A script tag with a jQuery src and a $(document).ready() shortcut.</td></tr>
<tr><td>HTML</td><td>jqScriptUiCdnGoogle</td><td>A script tag with a jQuery UI src using Google's CDN.</td></tr>
<tr><td>HTML</td><td>jqScriptValidateCdnMs</td><td>A script tag with a jQuery validation plugin src using Microsoft's CDN.</td></tr>
<tr><td>HTML</td><td>jqScriptValidateUnobtrusiveCdnMs</td><td>A script tag with a jQuery unobtrusive validation plugin src using Microsoft's CDN</td></tr>
<tr><td>JavaScript</td><td>func</td><td>An anonymous function.</td></tr>
<tr><td>JavaScript</td><td>jqAfter</td><td>Insert content, specified by the parameter, after each element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqAjax</td><td>Perform an asynchronous HTTP (Ajax) request.</td></tr>
<tr><td>JavaScript</td><td>jqAjaxAspNetWebService</td><td>Perform an asynchronous HTTP (Ajax) request to a ASP.NET web service.</td></tr>
<tr><td>JavaScript</td><td>jqAppend</td><td>Insert content, specified by the parameter, to the end of each element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqAppendTo</td><td>Insert every element in the set of matched elements to the end of the target.</td></tr>
<tr><td>JavaScript</td><td>jqAttrGet</td><td>Get the value of an attribute for the first element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqAttrRemove</td><td>Remove an attribute from each element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqAttrSet</td><td>Set one or more attributes for the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqAttrSetFn</td><td>Set one or more attributes for the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqAttrSetObj</td><td>Set one or more attributes for the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqBefore</td><td>Insert content, specified by the parameter, before each element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqBind</td><td>Attach a handler to an event for the elements.</td></tr>
<tr><td>JavaScript</td><td>jqBindWithData</td><td>Attach a handler to an event for the elements.</td></tr>
<tr><td>JavaScript</td><td>jqBlur</td><td>Bind an event handler to the "blur" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqChange</td><td>Bind an event handler to the "change" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqClassAdd</td><td>Adds the specified class(es) to each of the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqClassRemove</td><td>Remove a single class, multiple classes, or all classes from each element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqClassToggle</td><td>Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence.</td></tr>
<tr><td>JavaScript</td><td>jqClassToggleSwitch</td><td>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.</td></tr>
<tr><td>JavaScript</td><td>jqClick</td><td>Bind an event handler to the "click" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqClone</td><td>Create a deep copy of the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqCloneWithEvents</td><td>Create a deep copy of the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqCssGet</td><td>Get the computed style properties for the first element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqCssSet</td><td>Set one or more CSS properties for the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqCssSetObj</td><td>Set one or more CSS properties for the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqDataGet</td><td>Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.</td></tr>
<tr><td>JavaScript</td><td>jqDataRemove</td><td>Remove a previously-stored piece of data.</td></tr>
<tr><td>JavaScript</td><td>jqDataSet</td><td>Store arbitrary data associated with the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqDataSetObj</td><td>Store arbitrary data associated with the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqDie</td><td>Remove event handlers previously attached using .live() from the elements.</td></tr>
<tr><td>JavaScript</td><td>jqDieAll</td><td>Remove event handlers previously attached using .live() from the elements.</td></tr>
<tr><td>JavaScript</td><td>jqDieFn</td><td>Remove event handlers previously attached using .live() from the elements.</td></tr>
<tr><td>JavaScript</td><td>jqDocReady</td><td>Function to execute when the DOM is fully loaded.</td></tr>
<tr><td>JavaScript</td><td>jqDocReadyShort</td><td>Function to execute when the DOM is fully loaded.</td></tr>
<tr><td>JavaScript</td><td>jqEach</td><td>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.</td></tr>
<tr><td>JavaScript</td><td>jqEachElement</td><td>Iterate over a jQuery object, executing a function for each matched element. </td></tr>
<tr><td>JavaScript</td><td>jqEmpty</td><td>Remove all child nodes of the set of matched elements from the DOM.</td></tr>
<tr><td>JavaScript</td><td>jqFadeIn</td><td>Display the matched elements by fading them to opaque.</td></tr>
<tr><td>JavaScript</td><td>jqFadeInFull</td><td>Display the matched elements by fading them to opaque.</td></tr>
<tr><td>JavaScript</td><td>jqFadeOut</td><td>Hide the matched elements by fading them to transparent.</td></tr>
<tr><td>JavaScript</td><td>jqFadeOutFull</td><td>Hide the matched elements by fading them to transparent.</td></tr>
<tr><td>JavaScript</td><td>jqFadeTo</td><td>Adjust the opacity of the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqFadeToFull</td><td>Adjust the opacity of the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqFind</td><td>Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.</td></tr>
<tr><td>JavaScript</td><td>jqFocus</td><td>Bind an event handler to the "focus" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqGet</td><td>Load data from the server using a HTTP GET request.</td></tr>
<tr><td>JavaScript</td><td>jqGetJson</td><td>Load JSON-encoded data from the server using a GET HTTP request.</td></tr>
<tr><td>JavaScript</td><td>jqGetScript</td><td>Load a JavaScript file from the server using a GET HTTP request, then execute it.</td></tr>
<tr><td>JavaScript</td><td>jqHasClass</td><td>Determine whether any of the matched elements are assigned the given class.</td></tr>
<tr><td>JavaScript</td><td>jqHeightGet</td><td>Get the current computed height for the first element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqHeightSet</td><td>Set the CSS height of every matched element.</td></tr>
<tr><td>JavaScript</td><td>jqHide</td><td>Hide the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqHideFull</td><td>Hide the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqHover</td><td>Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.</td></tr>
<tr><td>JavaScript</td><td>jqHtmlGet</td><td>Get the HTML contents of the first element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqHtmlSet</td><td>Set the HTML contents of each element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqInnerHeight</td><td>Get the current computed height for the first element in the set of matched elements, including padding but not border.</td></tr>
<tr><td>JavaScript</td><td>jqInnerWidth</td><td>Get the current computed inner width for the first element in the set of matched elements, including padding but not border.</td></tr>
<tr><td>JavaScript</td><td>jqInsertAfter</td><td>Insert every element in the set of matched elements after the target.</td></tr>
<tr><td>JavaScript</td><td>jqInsertBefore</td><td>Insert every element in the set of matched elements before the target.</td></tr>
<tr><td>JavaScript</td><td>jqKeyDown</td><td>Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqKeyPress</td><td>Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqKeyUp</td><td>Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqLoadGet</td><td>Load data from the server and place the returned HTML into the matched element.</td></tr>
<tr><td>JavaScript</td><td>jqLoadPost</td><td>Load data from the server and place the returned HTML into the matched element.</td></tr>
<tr><td>JavaScript</td><td>jqMap</td><td>Translate all items in an array or object to new array of items.</td></tr>
<tr><td>JavaScript</td><td>jqMouseDown</td><td>Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqMouseEnter</td><td>Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element.</td></tr>
<tr><td>JavaScript</td><td>jqMouseLeave</td><td>Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element.</td></tr>
<tr><td>JavaScript</td><td>jqMouseMove</td><td>Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqMouseOut</td><td>Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqMouseOver</td><td>Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqMouseUp</td><td>Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqNamespace</td><td>A namespace template. ref: http://enterprisejquery.com/2010/10/how-good-c-habits-can-encourage-bad-javascript-habits-part-1/</td></tr>
<tr><td>JavaScript</td><td>jqOff</td><td>Detach an event handler from one or more events on the selected elements.</td></tr>
<tr><td>JavaScript</td><td>jqOffSel</td><td>Detach an event handler from one or more events on the document with the specified selector.</td></tr>
<tr><td>JavaScript</td><td>jqOffsetGet</td><td>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.</td></tr>
<tr><td>JavaScript</td><td>jqOffsetParent</td><td>Get the closest ancestor element that is positioned.</td></tr>
<tr><td>JavaScript</td><td>jqOn</td><td>Attach an event handler function for one or more events to the selected elements.</td></tr>
<tr><td>JavaScript</td><td>jqOne</td><td>Attach a handler to an event for the elements. The handler is executed at most once per element per event type.</td></tr>
<tr><td>JavaScript</td><td>jqOneWithData</td><td>Attach a handler to an event for the elements. The handler is executed at most once per element per event type.</td></tr>
<tr><td>JavaScript</td><td>jqOnSel</td><td>Attach an event handler function for one or more events to the document filtered by the selector.</td></tr>
<tr><td>JavaScript</td><td>jqOuterHeight</td><td>Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin. Returns a number (without "px") representation of the value or null if called on an empty set of elements.</td></tr>
<tr><td>JavaScript</td><td>jqOuterWidth</td><td>Get the current computed width for the first element in the set of matched elements, including padding and border.</td></tr>
<tr><td>JavaScript</td><td>jqPlugin</td><td>Plugin template.</td></tr>
<tr><td>JavaScript</td><td>jqPosition</td><td>Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.</td></tr>
<tr><td>JavaScript</td><td>jqPost</td><td>Load data from the server using a HTTP POST request.</td></tr>
<tr><td>JavaScript</td><td>jqPrepend</td><td>Insert content, specified by the parameter, to the beginning of each element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqPrependTo</td><td>Insert every element in the set of matched elements to the beginning of the target.</td></tr>
<tr><td>JavaScript</td><td>jqRemove</td><td>Remove the set of matched elements from the DOM.</td></tr>
<tr><td>JavaScript</td><td>jqRemoveExp</td><td>Remove the set of matched elements from the DOM.</td></tr>
<tr><td>JavaScript</td><td>jqReplaceAll</td><td>Replace each target element with the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqReplaceWith</td><td>Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.</td></tr>
<tr><td>JavaScript</td><td>jqResize</td><td>Bind an event handler to the "resize" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqScroll</td><td>Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqScrollLeftGet</td><td>Get the current horizontal position of the scroll bar for the first element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqScrollLeftSet</td><td>Set the current horizontal position of the scroll bar for each of the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqScrollTopGet</td><td>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.</td></tr>
<tr><td>JavaScript</td><td>jqScrollTopSet</td><td>Set the current vertical position of the scroll bar for each of the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqSelect</td><td>Bind an event handler to the "select" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqSelectTrigger</td><td>Bind an event handler to the "select" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqShow</td><td>Display the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqShowFull</td><td>Display the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqSlideDown</td><td>Display the matched elements with a sliding motion.</td></tr>
<tr><td>JavaScript</td><td>jqSlideDownFull</td><td>Display the matched elements with a sliding motion.</td></tr>
<tr><td>JavaScript</td><td>jqSlideToggle</td><td>Display or hide the matched elements with a sliding motion.</td></tr>
<tr><td>JavaScript</td><td>jqSlideToggleFull</td><td>Display or hide the matched elements with a sliding motion.</td></tr>
<tr><td>JavaScript</td><td>jqSlideUp</td><td>Display the matched elements with a sliding motion.</td></tr>
<tr><td>JavaScript</td><td>jqSlideUpFull</td><td>Display the matched elements with a sliding motion.</td></tr>
<tr><td>JavaScript</td><td>jqSubmit</td><td>Bind an event handler to the "submit" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqSubmitTrigger</td><td>Bind an event handler to the "submit" JavaScript event, or trigger that event on an element.</td></tr>
<tr><td>JavaScript</td><td>jqTextGet</td><td>Get the combined text contents of each element in the set of matched elements, including their descendants.</td></tr>
<tr><td>JavaScript</td><td>jqTextSet</td><td>Set the content of each element in the set of matched elements to the specified text.</td></tr>
<tr><td>JavaScript</td><td>jqToggle</td><td>Display or hide the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqToggleFull</td><td>Display or hide the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqToggleSwitch</td><td>Display or hide the matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqTrigger</td><td>Execute all handlers and behaviors attached to the matched elements for the given event type.</td></tr>
<tr><td>JavaScript</td><td>jqTriggerHandler</td><td>Execute all handlers attached to an element for an event.</td></tr>
<tr><td>JavaScript</td><td>jqTriggerHandlerWithData</td><td>Execute all handlers attached to an element for an event.</td></tr>
<tr><td>JavaScript</td><td>jqTriggerWithData</td><td>Execute all handlers and behaviors attached to the matched elements for the given event type.</td></tr>
<tr><td>JavaScript</td><td>jqUnbind</td><td>Remove a previously-attached event handler from the elements.</td></tr>
<tr><td>JavaScript</td><td>jqUnbindAll</td><td>Remove a previously-attached event handler from the elements.</td></tr>
<tr><td>JavaScript</td><td>jqUnload</td><td>Bind an event handler to the "unload" JavaScript event.</td></tr>
<tr><td>JavaScript</td><td>jqValGet</td><td>Get the current value of the first element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqValSet</td><td>Set the value of each element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqWidthGet</td><td>Get the current computed width for the first element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqWidthSet</td><td>Set the CSS width of each element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqWrap</td><td>Wrap an HTML structure around each element in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqWrapAll</td><td>Wrap an HTML structure around all elements in the set of matched elements.</td></tr>
<tr><td>JavaScript</td><td>jqWrapInner</td><td>Wrap an HTML structure around the content of each element in the set of matched elements.</td></tr>
</tbody>
</table>