title: I have an event handler registered to "document" element, how do I trigger this handler from another project?
body: <p>Our company's code base infrastructure has 3 WEB Projects (components containing js, html and css) which we inject into "Project 1" that build up the look of the website.</p>
  
  <p>Now in "Project 1" I have a couple of jQuery animations that are triggered on click event.</p>
  
  <p>In "Project 2" I have a button that should trigger those animations, but I don't want to copy and paste the code to perform those animations, instead, I want to send an event trigger and in "Project 1" handle that event, how do I do that across projects?</p>
  
  <p>I have tried in "Project 1" binding custom event like so</p>
  
  <pre><code>$(document).on("searchEvent", () =&gt; {
      // Also perform the animations when "searchEvent" is triggered in Project 2
  });
  </code></pre>
  
  <p>Then in "Project 2", I'm triggering this event like so</p>
  
  <pre><code>$(".secondarySearchButotn").click(() =&gt; {
      $(document).trigger("searchEvent");
  })
  </code></pre>
  
  <p>The result is that nothing happens when that button is clicked.</p>
  
  <p>I'd like to be able to use the existing code from "Project 1" that manages the animations and use the code to execute the event handler which is triggered in "Project 2".</p>