Javascript error not implemented in IE7 when executing binding function

I get javascript error

SCRIPT16385: Not implemented

When I ran the following code snippet.

 $j('img[id="edit_destination"]').bind('click',function(){
           document.getElementById("edit_destination").onclick = editPRINum(this);

});

editPRINum is a function in the same javascript. I was looking for a problem and looked as if I should declare if it is a variable. However, I use this to bind the function. What should I do?

+5
source share
1 answer

I think you should try this.

$j('img#edit_destination').bind('click',editPRINum);

In your callback function (editPRINum) thiswill be a reference to an element img.

PS: What is $ j? shortcut for jQuery?

+3
source

All Articles