Skip to content

Commit

Permalink
fix(events): Update docs
Browse files Browse the repository at this point in the history
Reflect use of past tense verbs for events triggered
  • Loading branch information
jefflembeck committed Apr 13, 2016
1 parent 64cac15 commit 06d0ef9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/pivotal-ui/components/events/events.scss
Expand Up @@ -19,11 +19,15 @@ Component πŸ’£ has a method `πŸ”₯`. In the code, you might see:
<code class="pam">
πŸ’£.prototype.πŸ”₯ = function(blaze){
$(this).trigger("πŸ’£:πŸ”₯:before");
$(this).trigger("πŸ’£:πŸ”₯ed:before");
//do things
// this represent the element the component is referring to
$(this).trigger("πŸ’£:πŸ”₯");
// In many cases the method name is present tense and the event
// name is a past tense version of that method name. This is
// a pretty common pattern reflected here.
$(this).trigger("πŸ’£:πŸ”₯ed");
};
</code>
Expand All @@ -32,7 +36,7 @@ component has the πŸ”₯ method called and that method is completed, the 🚰
component needs to call the 🌊 method.
<code class="pam">
$(document).on("πŸ’£:πŸ”₯", function(){
$(document).on("πŸ’£:πŸ”₯ed", function(){
🚰.🌊();
});
</code>
Expand Down

0 comments on commit 06d0ef9

Please sign in to comment.