我已经制作了许多函数,例如 $.redux.select 并且我想在触发 dialog_finished 事件时调用所有函数
这是 field_select.js 文件中的代码
(function($){
"use strict";
$.redux = $.redux || {};
$(document).ready(function () {
$.redux.select();
});
$.redux.select = function(){
//some code here
}
})(jQuery);
这是 redux.js 文件中的代码
(function($){
"use strict";
$.redux = $.redux || {};
$(document).ready(function () {
var the_body = $(document);
the_body.on('dialog_finished', function(event, window){
//render all methods
$.each($.redux, function( method, value ) {
/*******************************************************************/
my problem is below , how to call $.redux.select() using $.each
or there is better way
/*******************************************************************/
$.redux.$method();
});
});
});
})(jQuery);