mardi 10 octobre 2017

jQuery 'on' event is different while using Ember JS

While binding function to a html element using jQuery 'on', why callback function func having on attribute in Ember JS which is not available in JQuery.

jQuery Application:

$('body').append("<div id='div1'></div>")
var func = function(){alert("Ember")};
var bind = $("#div1").on("click",func);
"on" in func  // returns false

Ember Application

$('body').append("<div id='div1'></div>")
var func = function(){alert("Ember")};
var bind = $("#div1").on("click",func);
"on" in func // returns true




Aucun commentaire:

Enregistrer un commentaire