update leanmodal css and js to have close box
--HG-- branch : static_ernie_leanmodal_closebox
This commit is contained in:
@@ -6,8 +6,13 @@
|
||||
|
||||
var defaults = {
|
||||
top: 100,
|
||||
overlay: 0.5
|
||||
overlay: 0.5,
|
||||
closeButton:'.modal_close'
|
||||
}
|
||||
|
||||
var overlay = $("<div id='lean_overlay'></div>");
|
||||
|
||||
$("body").append(overlay);
|
||||
|
||||
options = $.extend(defaults, options);
|
||||
|
||||
@@ -17,17 +22,20 @@
|
||||
|
||||
$(this).click(function(e) {
|
||||
|
||||
var overlay = $("<div id='lean_overlay'></div>");
|
||||
|
||||
var modal_id = $(this).attr("href");
|
||||
|
||||
$(".leanModal_box").css({ 'display' : 'none' });
|
||||
|
||||
$("body").append(overlay);
|
||||
|
||||
$(".leanModal_box").append("<a class=\"modal_close\" href=\"#\">✖</a>");
|
||||
|
||||
$("#lean_overlay").click(function() {
|
||||
close_modal(modal_id);
|
||||
});
|
||||
|
||||
$(o.closeButton).click(function() {
|
||||
close_modal(modal_id);
|
||||
});
|
||||
|
||||
var modal_height = $(modal_id).outerHeight();
|
||||
var modal_width = $(modal_id).outerWidth();
|
||||
|
||||
Reference in New Issue
Block a user