⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jquery1.1_api_en.xml

📁 jquery api解压后即可使用
💻 XML
📖 第 1 页 / 共 5 页
字号:
<params type='&lt;Content&gt;' name='content'><desc>Content to append to the selected element to.</desc></params><examples><desc>Appends all paragraphs to the element with the ID "foo"</desc><before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;div id="foo"&gt;&lt;/div&gt;</before><code>$("p").appendTo("#foo");</code><result>&lt;div id="foo"&gt;&lt;p&gt;I would like to say: &lt;/p&gt;&lt;/div&gt;</result></examples></method><method cat='DOM/Manipulation' type='jQuery' see='prepend(&lt;Content&gt;)' short='Prepend all of the matched elements to another, specified, set of elements.' name='prependTo'><desc>Prepend all of the matched elements to another, specified, set of elements.This operation is, essentially, the reverse of doing a regular$(A).prepend(B), in that instead of prepending B to A, you're prependingA to B.</desc><params type='&lt;Content&gt;' name='content'><desc>Content to prepend to the selected element to.</desc></params><examples><desc>Prepends all paragraphs to the element with the ID "foo"</desc><before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;div id="foo"&gt;&lt;b&gt;Hello&lt;/b&gt;&lt;/div&gt;</before><code>$("p").prependTo("#foo");</code><result>&lt;div id="foo"&gt;&lt;p&gt;I would like to say: &lt;/p&gt;&lt;b&gt;Hello&lt;/b&gt;&lt;/div&gt;</result></examples></method><method cat='DOM/Manipulation' type='jQuery' see='before(&lt;Content&gt;)' short='Insert all of the matched elements before another, specified, set of elements.' name='insertBefore'><desc>Insert all of the matched elements before another, specified, set of elements.This operation is, essentially, the reverse of doing a regular$(A).before(B), in that instead of inserting B before A, you're insertingA before B.</desc><params type='&lt;Content&gt;' name='content'><desc>Content to insert the selected element before.</desc></params><examples><desc>Same as $("#foo").before("p")</desc><before>&lt;div id="foo"&gt;Hello&lt;/div&gt;&lt;p&gt;I would like to say: &lt;/p&gt;</before><code>$("p").insertBefore("#foo");</code><result>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;div id="foo"&gt;Hello&lt;/div&gt;</result></examples></method><method cat='DOM/Manipulation' type='jQuery' see='after(&lt;Content&gt;)' short='Insert all of the matched elements after another, specified, set of elements.' name='insertAfter'><desc>Insert all of the matched elements after another, specified, set of elements.This operation is, essentially, the reverse of doing a regular$(A).after(B), in that instead of inserting B after A, you're insertingA after B.</desc><params type='&lt;Content&gt;' name='content'><desc>Content to insert the selected element after.</desc></params><examples><desc>Same as $("#foo").after("p")</desc><before>&lt;p&gt;I would like to say: &lt;/p&gt;&lt;div id="foo"&gt;Hello&lt;/div&gt;</before><code>$("p").insertAfter("#foo");</code><result>&lt;div id="foo"&gt;Hello&lt;/div&gt;&lt;p&gt;I would like to say: &lt;/p&gt;</result></examples></method><method cat='DOM/Attributes' type='jQuery' short='Remove an attribute from each of the matched elements.' name='removeAttr'><desc>Remove an attribute from each of the matched elements.</desc><params type='String' name='name'><desc>The name of the attribute to remove.</desc></params><examples><code>$("input").removeAttr("disabled")</code><result>&lt;input/&gt;</result><before>&lt;input disabled="disabled"/&gt;</before></examples></method><method cat='DOM/Attributes' type='jQuery' see='removeClass(String)' short='Adds the specified class(es) to each of the set of matched elements.' name='addClass'><desc>Adds the specified class(es) to each of the set of matched elements.</desc><params type='String' name='class'><desc>One or more CSS classes to add to the elements</desc></params><examples><code>$("p").addClass("selected")</code><result>[ &lt;p class="selected"&gt;Hello&lt;/p&gt; ]</result><before>&lt;p&gt;Hello&lt;/p&gt;</before></examples><examples><code>$("p").addClass("selected highlight")</code><result>[ &lt;p class="selected highlight"&gt;Hello&lt;/p&gt; ]</result><before>&lt;p&gt;Hello&lt;/p&gt;</before></examples></method><method cat='DOM/Attributes' type='jQuery' see='addClass(String)' short='Removes all or the specified class(es) from the set of matched elements.' name='removeClass'><desc>Removes all or the specified class(es) from the set of matched elements.</desc><params type='String' name='class'><desc>(optional) One or more CSS classes to remove from the elements</desc></params><examples><code>$("p").removeClass()</code><result>[ &lt;p&gt;Hello&lt;/p&gt; ]</result><before>&lt;p class="selected"&gt;Hello&lt;/p&gt;</before></examples><examples><code>$("p").removeClass("selected")</code><result>[ &lt;p class="first"&gt;Hello&lt;/p&gt; ]</result><before>&lt;p class="selected first"&gt;Hello&lt;/p&gt;</before></examples><examples><code>$("p").removeClass("selected highlight")</code><result>[ &lt;p class="first"&gt;Hello&lt;/p&gt; ]</result><before>&lt;p class="highlight selected first"&gt;Hello&lt;/p&gt;</before></examples></method><method cat='DOM/Attributes' type='jQuery' short='Adds the specified class if it is not present, removes it if it ispresent.' name='toggleClass'><desc>Adds the specified class if it is not present, removes it if it ispresent.</desc><params type='String' name='class'><desc>A CSS class with which to toggle the elements</desc></params><examples><code>$("p").toggleClass("selected")</code><result>[ &lt;p class="selected"&gt;Hello&lt;/p&gt;, &lt;p&gt;Hello Again&lt;/p&gt; ]</result><before>&lt;p&gt;Hello&lt;/p&gt;&lt;p class="selected"&gt;Hello Again&lt;/p&gt;</before></examples></method><method cat='DOM/Manipulation' type='jQuery' short='Removes all matched elements from the DOM.' name='remove'><desc>Removes all matched elements from the DOM. This does NOT remove them from thejQuery object, allowing you to use the matched elements further.Can be filtered with an optional expressions.</desc><params type='String' name='expr'><desc>(optional) A jQuery expression to filter elements by.</desc></params><examples><code>$("p").remove();</code><result>how are</result><before>&lt;p&gt;Hello&lt;/p&gt; how are &lt;p&gt;you?&lt;/p&gt;</before></examples><examples><code>$("p").remove(".hello");</code><result>how are &lt;p&gt;you?&lt;/p&gt;</result><before>&lt;p class="hello"&gt;Hello&lt;/p&gt; how are &lt;p&gt;you?&lt;/p&gt;</before></examples></method><method cat='DOM/Manipulation' type='jQuery' short='Removes all child nodes from the set of matched elements.' name='empty'><desc>Removes all child nodes from the set of matched elements.</desc><examples><code>$("p").empty()</code><result>[ &lt;p&gt;&lt;/p&gt; ]</result><before>&lt;p&gt;Hello, &lt;span&gt;Person&lt;/span&gt; &lt;a href="#"&gt;and person&lt;/a&gt;&lt;/p&gt;</before></examples></method><method cat='Core' type='jQuery' short='Reduce the set of matched elements to a single element.' name='eq'><desc>Reduce the set of matched elements to a single element.The position of the element in the set of matched elementsstarts at 0 and goes to length - 1.</desc><params type='Number' name='pos'><desc>The index of the element that you wish to limit to.</desc></params><examples><code>$("p").eq(1)</code><result>[ &lt;p&gt;So is this&lt;/p&gt; ]</result><before>&lt;p&gt;This is just a test.&lt;/p&gt;&lt;p&gt;So is this&lt;/p&gt;</before></examples></method><method cat='Core' type='jQuery' short='Reduce the set of matched elements to all elements before a given position.' name='lt'><desc>Reduce the set of matched elements to all elements before a given position.The position of the element in the set of matched elementsstarts at 0 and goes to length - 1.</desc><params type='Number' name='pos'><desc>Reduce the set to all elements below this position.</desc></params><examples><code>$("p").lt(1)</code><result>[ &lt;p&gt;This is just a test.&lt;/p&gt; ]</result><before>&lt;p&gt;This is just a test.&lt;/p&gt;&lt;p&gt;So is this&lt;/p&gt;</before></examples></method><method cat='Core' type='jQuery' short='Reduce the set of matched elements to all elements after a given position.' name='gt'><desc>Reduce the set of matched elements to all elements after a given position.The position of the element in the set of matched elementsstarts at 0 and goes to length - 1.</desc><params type='Number' name='pos'><desc>Reduce the set to all elements after this position.</desc></params><examples><code>$("p").gt(0)</code><result>[ &lt;p&gt;So is this&lt;/p&gt; ]</result><before>&lt;p&gt;This is just a test.&lt;/p&gt;&lt;p&gt;So is this&lt;/p&gt;</before></examples></method><method cat='DOM/Traversing' type='jQuery' short='Filter the set of elements to those that contain the specified text.' name='contains'><desc>Filter the set of elements to those that contain the specified text.</desc><params type='String' name='str'><desc>The string that will be contained within the text of an element.</desc></params><examples><code>$("p").contains("test")</code><result>[ &lt;p&gt;This is just a test.&lt;/p&gt; ]</result><before>&lt;p&gt;This is just a test.&lt;/p&gt;&lt;p&gt;So is this&lt;/p&gt;</before></examples></method><method cat='CSS' type='String' short='Get the current computed, pixel, width of the first matched element.' name='width'><desc>Get the current computed, pixel, width of the first matched element.</desc><examples><code>$("p").width();</code><result>300</result><before>&lt;p&gt;This is just a test.&lt;/p&gt;</before></examples></method><method cat='CSS' type='jQuery' short='Set the CSS width of every matched element.' name='width'><desc>Set the CSS width of every matched element. If no explicit unitwas specified (like 'em' or '%') then "px" is added to the width.</desc><params type='String|Number' name='val'><desc>Set the CSS property to the specified value.</desc></params><examples><code>$("p").width(20);</code><result>&lt;p style="width:20px;"&gt;This is just a test.&lt;/p&gt;</result><before>&lt;p&gt;This is just a test.&lt;/p&gt;</before></examples><examples><code>$("p").width("20em");</code><result>&lt;p style="width:20em;"&gt;This is just a test.&lt;/p&gt;</result><before>&lt;p&gt;This is just a test.&lt;/p&gt;</before></examples></method><method cat='CSS' type='String' short='Get the current computed, pixel, height of the first matched element.' name='height'><desc>Get the current computed, pixel, height of the first matched element.</desc><examples><code>$("p").height();</code><result>300</result><before>&lt;p&gt;This is just a test.&lt;/p&gt;</before></examples></method><method cat='CSS' type='jQuery' short='Set the CSS width of every matched element.' name='height'><desc>Set the CSS width of every matched element. If no explicit unitwas specified (like 'em' or '%') then "px" is added to the width.</desc><params type='String|Number' name='val'><desc>Set the CSS property to the specified value.</desc></params><examples><code>$("p").height(20);</code><result>&lt;p style="height:20px;"&gt;This is just a test.&lt;/p&gt;</result><before>&lt;p&gt;This is just a test.&lt;/p&gt;</before></examples><examples><code>$("p").height("20em");</code><result>&lt;p style="height:20em;"&gt;This is just a test.&lt;/p&gt;</result><before>&lt;p&gt;This is just a test.&lt;/p&gt;</before></examples></method><method cat='Core' type='Array&lt;Element&gt;' short='' private='1' name='$.find'><desc></desc></method><method cat='DOM/Traversing' type='Array&lt;Element&gt;' short='All ancestors of a given element.' name='$.parents' private='1'><desc>All ancestors of a given element.</desc><params type='Element' name='elem'><desc>The element to find the ancestors of.</desc></params></method><method cat='DOM/Traversing' type='DOMElement' short='A handy, and fast, way to traverse in a particular direction and finda specific element.' name='$.nth' private='1'><desc>A handy, and fast, way to traverse in a particular direction and finda specific element.</desc><params type='DOMElement' name='cur'><desc>The element to search from.</desc></params><params type='String|Number' name='num'><desc>The Nth result to match. Can be a number or a string (like 'even' or 'odd').</desc></params><params type='String' name='dir'><desc>The direction to move in (pass in something like 'previousSibling' or 'nextSibling').</desc></params></method><method cat='DOM/Traversing' type='Array' short='All elements on a specified axis.' name='$.sibling' private='1'><desc>All elements on a specified axis.</desc><params type='Element' name='elem'><desc>The element to find all the siblings of (including itself).</desc></params></method><method cat='Events' type='jQuery' short='Binds a handler to a particular event (like click) for each matched element.' name='bind'><desc>Binds a handler to a particular event (like click) for each matched element.The event handler is passed an event object that you can use to preventdefault behaviour. To stop both default action and event bubbling, your handlerhas to return false.In most cases, you can define your event handlers as anonymous functions(see first example). In cases where that is not possible, you can pass additionaldata as the second paramter (and the handler function as the third), see second example.</desc><params type='String' name='type'><desc>An event type</desc></params><params type='Object' name='data'><desc>(optional) Additional d

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -