Skip to content

Commit 1f496b9

Browse files
author
David McAlpine
committed
Merge pull request #2 from turboclaw/master
Added shrinkToFit option
2 parents 65cf39d + 67ce6ad commit 1f496b9

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

QBox.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ var QBox = (function(){
3939
className : "", // Class name to override content styles
4040
closeHTML : "×",
4141
autoCenter : true,
42-
blurBackground : false
42+
blurBackground : false,
43+
shrinkToFit : false
4344
};
4445

4546
// Private Attributes
@@ -62,7 +63,7 @@ var QBox = (function(){
6263
function createContent(){
6364
content = makeElement(contentClass, maskClass);
6465

65-
content.style.display = "block";
66+
content.style.display = settings.shrinkToFit ? "inline-block" : "block";
6667
content.className += (" " + settings.className);
6768

6869
if( settings.autoCenter ) content.className += (" " + autoCenterClass);

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ but it will also hide by default via clicking the mask, or the close button.
3030
className : "",
3131
closeHTML : "×",
3232
autoCenter : true,
33-
blurBackground : false
33+
blurBackground : false,
34+
shrinkToFit : false
3435
}
3536
```

0 commit comments

Comments
 (0)