1

I am using jQuery this._on() function for binding mouse event and I would like to use event capturing concept in this._on().

this._on($("#myId"), "mousedown", callMouseDown);

callMouseDown: function (e) {
    //Mouse down event
},

Anyone can help me, here how to apply event capturing concept (parent to child).

Thanks, Bharathi.

Ramiz Wachtler
  • 5,623
  • 2
  • 28
  • 33
Bharathi
  • 1,288
  • 2
  • 14
  • 40

1 Answers1

1

Use this to access your method.

this._on($("#myId"), "mousedown", this.callMouseDown);

callMouseDown: function (e) {
    //Mouse down event
},

UPDATE:

jQuery events does not support event capturing. But it supports event bubbling.

Please check the following link for more information

Why does jQuery event model does not support event Capture and just supports event bubbling

Community
  • 1
  • 1
John R
  • 2,741
  • 2
  • 13
  • 32
  • I am not asking about how to access the method. In JavaScript event binding, we have used two concepts bubbling and capturing concept using addEventListener(). Default option is bubbling concept applied. if you set true to the argument, it will work capturing concept. I need to use this using in Jquery as like Javascript – Bharathi Oct 22 '15 at 05:19