I have an href element and there is an onclick event on it. I want to change a function after some event. I tried using jquery, but the old and new function are both fired. I want only the new one to be launched.
My code is:
<a href='#' id='cvtest' onclick='testMe("One")' >TEST</a>
after some event i am adding following code:
$("#cvtest").click(function(){ testMe("Two"); });
When I click the Test link, I get 2 warnings, One and Two.
How to stop the start of the first event or some other solution to this problem?
source
share