Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdfe236e

Browse files
author
FinelySliced
committed
Fixed multiple spawn of #overlay element. Added option to specify a closeButton element.
1 parentda3df05 commitdfe236e

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

‎jquery.leanModal.js‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66

77
vardefaults={
88
top:100,
9-
overlay:0.5
9+
overlay:0.5,
10+
closeButton:null
1011
}
12+
13+
varoverlay=$("<div id='lean_overlay'></div>");
14+
15+
$("body").append(overlay);
1116

1217
options=$.extend(defaults,options);
1318

@@ -17,15 +22,15 @@
1722

1823
$(this).click(function(e){
1924

20-
varoverlay=$("<div id='lean_overlay'></div>");
21-
2225
varmodal_id=$(this).attr("href");
2326

24-
$("body").append(overlay);
25-
2627
$("#lean_overlay").click(function(){
2728
close_modal(modal_id);
2829
});
30+
31+
$(o.closeButton).click(function(){
32+
close_modal(modal_id);
33+
});
2934

3035
varmodal_height=$(modal_id).outerHeight();
3136
varmodal_width=$(modal_id).outerWidth();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp