]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Port #19219 to v3 18960/head 18961/head 18962/head 18963/head 18964/head 18965/head 18966/head 18971/head 18973/head 19184/head 19185/head 19186/head
authorChris Rebert <github@chrisrebert.com>
Tue, 16 Feb 2016 11:52:30 +0000 (03:52 -0800)
committerChris Rebert <code@chrisrebert.com>
Tue, 16 Feb 2016 22:25:26 +0000 (14:25 -0800)
CONTRIBUTING: Document restriction regarding jQuery event alias methods

Refs #19192
[ci skip]

CONTRIBUTING.md

index 8b5309368f8a8e9a2e5d06365a4cdc305f1ad6f0..d102d5e380104978356490756ab7f9876f7aafe8 100644 (file)
@@ -250,6 +250,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