How can I stop event propagation with Backbone.js?

前端 未结 5 1093
面向向阳花
面向向阳花 2021-01-31 16:01

Using a Backbone.js View, say I want to include the following events:

    events: {
        \'click a\': \'link\', 
        \'click\': \'openPanel\' 
    }
         


        
5条回答
  •  醉梦人生
    2021-01-31 16:31

    I've been using e.stopImmediatePropagation(); in order to keep the event from propagating. I wish there was a shorter way to do this. I would like return false; but that is due to my familiarity with jQuery

提交回复
热议问题