Attach event using Javascript -
i'd attach event when function called, seems not working using addeventlistener...
my code :
function add () { this.inputstring.input.addeventlistener('mouseover', toggle.call(this)); } function toggle () { $(this.tooltip).toggle(); } issue : toggle() function doesn't work. however, this.inputstring.input , this.tooltip not emtpy...
the apparent problem see here should attach function addeventlistener's second argument, not call itself:
this.inputstring.input.addeventlistener('mouseover', toggle); then should consider reviewing toggle() function itself.
mean this.tooltip ?
but out of scope of question (about attaching events).
Comments
Post a Comment