title: Handling anchor tag click using marionette
body: <p>What i want is to handle the anchor button click inside my <strong>Marionette.ItemView events</strong>. I <strong>don't want to use href</strong> in anchor tag. I want to handle the click in my itemview and ask the <strong>backbone approuter</strong> to change page.</p>
  
  <p>I want to switch my page from <strong>index</strong> to <strong>myaccount</strong> on an anchor button click. My template looks like below</p>
  
  <pre><code>&lt;div&gt;
      &lt;a data-role="button" id="btn_eclipse" class="btn_eclipse_myaccount"&gt;&lt;%= val_btn_myaccount %&gt;&lt;/a&gt;
      &lt;a data-role="button" id="btn_eclipse" class="btn_eclipse_services"&gt;&lt;%= val_btn_services %&gt;&lt;/a&gt;
      &lt;a data-role="button" id="btn_eclipse" class="btn_eclipse_offers"&gt;&lt;%= val_btn_offers %&gt;&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My Marionette.ItemView capture events like this</p>
  
  <pre><code>events : {
      'click input[type="button"]' : 'onButtonClick',
      'blur input[type="text"]' : 'onKeyPress',
      'click a' : 'onAnchorButtonClick',
  },          
  onAnchorButtonClick : function(obj){
      obj.preventDefault;
      var btn_id = $(obj.target).attr('id');
      console.log("The button clicked id is==="+$(obj.target).attr('id'));
      //here i trigger event to change page
  }
  </code></pre>
  
  <p>I am not able to retrieve that ID or any other attribute like <strong>href</strong> as you specified in your answer from the anchor tag.</p>
  
  <p>Please advice what should i do.</p>
  
  <p>Thanks in advance.</p>