2007å¹´11æ26æ¥æææ¥ JavaScript ã® ãªã¼ãã¼ãã¼ã jQuery ã®ã³ã¢éçºè ã¨ãã¦ç¥ããã¦ãããJohn Resig ããã®ããã°ã« JavaScript Method Overloading ã¨ãã大å¤é¢ç½ãè¨äºãããã¾ãããJavaScript ã®ãªã¼ãã¼ãã¼ãã½ã¼ã¹ã³ã¼ããè¦ã¦ã¿ã¾ããç°¡æ½ã§ç´ æ´ãããã³ã¼ãã// addMethod - By John Resig (MIT Licensed) function addMethod(object, name, fn){ // æå®ããããªãã¸ã§ã¯ãã«ã¯ï¼ // æ¢ã«åãååã®ã¡ã½ãããå®ç¾©ããã¦ãã // ãããããªãã®ã§ï¼ä¸æå¤æ°ã«ä¿åãã¦ãã var old = object[ name ]; // ãªãã¸ã§ã¯ãã®ããããã£ã«é¢æ°å®ç¾©ãä¸æ¸ãï¼ object[ name ] = function(){ //
{{#tags}}- {{label}}
{{/tags}}