Can I change Facebox settings at runtime? How?

Can I access Facebox settings? For example, I would like to set the dynamic location of the location of the uploaded image (see line 4):

<script type="text/javascript" src="<?php echo base_url(); ?>media/facebox/facebox.js" ></script>
  <script type="text/javascript">
  $(document).ready(function(){
    Facebox.loadingImage = '<?php echo base_url(); ?>media/facebox/loading.gif'; // <-- is this possible?
    $('a[rel*=facebox]').facebox();
  });
</script>

Is it possible? How to do it?

+3
source share
1 answer

Maybe:

$('a[rel*=facebox]').facebox({ 
    loading_image : '<?php echo base_url(); ?>media/facebox/loading.gif'
}) 
+3
source

Source: https://habr.com/ru/post/1732147/


All Articles