jquery - How to change/redefine function by itself -
i want run function in jquery, change/redefine function, when finished.
html
<div id="test">test</div>
jquery
function yes() { alert('yes'); // dont know how, mean : //this.fn.function yes(){ // alert('no'); //}; }; $('#test').click(function () { yes(); });
function yes() { alert('yes'); yes = function(){alert('no');}; };
Comments
Post a Comment