jquery - How to change/redefine function by itself -


i want run function in jquery, change/redefine function, when finished.

jsfiddle example

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

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -