title: Jquery: Returning Value From Trigger
body: <p>I am using a trigger call a get a value from custom event but I want it to return a value and its only giving me Object Object when I do the following call:</p>
  
  <pre><code>var user_id=$("#my_div").trigger("get_id", [username]);
  </code></pre>
  
  <p>My trigger event function looks like this:</p>
  
  <pre><code>$("#my_div").on("get_id", function(e, username){
      var user_id;
      if (username='fred'){
          user_id=1;
      }
      else if(username='mario'){
          user_id=2;
      }
      return user_id;
  });
  </code></pre>