尝试传递函数名称作为变量,以便在函数中调用它,但无法弄清楚如何调用它。函数回调函数作为变量
任何帮助欢迎!
jQuery.fn.makeSlideShow = function(opts) {
opts = jQuery.extend({
speed :400,
delay :0,
slideCLass :'.slide',
pager :'#pager',
next :'.nextSlide',
previous :'.previousSlide',
startSlide :0,
screenClick :false,
callback:function(){return false;}
},opts||{});
// callback the fullscreenImage function here?
};
$('#slideShow').makeSlideShow({
callback : 'fullscreenImage'
});
function fullscreenImage(){
alert('called!');
}
最好,丹。
王牌 - 干杯!只是为了将来的ref如何将params通过makeSlideShow()传递给回调函数? – v3nt 2010-12-08 15:43:18