Permalink
Browse files

Merge pull request #24 from sgebhardt/master

Merging pull request: Better resizing with the use of a footer
  • Loading branch information...
2 parents b5e32e1 + 34ce4aa commit 1b3c950dcec4b3521c71a35347e2378edfbec472 @jbutz committed Jan 31, 2013
Showing with 7 additions and 0 deletions.
  1. +3 −0 README.md
  2. +4 −0 js/bootstrap-lightbox.js
View
@@ -23,6 +23,9 @@ Example
<div class='lightbox-content'>
<img src="image.png">
</div>
+ <div class='lightbox-footer'>
+ <button class="btn btn-small btn-primary">Click</button>
+ </div>
</div>
```
@@ -228,6 +228,10 @@
wOffs += 40;
hOffs += 10;
}
+ if (that.$element.find('.lightbox-footer').length > 0) {
+ hOffs += that.$element.find('.lightbox-footer').height();
+ hOffs += 10;
+ }
$img.css('max-width', $(window).width() - wOffs);
$img.css('max-height', $(window).height() - hOffs);

0 comments on commit 1b3c950

Please sign in to comment.