开发者

Detecting when Facebox is closed

开发者 https://www.devze.com 2023-02-03 19:15 出处:网络
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.

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

精彩评论

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