jquery facebox插件下载

jquery facebox插件下载

jquery facebox API使用帮助


 Facebox (for jQuery)
 version: 1.2 (05/05/2008)
  @requires jQuery v1.2 or later
 
  Examples at http://famspam.com/facebox/
 
  Licensed under the MIT:
    http://www.opensource.org/licenses/mit-license.php
 
  Copyright 2007, 2008 Chris Wanstrath [ chris@ozmm.org ]
 
  Usage:
  
 

<script>
jQuery(document).ready(function() {
     jQuery('a[rel*=facebox]').facebox()
   })
 </script>
   <a href="#terms" rel="facebox">Terms</a>
     Loads the #terms div in the box
 
   <a href="terms.html" rel="facebox">Terms</a>
     Loads the terms.html page in the box
 
   <a href="terms.png" rel="facebox">Terms</a>

 
     Loads the terms.png image in the box
 
 
   You can also use it programmatically:
 
 

    jQuery.facebox('some html')

 
   The above will open a facebox with "some html" as the content.
    

     jQuery.facebox(function($) {
       $.get('blah.html', function(data) { $.facebox(data) })
     })


   The above will show a loading screen before the passed function is called,
   allowing for a better ajaxy experience.
 
   The facebox function can also display an ajax page or image:

  
     jQuery.facebox({ ajax: 'remote.html' })
     jQuery.facebox({ image: 'dude.jpg' })


 
   Want to close the facebox?  Trigger the 'close.facebox' document event:代码关闭facebox,可以触发close.facebox事件
 

     jQuery(document).trigger('close.facebox')


 
   Facebox also has a bunch of other hooks:jquery.facebox事件
 
     loading.facebox:加载内容时触发
     beforeReveal.facebox:显示内容之前的事件
     reveal.facebox (aliased as 'afterReveal.facebox'):显示内容之后触发
     init.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...*/ })

 
 
jquery-1.4.2.min.js下载


分类:js图片特效 下载地址
阅读(426)喜欢(3)7.06KB浏览器 点击下载