I need to replace the Bind event from JQuery with some event from JavaScript.
I am developing a Bookmarklet and i received order to replace jQuery with JavaScript
I have the following code
$(document).unbind("mousemove", X.highlighter);
$(document).bind("mousemove", X.highlighter);
and also
var current, overlay = $("#overlayhighlight"), o = $('#y');
this last 3 I can replace with document.getElementsByID
the bind and unbind … no clue
Have a look at
element.addEventListener()(MDN docu) andelement.removeEventListener(MDN docu).