Skip to content

Commit 8ec543f

Browse files
committed
Added $.superbox.close() to close SuperBox! from script. (fixes #12)
1 parent fd72d2f commit 8ec543f

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

doc/english.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ <h2>Getting started</h2>
8484
<strong>prevTxt</strong>: "Previous", // "Previous" button text
8585
<strong>nextTxt</strong>: "Next" // "Next" button text
8686
};</code></pre>
87-
87+
<p>It is also possible to close SuperBox! from a script, by calling the <code>$.superbox.close()</code> function.</p>
8888
<div id="mode-image">
8989
<h2>Picture mode</h2>
9090
<p>Displays a box containing a picture.</p>

doc/francais.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ <h2>Mise en route</h2>
7777
<strong>prevTxt</strong>: "Previous", // Texte du bouton "previous"
7878
<strong>nextTxt</strong>: "Next" // Texte du bouton "Next"
7979
};</code></pre>
80+
<p>Il est également possible de fermer SuperBox! depuis un script, en appelant la fonction <code>$.superbox.close()</code>.</p>
8081

8182
<div id="mode-image">
8283
<h2>Mode image</h2>

jquery.superbox.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,10 @@
334334
showBox();
335335
});
336336
});
337-
}
337+
},
338+
339+
// Close SuperBox!
340+
close: hideAll
338341
});
339342

340343

0 commit comments

Comments
 (0)