aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <[email protected]>2016-02-16 03:52:30 -0800
committerChris Rebert <[email protected]>2016-02-16 03:52:30 -0800
commit3b2f0523aab1906f018c19a741223f5c6fd98d4c (patch)
tree6eacc3bfd8d3c1eb125dd87639532502409ff425
parentaf68bc2c7312712fa6df9acc4fb5655168b55db8 (diff)
downloadbootstrap-3b2f0523aab1906f018c19a741223f5c6fd98d4c.tar.xz
bootstrap-3b2f0523aab1906f018c19a741223f5c6fd98d4c.zip
CONTRIBUTING: Document restriction regarding jQuery event alias methods
Refs #19192 [ci skip]
-rw-r--r--CONTRIBUTING.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 122b1542a..ab7b624c0 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -235,6 +235,7 @@ includes code changes) and under the terms of the
- 2 spaces (no tabs)
- strict mode
- "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