Is it possible to bind a custom function instead of an event to a div in JQuery?
<p>I wonder if this is possible, I was able to do this with AS3. Is it possible to bind a listener on div that only listens for mouse events. So lets say I have a div called "lion", typically this is how a mouse event is bind:</p>

<pre><code>  $("#mouse").bind("click", function(e)
  {
     alert(e.currentTarget.id);
  }
</code></pre>

<p>But as you can see, the mouse event has already been declared as "click". What I would like to do is write a function and then bind that function to "lion" the div. And when lion encounters such mouse events then function is able to capture the mouse event type. Here is the function:</p>

<pre><code>  $.fn.chkType = function(e)
  {
    var evt = e.type;
    var str = "";

    switch(evt)
    {
      case "mouseover":
      str = "MOUSE OVER";
      break;

      case "mouseout":
      str = "MOUSE OUT";
      break;

      case "click":
      str = "CLICK";
      break;

      default:
      break;
   }

   alert(str);
  }
</code></pre>

<p>And now if I would like to assign this function to "lion", I am not certain how would this be possible? I have done a lot search and the closest I came was at:</p>

<p><a href="http://api.jquery.com/bind/" rel="nofollow">http://api.jquery.com/bind/</a></p>

<p>I would appreciate your input. 
Thank you.</p>
