GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: Facebook-style lightbox, built in jQuery
Homepage: http://famspam.com/facebox/
Clone URL: git://github.com/defunkt/facebox.git
Click here to lend your support to: facebox and make a donation at www.pledgie.com !
maddox (author)
Thu Jun 26 13:48:16 -0700 2008
commit  d307d7780736a3be62c68c64636d822ad3658090
tree    8973fa4d90cc16b439c4859abb287ace3f9531c1
parent  b24c1a8d6a2a460886efd6649494d7ae3aa0ac58
facebox / test_programmatic.html
100644 55 lines (45 sloc) 1.966 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>Facebox 1.2 Programmatic Tests</title>
  <link href="facebox.css" media="screen" rel="stylesheet" type="text/css" />
  <link href="faceplant.css" media="screen" rel="stylesheet" type="text/css" />
  <script src="jquery.js" type="text/javascript"></script>
  <script src="facebox.js" type="text/javascript"></script>
  <script type="text/javascript">
    jQuery(document).ready(function($) {
      $('a[rel*=facebox]').facebox({
        loading_image : 'loading.gif',
        close_image : 'closelabel.gif'
      })
    })
  </script>
  <style type="text/css">
  .my-groovy-style {
    color: yellow;
    background-color: purple;
  }
  
  .my-groovy-style img {
    width: 100px;
    height: 100px;
  }
  </style>
</head>
 
<body>
  <h1>Programmatic Tests</h1>
  <a href="javascript: jQuery.facebox('something cool');">Programmatic text.</a><br/>
  <a href="javascript: jQuery.facebox('something cool', 'my-groovy-style');">Programmatic text with a style.</a><br/>
 
  <a href="javascript: jQuery.facebox({image:'stairs.jpg'});">Programmatic image.</a><br/>
  <a href="javascript: jQuery.facebox({image:'stairs.jpg'}, 'my-groovy-style');">Programmatic image with a style.</a><br/>
 
  <a href="javascript: jQuery.facebox({ajax:'remote.html'});">Programmatic ajax.</a><br/>
  <a href="javascript: jQuery.facebox({ajax:'remote.html'}, 'my-groovy-style');">Programmatic ajax with a style.</a><br/>
 
  <a href="javascript: jQuery.facebox({div:'#box'});">Programmatic div.</a><br/>
  <a href="javascript: jQuery.facebox({div:'#box'}, 'my-groovy-style');">Programmatic div with a style.</a><br/>
 
  <br/>
  
  <div id="box" style="border: solid; width: 150px;">
    Watch me go into a facebox!
  </div>
 
</body>
</html>