mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
CONTRIBUTING: Document restriction regarding jQuery event alias methods
Refs #19192 [ci skip]
This commit is contained in:
parent
af68bc2c73
commit
3b2f0523aa
1 changed files with 1 additions and 0 deletions
|
@ -235,6 +235,7 @@ includes code changes) and under the terms of the
|
||||||
- 2 spaces (no tabs)
|
- 2 spaces (no tabs)
|
||||||
- strict mode
|
- strict mode
|
||||||
- "Attractive"
|
- "Attractive"
|
||||||
|
- Don't use [jQuery event alias convenience methods](https://github.com/jquery/jquery/blob/master/src/event/alias.js) (such as `$().focus()`). Instead, use [`$().trigger(eventType, ...)`](http://api.jquery.com/trigger/) or [`$().on(eventType, ...)`](http://api.jquery.com/on/), depending on whether you're firing an event or listening for an event. (For example, `$().trigger('focus')` or `$().on('focus', function (event) { /* handle focus event */ })`) We do this to be compatible with custom builds of jQuery where the event aliases module has been excluded.
|
||||||
|
|
||||||
### Checking coding style
|
### Checking coding style
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue