开发者

jQuery stacking events

So, i'm using FancyBox plugin to have a database entry editor. I have a "Save" and a Cancel Button, that when clicked, after they do what i want, trigger the close button so i can see the animation, with: $('#fancybox-close').trigger('click');

Now, i'm trying to do the oposite: when the user clicks fancybox's close button, i wan to run some code before what is defined for it to do, something like:

$('#fanc开发者_开发百科ybox-close').click(function(){
   //my code here
   //#fancybox-close event here
})

how can i do this?

Thanks


According to the API page you can simply provide an onClosed handler when defining your FancyBox.

This function can then do whatever you'd like.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜