Skip to content
This repository
Browse code

Merge pull request #24 from sgebhardt/master

Merging pull request: Better resizing with the use of a footer
  • Loading branch information...
commit 1b3c950dcec4b3521c71a35347e2378edfbec472 2 parents b5e32e1 + 34ce4aa
Jason Butz authored January 31, 2013
3  README.md
Source Rendered
@@ -23,6 +23,9 @@ Example
23 23
 	<div class='lightbox-content'>
24 24
 		<img src="image.png">
25 25
 	</div>
  26
+	<div class='lightbox-footer'>
  27
+		<button class="btn btn-small btn-primary">Click</button>
  28
+	</div>
26 29
 </div>
27 30
 ```
28 31
 
4  js/bootstrap-lightbox.js
@@ -228,6 +228,10 @@
228 228
 					wOffs += 40;
229 229
 					hOffs += 10;
230 230
 				}
  231
+				if (that.$element.find('.lightbox-footer').length > 0) {
  232
+					hOffs += that.$element.find('.lightbox-footer').height();
  233
+					hOffs += 10;
  234
+				}
231 235
 				$img.css('max-width', $(window).width() - wOffs);
232 236
 				$img.css('max-height', $(window).height() - hOffs);
233 237
 				

0 notes on commit 1b3c950

Please sign in to comment.
Something went wrong with that request. Please try again.