Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit d59aeb4

Browse files
committed
docs(angular.element): add more info, fix formatting
- add info about ngJq - fix alert box - add info about css function
1 parent 551a33d commit d59aeb4

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/jqLite.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,18 @@
3333
*
3434
* If jQuery is available, `angular.element` is an alias for the
3535
* [jQuery](http://api.jquery.com/jQuery/) function. If jQuery is not available, `angular.element`
36-
* delegates to Angular's built-in subset of jQuery, called "jQuery lite" or "jqLite."
36+
* delegates to Angular's built-in subset of jQuery, called "jQuery lite" or **jqLite**.
3737
*
38-
* <div class="alert alert-success">jqLite is a tiny, API-compatible subset of jQuery that allows
39-
* Angular to manipulate the DOM in a cross-browser compatible way. **jqLite** implements only the most
40-
* commonly needed functionality with the goal of having a very small footprint.</div>
38+
* jqLite is a tiny, API-compatible subset of jQuery that allows
39+
* Angular to manipulate the DOM in a cross-browser compatible way. jqLite implements only the most
40+
* commonly needed functionality with the goal of having a very small footprint.
4141
*
42-
* To use `jQuery`, simply ensure it is loaded before the `angular.js` file.
42+
* To use `jQuery`, simply ensure it is loaded before the `angular.js` file. You can also use the
43+
* {@link ngJq `ngJq`} directive to specify that jqlite should be used over jQuery, or to use a
44+
* specific version of jQuery if multiple versions exist on the page.
4345
*
44-
* <div class="alert">**Note:** all element references in Angular are always wrapped with jQuery or
45-
* jqLite; they are never raw DOM references.</div>
46+
* <div class="alert alert-info">**Note:** All element references in Angular are always wrapped with jQuery or
47+
* jqLite (such as the element argument in a directive's compile / link function). They are never raw DOM references.</div>
4648
*
4749
* <div class="alert alert-warning">**Note:** Keep in mind that this function will not find elements
4850
* by tag name / CSS selector. For lookups by tag name, try instead `angular.element(document).find(...)`
@@ -59,7 +61,8 @@
5961
* - [`children()`](http://api.jquery.com/children/) - Does not support selectors
6062
* - [`clone()`](http://api.jquery.com/clone/)
6163
* - [`contents()`](http://api.jquery.com/contents/)
62-
* - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`. As a setter, does not convert numbers to strings or append 'px'.
64+
* - [`css()`](http://api.jquery.com/css/) - Only retrieves inline-styles, does not call `getComputedStyle()`.
65+
* As a setter, does not convert numbers to strings or append 'px', and also does not have automatic property prefixing.
6366
* - [`data()`](http://api.jquery.com/data/)
6467
* - [`detach()`](http://api.jquery.com/detach/)
6568
* - [`empty()`](http://api.jquery.com/empty/)

0 commit comments

Comments
 (0)