This solution does not work for IE9.
I have the following code:
$(document).ready(function() {
document.getElementById('unsubref').onclick = function() {unsubcribe();};
});
and unsubref is:
<div id="unsub">
<h1>Click <a id="unsubref">here</a> to unsubscribe from the mailing service</h1>
</div>
in Chrome, it works just fine. The function unsubscribe
is being invoked with alert.
However, in IE9 it does not work!