开发者

Detecting when Facebox is closed

I need to trigger a new facebox when the old one is closed.

This is the way I am doing it now, but I feel there can be a more elegant way.

function process(){

step1(step2);

开发者_C百科//triggers the first facebox
function step1(cb){
  $.facebox(1);
  $("#facebox .finished").click(function(event){
    cb();
  });
};

function step2(){
  $.facebox(2);
}   }


$(document).bind('afterClose.facebox', cb);

Or, you can emit your own custom event.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜