View Full Version : سوال: اجرای کد مورد نظر هنگام بسته شدن Facebox
NIMA_1981
چهارشنبه 02 شهریور 1390, 00:51 صبح
سلام دوستان
من از facebox توی سایت استفاده می کنم حالا چطوری متیتونم وقتی دکمه x را کاربر فشار میده و بسته میشه صفحه به جایی دیگه بره کلا روی خروج از facebox کنترل داشته باشم
pashaie
چهارشنبه 02 شهریور 1390, 05:05 صبح
تو خود فایل Facebox این موردی که می خوای رو با مثال توضیح داده:
Facebox also has a bunch of other hooks:
loading.facebox
beforeReveal.facebox
reveal.facebox (aliased as 'afterReveal.facebox')
init.facebox
afterClose.facebox
Simply bind a function to any of these hooks:
$(document).bind('reveal.facebox', function() { ...stuff to do after the facebox and contents are revealed... })
مثلا
$(document).bind('afterClose.facebox', function() {alert ('Test!')}
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.