jQuery not showing event namespace when using proxy

jQuery not showing event namespace when using proxy

In my script I want to have two types of click functionality, depend on what is clicked and I want to do it in a single function. I decided to make it with namespaces, but the console gives me undefined;

Here is the code:

 
  1. $target1.on("click.Bst", $.proxy(self.selectNav, self));

  2. $target2.on("click.Bst.Type2", $.proxy(self.selectNav, self));

My function selectNav() executes on click, but when I try to get the event.namespace (event is passed as s function parameter) I get undefined.

 
  1. selectNav: function(event){
  2. //other code runs
  3. console.log(event.namespace); //console log "undefined"
  4. }