0
例如,我想將連鎖過程分配給不同的變量,並在不同的條件下使用它們。如何將連鎖函數分配給jQuery中的變量
var disable_btn = true;
var button_me = $('#contents.getsamplekit .sample-form .form #submit-btn-freeSample-me');
var button_disabled = button_me.attr("disabled",true).css("background","red"); // need to add more functions.
var button_enabled = button_me.removeAttr("disabled").css("background","green"); // need to add more functions here as well.
(disable_btn) ? button_disabled : button_enabled;
]