I'm trying to select an DOM element and store it in an object and then later accessing it by a click event.
this._elements.convertButton.click(function(e) {
_this.convertButtonClicked.notify();
});
If I initially select the element using JQuery all is fine
{ convertButton: $("#convert") }
However if I don't use JQuery the click does not work
{ convertButton: document.getElementById("convert") }
While using Jquery is not an major issue I was simply looking for clarification on how to make it work using pure javascript and why the click is fine on the JQuery object and not on the ordinary object.
$('convert')) is quite different from the click method of a DOM object.