How can I chain my method calls?

后端 未结 5 1106
长发绾君心
长发绾君心 2020-12-10 14:28

I have an object:

var mubsisapi = {
        step1   : function(){alert(\"a\")}, 
        step2   : function(){alert(\"b\")}
    }

$.extend(false, mubsisapi)         


        
5条回答
  •  天涯浪人
    2020-12-10 15:00

    var mubsisapi = {
            step1   : function(){alert("a"); return mubsisapi;}, 
            step2   : function(){alert("b"); return mubsisapi;}
        }
    

提交回复
热议问题