Skip to content

Commit dfaf233

Browse files
committed
Update jBox.js
1 parent 9908466 commit dfaf233

File tree

5 files changed

+34
-36
lines changed

5 files changed

+34
-36
lines changed

Demo/Demo.css

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ body {
1919
}
2020

2121
main {
22-
padding: 20px 0;
22+
padding: 20px 0;
2323
}
2424

2525
.container {
@@ -51,30 +51,30 @@ h2 {
5151

5252
.targets-wrapper:after,
5353
.targets-wrapper:before {
54-
content: " ";
55-
display: table;
54+
content: " ";
55+
display: table;
5656
}
5757

5858
.targets-wrapper:after {
59-
clear: both;
59+
clear: both;
6060
}
6161

6262
.target,
6363
.target-click,
6464
.target-notice {
6565
cursor: default;
66-
font-size: 13px;
67-
line-height: 52px;
68-
height: 52px;
69-
border-radius: 2px;
70-
border: 1px solid #e2e2e2;
71-
text-align: center;
72-
background: #fafafa;
73-
position: relative;
74-
text-transform: uppercase;
75-
float: left;
76-
width: calc(25% - 10px);
77-
margin: 5px;
66+
font-size: 13px;
67+
line-height: 52px;
68+
height: 52px;
69+
border-radius: 2px;
70+
border: 1px solid #e2e2e2;
71+
text-align: center;
72+
background: #fafafa;
73+
position: relative;
74+
text-transform: uppercase;
75+
float: left;
76+
width: calc(25% - 10px);
77+
margin: 5px;
7878
-webkit-user-select: none;
7979
-moz-user-select: none;
8080
-ms-user-select: none;
@@ -94,8 +94,8 @@ h2 {
9494

9595
.demo-img {
9696
float: left;
97-
width: calc(25% - 10px);
98-
margin: 5px;
97+
width: calc(25% - 10px);
98+
margin: 5px;
9999
}
100100

101101
.demo-img > img {
@@ -117,7 +117,7 @@ h2 {
117117
.target,
118118
.target-click,
119119
.target-notice {
120-
width: calc(50% - 10px);
120+
width: calc(50% - 10px);
121121
}
122122

123123
.demo-img > img {
@@ -232,12 +232,12 @@ header a:hover {
232232

233233
.clearfix:after,
234234
.clearfix:before {
235-
content: " ";
236-
display: table;
235+
content: " ";
236+
display: table;
237237
}
238238

239239
.clearfix:after {
240-
clear: both;
240+
clear: both;
241241
}
242242

243243
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */

Demo/Demo.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ <h2>Notice</h2>
6565
<h2>Image</h2>
6666

6767
<div class="targets-wrapper">
68-
<a class="demo-img" href="https://stephanwagner.me/img/jBox/demo-img/CIMG4778_large.jpg" data-jbox-image="gallery1" title="Navigate with your keyboard: Press the [right] or [left] key"><img src="https://stephanwagner.me/img/jBox/demo-img/CIMG4778_small.jpg" alt=""></a>
69-
<a class="demo-img" href="https://stephanwagner.me/img/jBox/demo-img/CIMG4547_large.jpg" data-jbox-image="gallery1" title="jBox is smart, the next image gets preloaded"><img src="https://stephanwagner.me/img/jBox/demo-img/CIMG4547_small.jpg" alt=""></a>
70-
<a class="demo-img" href="https://stephanwagner.me/img/jBox/demo-img/CIMG6771_large.jpg" data-jbox-image="gallery1" title="You can easily group your images into galleries"><img src="https://stephanwagner.me/img/jBox/demo-img/CIMG6771_small.jpg" alt=""></a>
71-
<a class="demo-img" href="https://stephanwagner.me/img/jBox/demo-img/CIMG8142_large.jpg" data-jbox-image="gallery1" title="As usual, attaching jBox to images is easy as pie"><img src="https://stephanwagner.me/img/jBox/demo-img/CIMG8142_small.jpg" alt=""></a>
72-
<a href="https://stephanwagner.me/img/jBox/demo-img/NOT-FOUND.jpg" data-jbox-image="gallery1" title="You can adjust this image-not-found notice with CSS"></a>
68+
<a class="demo-img" href="https://stephanwagner.me/img/jBox/demo/image1.jpg" data-jbox-image="gallery1" title="Navigate with your keyboard: Press the [right] or [left] key"><img src="https://stephanwagner.me/img/jBox/demo/image1-preview.jpg" alt=""></a>
69+
<a class="demo-img" href="https://stephanwagner.me/img/jBox/demo/image2.jpg" data-jbox-image="gallery1" title="jBox is smart, the next image gets preloaded"><img src="https://stephanwagner.me/img/jBox/demo/image2-preview.jpg" alt=""></a>
70+
<a class="demo-img" href="https://stephanwagner.me/img/jBox/demo/image3.jpg" data-jbox-image="gallery1" title="You can easily group your images into galleries"><img src="https://stephanwagner.me/img/jBox/demo/image3-preview.jpg" alt=""></a>
71+
<a class="demo-img" href="https://stephanwagner.me/img/jBox/demo/image4.jpg" data-jbox-image="gallery1" title="As usual, attaching jBox to images is easy as pie"><img src="https://stephanwagner.me/img/jBox/demo/image4-preview.jpg" alt=""></a>
72+
<a href="https://stephanwagner.me/img/jBox/demo/NOT-FOUND.jpg" data-jbox-image="gallery1" title="You can adjust this image-not-found notice with CSS"></a>
7373
</div>
7474

7575
<h2>Playground</h2>

Demo/Playground/Playground.Avatar.css

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,26 +124,25 @@
124124
}
125125

126126
.AvatarsCollection#DislikedAvatars {
127-
left: 5px;
127+
left: 4px;
128128
}
129129

130130
.AvatarsCollection#LikedAvatars {
131-
right: 5px;
131+
right: 4px;
132132
}
133133

134134
.AvatarsCollection > div {
135135
width: 47px;
136136
height: 45px;
137+
padding: 0 1px;
137138
}
138139

139140
.AvatarsCollection#DislikedAvatars > div {
140141
float: left;
141-
padding-right: 2px;
142142
}
143143

144144
.AvatarsCollection#LikedAvatars > div {
145145
float: right;
146-
padding-left: 2px;
147146
}
148147

149148
.AvatarsCollection > div > div {
@@ -158,12 +157,10 @@
158157

159158
.AvatarsCollection#DislikedAvatars > div > div {
160159
border-color: #e33;
161-
padding-right: 2px;
162160
}
163161

164162
.AvatarsCollection#LikedAvatars > div > div {
165163
border-color: #7d0;
166-
padding-left: 2px;
167164
}
168165

169166
.AvatarsCollection > div > div > img {

Source/jBox.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ function jBox(type, options) {
4242
preventDefault: false, // Prevent the default event when opening jBox, e.g. don't follow the href in a link
4343

4444
// Content
45-
title: null, // Adds a title to your jBox
4645
content: null, // You can use HTML or a jQuery element, e.g. jQuery('#jBox-content'). The elements will be appended to the content element and then made visible, so hide them with style="display: none" beforehand
47-
getTitle: null, // Get the title from an attribute when jBox opens, e.g. getTitle: 'data-title'
4846
getContent: null, // Get the content from an attribute when jBox opens, e.g. getContent: 'data-content'. Use 'html' to get the attached elements HTML as content
47+
title: null, // Adds a title to your jBox
48+
getTitle: null, // Get the title from an attribute when jBox opens, e.g. getTitle: 'data-title'
49+
footer: null, // Adds a footer to your jBox
4950
isolateScroll: true, // Isolates scrolling to the content container
5051

5152
// AJAX

Source/jBox.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)