How to Auto close fancybox after 5 seconds jQuery

This script is used if you want to auto close the fancybox works with ajax. Copy this code and add it in the footer or header file of your theme.

<script type="text/javascript">
jQuery('.class or #id').ajaxComplete(function(event,XMLHttpRequest, ajaxOptions){
setTimeout( function() {jQuery.fancybox.close(); },5000);

Share With Friends

Also Read   How you can use whatsapp on your desktop

Speak Your Mind


Time limit is exhausted. Please reload CAPTCHA.