forked from angular/code.angularjs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular.element.html
56 lines (50 loc) · 2.46 KB
/
angular.element.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
<h1>angular.element</h1>
<fieldset class="workInProgress">
<legend>Work In Progress</legend>
This page is currently being revised. It might be incomplete or contain inaccuracies.
</fieldset>
<h2>Description</h2>
<p>Wraps a raw DOM element or HTML string as <a href="http://jquery.com">jQuery</a> element.
<code>angular.element</code> is either an alias for <a href="http://api.jquery.com/jQuery/">jQuery</a> function if
jQuery is loaded or a function that wraps the element or string in angular's jQuery lite
implementation.</p>
<p>Real jQuery always takes precedence if it was loaded before angular.</p>
<p>Angular's jQuery lite implementation is a tiny API-compatible subset of jQuery which allows
angular to manipulate DOM. The functions implemented are usually just the basic versions of
them and might not support arguments and invocation styles.</p>
<p>NOTE: All element references in angular are always wrapped with jQuery (lite) and are never
raw DOM references.</p>
<p>Angular's jQuery lite implements these functions:</p>
<ul>
<li><a href="http://api.jquery.com/addClass/">addClass()</a></li>
<li><a href="http://api.jquery.com/after/">after()</a></li>
<li><a href="http://api.jquery.com/append/">append()</a></li>
<li><a href="http://api.jquery.com/attr/">attr()</a></li>
<li><a href="http://api.jquery.com/bind/">bind()</a></li>
<li><a href="http://api.jquery.com/children/">children()</a></li>
<li><a href="http://api.jquery.com/clone/">clone()</a></li>
<li><a href="http://api.jquery.com/css/">css()</a></li>
<li><a href="http://api.jquery.com/data/">data()</a></li>
<li><a href="http://api.jquery.com/hasClass/">hasClass()</a></li>
<li><a href="http://api.jquery.com/parent/">parent()</a></li>
<li><a href="http://api.jquery.com/remove/">remove()</a></li>
<li><a href="http://api.jquery.com/removeAttr/">removeAttr()</a></li>
<li><a href="http://api.jquery.com/removeClass/">removeClass()</a></li>
<li><a href="http://api.jquery.com/removeData/">removeData()</a></li>
<li><a href="http://api.jquery.com/replaceWith/">replaceWith()</a></li>
<li><a href="http://api.jquery.com/text/">text()</a></li>
<li><a href="http://api.jquery.com/trigger/">trigger()</a></li>
</ul>
<h2>Usage</h2>
<tt ng:non-bindable>
angular.element(element);
</tt>
<h3>Parameters</h3>
<ul>
<li><tt>element</tt> –
<tt>{string|DOMElement}</tt>
<tt></tt>
– HTML string or DOMElement to be wrapped into jQuery.</li>
</ul>
<h3>Returns</h3>
<tt>{Object}</tt> jQuery object.