-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
115 lines (97 loc) · 3.75 KB
/
index.html
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>FillBox JQuery Plugin</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico and apple-touch-icon.png in the root directory -->
<style type="text/css">
.thumbnail,
.thumbnail-wrapper,
.any-class-to-wrap {
float: left;
height: 300px;
margin: 0 20px 0 0;
overflow: hidden;
width: 300px;
}
code {
font-family: monospace;
}
</style>
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<h1>FillBox</h1>
<p>A jQuery plugin to expand and centralize a image related to parent element independent of size him</p>
<h2>Example</h2>
<p>Pure HTML markup</p>
<div class="thumbnail-wrapper">
<img src="jiujitsu.jpg" />
</div>
<p>The Bootstrap markup</p>
<div class="thumbnail">
<img src="jiujitsu.jpg" />
</div>
<p>Any wrapper with plugin applied</p>
<div class="any-class-to-wrap">
<img src="jiujitsu.jpg" class="fill-box" />
</div>
<br clear="both" />
<h2>Instructions</h2>
<h3>1.Getting Started</h3>
<p>Load jQuery and include FillBox plugin file</p>
<code>
<!-- Include jquery -->
<br />
<script src="jquery.js"></script>
<br /><br />
<!-- Include fillbox plugin -->
<br />
<script src="fill.box.js"></script>
</code>
<h3>2.Set up your HTML</h3>
<p>You don't need any special markup. All you need is add the class ".fill-box" to any image warraped with a block (preferencially) element.</p>
<code>
<div>
<br />
<img src="myimage.jpg" class="fill-box" />
<br />
</div>
</code>
<h3>3.Call the plugin</h3>
<p>Now just call the FillBox initializer function and tadaaaaa.</p>
<code>
$(".fill-box").fillBox();
</code>
<h3>Thanks</h3>
<p>Special thank you to <a href="http://www.allanrabelo.com.br" target="_blank">Allan Rabelo</a>, designer responsable for this layout</p>
<h3>License</h3>
<p>The MIT License (MIT)</p>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.10.2.min.js"><\/script>')</script>
<script src="fill.box.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$('.fill-box').fillBox();
});
</script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X');ga('send','pageview');
</script>
</body>
</html>