How to trigger custom event on click
<p>This is a somewhat constructed question, which should hopefully teach me do write more maintainable jQuery.</p>

<p>I have a button, which should slideToggle another element.</p>

<p>I know I can do like this:</p>

<pre><code>$('.button').click(function(){
  $('.other-element').slideToggle();
});
</code></pre>

<p>However, I would like to just fire an event when clicking the .button, and then 'catch' the event on the .other-element.
I thought I would be able to do like this:</p>

<pre><code>$('.button').click(function(){
  $(this).trigger('customEvent');
});

$('.other-element').on('customEvent', function() {
  $(this).slideToggle();
});
</code></pre>

<p>This ofc results in more code, and in this specific example, its probably not a good idea, but I like the division between event firing and catching.</p>

<p>How do I do this the right way?</p>
