Skip to content

Commit 56dec67

Browse files
craziricantsrivishnu
crazirican
authored andcommitted
Fixed issue 22. Multiple backdrops.
1 parent 62545a3 commit 56dec67

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

bootstro.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,15 @@ $(document).ready(function(){
212212
selector = selector || '.bootstro';
213213
$elements = $(selector);
214214
count = $elements.size();
215-
216-
$('<div class="bootstro-backdrop"></div>').appendTo('body');
217-
bootstro.bind();
218-
bootstro.go_to(0);
215+
216+
if ($('div.bootstro-backdrop').length === 0)
217+
{
218+
// Prevents multiple copies
219+
$('<div class="bootstro-backdrop"></div>').appendTo('body');
220+
bootstro.bind();
221+
bootstro.go_to(0);
222+
}
223+
219224
};
220225

221226
//bind the nav buttons click event

bootstro.min.js

+8-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)