Showing animated “loading” gif before the actual content appears in Facebox

141 Views Asked by At

Showing animated “loading” gif before the actual content appears in Facebox like ajax preloader. is that possible.

From here i am calling to the function

   <a href="javascript:;"  onclick="load_crop('<?php echo  $current_large_image_width + 200 ?>','<?php echo $current_large_image_height ;?>')"> Edit Picture</a>

And this is my function

     function load_crop(wwdth,hhight){


     $.facebox('<iframe FRAMEBORDER="0" height="'+hhight+'"  width="'+wwdth+'"   src="<?php echo $httpTemplatePath;?>/ajax/crop_image2.php? user_id=<?php echo $_SESSION['db_user_info']['id']?>" ></iframe>');
                 }

IS it possible to put a gif loader before the content of the crop_image2.php show.

1

There are 1 best solutions below

0
DigitalDouble On BEST ANSWER

From the documentation itself I think it provides that option:

$.facebox.settings.loadingImage = '/images/facebox/loading.gif'

https://github.com/defunkt/facebox#usage