Is there anyway I can use native javascript to fire an event called onmove which is only for IE.
I can get it to work if I do this.
document.getElementById("device-module").fireEvent("onmove");
This issue here is I don’t want to have to pass an id into the custom jquery prototype. I already know what the element is I just need to call javascript native fireEvent on that element.
Is this possible or do I have to always get the dom element by document.getElementById() before I can use the js native fireEvent method.
$.fn.custom = function() {
return this.each(function() {
var _this = $(this);
_this.fireEvent("onmove");
});
};
the value of the
thisin aneach()is the DOM element itself. you can directly access it this way. no need to wrap again in$()