开发者

Is it possible to change Facebox's settings at runtime? How?

开发者 https://www.devze.com 2022-12-20 04:55 出处:网络
Is it possible to access Facebox settings? For example, I\'d like to do set the location of the loading image dynamically (see line 4):

Is it possible to access Facebox settings? For example, I'd like to do set the location of the loading image dynamically (see line 4):

&l开发者_StackOverflow社区t;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 this possible? How do I do that?


It's possible:

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

精彩评论

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