Skip to content

Commit 32bcb8e

Browse files
committed
Change notes to use warning class instead of blockquotes.
1 parent 99ac813 commit 32bcb8e

34 files changed

+83
-83
lines changed

entries/animate.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
<p>Shorthand CSS properties (e.g. font, background, border) are not fully supported. For example, if you want to animate the rendered border width, at least a border style and border width other than "auto" must be set in advance. Or, if you want to animate font size, you would use <code>fontSize</code> or the CSS equivalent <code>'font-size'</code> rather than simply <code>'font'</code>. </p>
2828
<p>In addition to numeric values, each property can take the strings <code>'show'</code>, <code>'hide'</code>, and <code>'toggle'</code>. These shortcuts allow for custom hiding and showing animations that take into account the display type of the element.</p>
2929
<p>Animated properties can also be relative. If a value is supplied with a leading <code>+=</code> or <code>-=</code> sequence of characters, then the target value is computed by adding or subtracting the given number from the current value of the property.</p>
30-
<blockquote>
30+
<div class="warning">
3131
<p><strong>Note:</strong> Unlike shorthand animation methods such as <code>.slideDown()</code> and <code>.fadeIn()</code>, the <code>.animate()</code> method does <em>not</em> make hidden elements visible as part of the effect. For example, given <code>$('someElement').hide().animate({height:'20px'}, 500)</code>, the animation will run, but <em>the element will remain hidden</em>.</p>
32-
</blockquote>
32+
</div>
3333
<h4 id="duration">Duration</h4>
3434
<p>Durations are given in milliseconds; higher values indicate slower animations, not faster ones. The default duration is <code>400</code> milliseconds. The strings <code>'fast'</code> and <code>'slow'</code> can be supplied to indicate durations of <code>200</code> and <code>600</code> milliseconds, respectively.</p>
3535
<h4 id="complete">Complete Function</h4>
@@ -62,12 +62,12 @@
6262
</p>
6363
<p>The <code>opacity</code> of the image is already at its target value, so this property is not animated by the second click. Since the target value for <code>left</code> is a relative value, the image moves even farther to the right during this second animation.</p>
6464
<p>Directional properties (<code>top</code>, <code>right</code>, <code>bottom</code>, <code>left</code>) have no discernible effect on elements if their <code>position</code> style property is <code>static</code>, which it is by default.</p>
65-
<blockquote>
65+
<div class="warning">
6666
<p><strong>Note: </strong>The <a href="http://jqueryui.com">jQuery UI</a> project extends the <code>.animate()</code> method by allowing some non-numeric styles such as colors to be animated. The project also includes mechanisms for specifying animations through CSS classes rather than individual attributes.</p>
67-
</blockquote>
68-
<blockquote>
67+
</div>
68+
<div class="warning">
6969
<p><strong>Note:</strong> if attempting to animate an element with a height or width of 0px, where contents of the element are visible due to overflow, jQuery may clip this overflow during animation. By fixing the dimensions of the original element being hidden however, it is possible to ensure that the animation runs smoothly. A <a href="http://www.google.com/search?q=clearfix">clearfix</a> can be used to automatically fix the dimensions of your main element without the need to set this manually.</p>
70-
</blockquote>
70+
</div>
7171
<h4 id="step">Step Function</h4>
7272
<p>The second version of <code>.animate()</code> provides a <code>step</code> option &#x2014; a callback function that is fired at each step of the animation. This function is useful for enabling custom animation types or altering the animation as it is occurring. It accepts two arguments (<code>now</code> and <code>fx</code>), and <code>this</code> is set to the DOM element being animated.
7373
</p>

entries/attr.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717
<li><strong>Convenience</strong>: It can be called directly on a jQuery object and chained to other jQuery methods.</li>
1818
<li><strong>Cross-browser consistency</strong>: The values of some attributes are reported inconsistently across browsers, and even across versions of a single browser. The <code>.attr()</code> method reduces such inconsistencies.</li>
1919
</ol>
20-
<blockquote>
20+
<div class="warning">
2121
<p><strong>Note:</strong> Attribute values are strings with the exception of a few attributes such as value and tabindex.</p>
22-
</blockquote>
23-
<blockquote>
22+
</div>
23+
<div class="warning">
2424
<p><strong>Note:</strong> Attempting to change the <code>type</code> attribute (or property) of an <code>input</code> element created via HTML or already in an HTML document will result in an error being thrown by Internet Explorer 6, 7, or 8.</p>
25-
</blockquote>
25+
</div>
2626
<p>As of jQuery 1.6, the <code>.attr()</code> method returns <code>undefined</code> for attributes that have not been set. <strong>To retrieve and change DOM properties such as the <code>checked</code>, <code>selected</code>, or <code>disabled</code> state of form elements, use the <a href="http://api.jquery.com/prop/">.prop()</a> method.</strong></p>
2727

2828
<h4>Attributes vs. Properties</h4>

entries/bind.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ $('#bar').bind('click', {msg: message}, function(event) {
113113
</code></pre>
114114
<p>This time the variable is not referred to directly within the handlers; instead, the variable is passed in <em>by value</em> through <code>eventData</code>, which fixes the value at the time the event is bound. The first handler will now display <samp>Spoon!</samp> while the second will alert <samp>Not in the face!</samp>
115115
</p>
116-
<blockquote>
116+
<div class="warning">
117117
<p>Note that objects are passed to functions <em>by reference</em>, which further complicates this scenario.</p>
118-
</blockquote>
118+
</div>
119119
<p>If <code>eventData</code> is present, it is the second argument to the <code>.bind()</code> method; if no additional data needs to be sent to the handler, then the callback is passed as the second and final argument.</p>
120-
<blockquote>
120+
<div class="warning">
121121
<p>See the <code>.trigger()</code> method reference for a way to pass data to a handler at the time the event happens rather than when the handler is bound.</p>
122-
</blockquote>
122+
</div>
123123
<p>As of jQuery 1.4 we can no longer attach data (and thus, events) to object, embed, or applet elements because critical errors occur when attaching data to Java applets.</p>
124124
<p><strong>Note: </strong>Although demonstrated in the next example, it is inadvisable to bind handlers to both the <code>click</code> and <code>dblclick</code> events for the same element. The sequence of events triggered varies from browser to browser, with some receiving two click events before the <code>dblclick</code> and others only one. Double-click sensitivity (maximum time between clicks that is detected as a double click) can vary by operating system and browser, and is often user-configurable.</p>
125125
</longdesc>

entries/clone.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,19 @@
4242
&lt;div class="hello"&gt;Hello&lt;/div&gt;
4343
&lt;/div&gt;
4444
&lt;/div&gt;</code></pre>
45-
<blockquote>
45+
<div class="warning">
4646
<p><strong>Note:</strong> When using the <code>.clone()</code> method, you can modify the cloned elements or their contents before (re-)inserting them into the document.</p>
47-
</blockquote>
47+
</div>
4848
<p>Normally, any event handlers bound to the original element are <em>not</em> copied to the clone. The optional <code>withDataAndEvents</code> parameter allows us to change this behavior, and to instead make copies of all of the event handlers as well, bound to the new copy of the element. As of jQuery 1.4, all element data (attached by the <code>.data()</code> method) is also copied to the new copy. </p>
4949
<p>However, objects and arrays within element data are not copied and will continue to be shared between the cloned element and the original element. To deep copy all data, copy each one manually:</p>
5050
<pre><code>var $elem = $('#elem').data( "arr": [ 1 ] ), // Original element with attached data
5151
$clone = $elem.clone( true )
5252
.data( "arr", $.extend( [], $elem.data("arr") ) ); // Deep copy to prevent data sharing
5353
</code></pre>
5454
<p>As of jQuery 1.5, <code>withDataAndEvents</code> can be optionally enhanced with <code>deepWithDataAndEvents </code> to copy the events and data for all children of the cloned element.</p>
55-
<blockquote>
55+
<div class="warning">
5656
<p><strong>Note:</strong> Using <code>.clone()</code> has the side-effect of producing elements with duplicate <code>id</code> attributes, which are supposed to be unique. Where possible, it is recommended to avoid cloning elements with this attribute or using <code>class</code> attributes as identifiers instead.</p>
57-
</blockquote>
57+
</div>
5858
</longdesc>
5959
<example>
6060
<desc>Clones all b elements (and selects the clones) and prepends them to all paragraphs.</desc>

entries/delay.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<p>Using the standard effects queue, we can, for example, set an 800-millisecond delay between the <code>.slideUp()</code> and <code>.fadeIn()</code> of <code>&lt;div id="foo"&gt;</code>:</p>
1818
<pre><code>$('#foo').slideUp(300).delay(800).fadeIn(400);</code></pre>
1919
<p>When this statement is executed, the element slides up for 300 milliseconds and then pauses for 800 milliseconds before fading in for 400 milliseconds.</p>
20-
<blockquote>
20+
<div class="warning">
2121
<p>
2222
<strong>The <code>.delay()</code> method is best for delaying between queued jQuery effects. Because it is limited&#x2014;it doesn't, for example, offer a way to cancel the delay&#x2014;<code>.delay()</code> is not a replacement for JavaScript's native <a href="https://developer.mozilla.org/en/DOM/window.setTimeout">setTimeout</a> function, which may be more appropriate for certain use cases.</strong>
2323
</p>
24-
</blockquote>
24+
</div>
2525
</longdesc>
2626
<example>
2727
<desc>Animate the hiding and showing of two divs, delaying the first before showing it.</desc>

entries/error.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
<p>
3434
<samp>Handler for .error() called.</samp>
3535
</p>
36-
<blockquote>
36+
<div class="warning">
3737
<p>The event handler <em>must</em> be attached before the browser fires the error event, which is why the example sets the src attribute after attaching the handler. Also, the error event may not be correctly fired when the page is served locally; <code>error</code> relies on HTTP status codes and will generally not be triggered if the URL uses the <code>file:</code> protocol.</p>
38-
</blockquote>
38+
</div>
3939
<p>Note: A jQuery error event handler should not be attached to the window object. The browser fires the window's error event when a script error occurs. However, the window error event receives different arguments and has different return value requirements than conventional event handlers. Use <code>window.onerror</code> instead.</p>
4040
</longdesc>
4141
<example>

entries/fadeOut.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
<img src="/resources/0042_06_39.png" alt=""/>
3939
<img src="/resources/0042_06_40.png" alt=""/>
4040
</p>
41-
<blockquote>
41+
<div class="warning">
4242
<p><strong>Note: </strong>To avoid unnecessary DOM manipulation, <code>.fadeOut()</code> will not hide an element that is already considered hidden. For information on which elements jQuery considers hidden, see <a href="http://api.jquery.com/hidden-selector"> :hidden Selector</a>.</p>
43-
</blockquote>
43+
</div>
4444
<h4 id="easing">Easing</h4>
4545
<p><strong>As of jQuery 1.4.3</strong>, an optional string naming an easing function may be used. Easing functions specify the speed at which the animation progresses at different points within the animation. The only easing implementations in the jQuery library are the default, called <code>swing</code>, and one that progresses at a constant pace, called <code>linear</code>. More easing functions are available with the use of plug-ins, most notably the <a href="http://jqueryui.com">jQuery UI suite</a>.</p>
4646
<h4 id="callback-function">Callback Function</h4>

entries/find.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
<p>If we begin at item II, we can find list items within it:</p>
4747
<pre><code>$('li.item-ii').find('li').css('background-color', 'red');</code></pre>
4848
<p>The result of this call is a red background on items A, B, 1, 2, 3, and C. Even though item II matches the selector expression, it is not included in the results; only descendants are considered candidates for the match.</p>
49-
<blockquote>
49+
<div class="warning">
5050
<p>Unlike in the rest of the tree traversal methods, the selector expression is required in a call to <code>.find()</code>. If we need to retrieve all of the descendant elements, we can pass in the universal selector <code>'*'</code> to accomplish this.</p>
51-
</blockquote>
51+
</div>
5252
<p><a href="http://api.jquery.com/jquery/#selector-context">Selector context</a> is implemented with the <code>.find()</code> <code>method;</code> therefore, <code>$('li.item-ii').find('li')</code> is equivalent to <code>$('li', 'li.item-ii')</code>.</p>
5353
<p><strong>As of jQuery 1.6</strong>, we can also filter the selection with a given jQuery collection or element. With the same nested list as above, if we start with:</p>
5454
<pre><code>var $allListElements = $('li');</code></pre>

entries/finish.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
<p>When <code>.finish()</code> is called on an element, the currently-running animation and all queued animations (if any) immediately stop and their CSS properties set to their target values. All queued animations are removed.</p>
1313
<p>If the first argument is provided, only the animations in the queue represented by that string will be stopped.</p>
1414
<p>The <code>.finish()</code> method is similar to <code>.stop(true, true)</code> in that it clears the queue and the current animation jumps to its end value. It differs, however, in that <code>.finish()</code> also causes the CSS property of all <em>queued</em> animations to jump to their end values, as well.</p>
15-
<blockquote>
15+
<div class="warning">
1616
<p>Animations may be stopped globally by setting the property <code>$.fx.off</code> to <code>true</code>. When this is done, all animation methods will immediately set elements to their final state when called, rather than displaying an effect.</p>
17-
</blockquote>
17+
</div>
1818
</longdesc>
1919
<example>
2020
<desc>Click the Go button once to start the animation, and then click the other buttons to see how they affect the current and queued animations.</desc>

entries/focus.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
<li>The <code>focus</code> event is sent to an element when it gains focus. This event is implicitly applicable to a limited set of elements, such as form elements (<code>&lt;input&gt;</code>, <code>&lt;select&gt;</code>, etc.) and links (<code>&lt;a href&gt;</code>). In recent browser versions, the event can be extended to include all element types by explicitly setting the element's <code>tabindex</code> property. An element can gain focus via keyboard commands, such as the Tab key, or by mouse clicks on the element.</li>
2727
<li>Elements with focus are usually highlighted in some way by the browser, for example with a dotted line surrounding the element. The focus is used to determine which element is the first to receive keyboard-related events.</li>
2828
</ul>
29-
<blockquote>
29+
<div class="warning">
3030
<p>Attempting to set focus to a hidden element causes an error in Internet Explorer. Take care to only use <code>.focus()</code> on elements that are visible. To run an element's focus event handlers without setting focus to the element, use <code>.triggerHandler("focus")</code> instead of <code>.focus()</code>.</p>
31-
</blockquote>
31+
</div>
3232
<p>For example, consider the HTML:</p>
3333
<pre><code>&lt;form&gt;
3434
&lt;input id="target" type="text" value="Field 1" /&gt;

entries/height.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<pre><code>$(window).height(); // returns height of browser viewport
1717
$(document).height(); // returns height of HTML document</code></pre>
1818
<p>Note that <code>.height()</code> will always return the content height, regardless of the value of the CSS <code>box-sizing</code> property.</p>
19-
<blockquote>
19+
<div class="warning">
2020
<p><strong>Note:</strong> Although <code>style</code> and <code>script</code> tags will report a value for <code>.width()</code> or <code>height()</code> when absolutely positioned and given <code>display:block</code>, it is strongly discouraged to call those methods on these tags. In addition to being a bad practice, the results may also prove unreliable.</p>
21-
</blockquote>
21+
</div>
2222
</longdesc>
2323
<example>
2424
<desc>Show various heights. Note the values are from the iframe so might be smaller than you expected. The yellow highlight shows the iframe body.</desc>

entries/jQuery.ajax.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ $.ajax({
205205
</p>
206206
</li>
207207
</ul>
208-
<blockquote>
208+
<div class="warning">
209209
<p><strong>Deprecation Notice:</strong> The <code>jqXHR.success()</code>, <code>jqXHR.error()</code>, and <code>jqXHR.complete()</code> callbacks are deprecated as of jQuery 1.8. To prepare your code for their eventual removal, use <code>jqXHR.done()</code>, <code>jqXHR.fail()</code>, and <code>jqXHR.always()</code> instead.</p>
210-
</blockquote>
210+
</div>
211211
<pre><code>// Assign handlers immediately after making the request,
212212
// and remember the jqxhr object for this request
213213
var jqxhr = $.ajax( "example.php" )

entries/jQuery.ajaxSetup.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
// url not set here; uses ping.php
2222
data: {'name': 'Dan'}
2323
});</code></pre>
24-
<blockquote>
24+
<div class="warning">
2525
<p>Note: Global callback functions should be set with their respective global Ajax event handler methods&#x2014;<code><a href="/ajaxStart">.ajaxStart()</a></code>, <code><a href="/ajaxStop">.ajaxStop()</a></code>, <code><a href="/ajaxComplete">.ajaxComplete()</a></code>, <code><a href="/ajaxError">.ajaxError()</a></code>, <code><a href="/ajaxSuccess">.ajaxSuccess()</a></code>, <code><a href="/ajaxSend">.ajaxSend()</a></code>&#x2014;rather than within the <code>options</code> object for <code>$.ajaxSetup()</code>.</p>
26-
</blockquote>
26+
</div>
2727
</longdesc>
2828
<example>
2929
<desc>Sets the defaults for Ajax requests to the url "/xmlhttp/", disables global handlers and uses POST instead of GET. The following Ajax requests then sends some data without having to set anything else.</desc>

entries/jQuery.contains.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
<desc>Check to see if a DOM element is a descendant of another DOM element.</desc>
1414
<longdesc>
1515
<p>The <code>$.contains()</code> method returns <code>true</code> if the DOM element provided by the second argument is a descendant of the DOM element provided by the first argument, whether it is a direct child or nested more deeply. Otherwise, it returns <code>false</code>. Only <em>element</em> nodes are supported; if the second argument is a text or comment node, <code>$.contains()</code> will return <code>false</code>.</p>
16-
<blockquote>
16+
<div class="warning">
1717
<p><strong>Note:</strong> The first argument <em>must</em> be a DOM element, not a jQuery object or plain JavaScript object.</p>
18-
</blockquote>
18+
</div>
1919
</longdesc>
2020
<example>
2121
<desc>Check if an element is a descendant of another.</desc>

0 commit comments

Comments
 (0)