Commit 998ee24b by David Ormsbee

Merge pull request #278 from MITx/mm-modal-clone

Clone and remove modal
parents 1d4a2da3 00480f6e
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
var modal_id = $(this).attr("href"); var modal_id = $(this).attr("href");
modal_clone = $(modal_id).clone(true, true);
modal_clone.attr('id', 'modal_clone');
$(modal_id).after(modal_clone);
modal_id = '#modal_clone';
$("#lean_overlay").click(function() { $("#lean_overlay").click(function() {
close_modal(modal_id); close_modal(modal_id);
}); });
...@@ -69,6 +74,7 @@ ...@@ -69,6 +74,7 @@
$("#lean_overlay").fadeOut(200); $("#lean_overlay").fadeOut(200);
$('iframe', modal_id).attr('src', ''); $('iframe', modal_id).attr('src', '');
$(modal_id).css({ 'display' : 'none' }); $(modal_id).css({ 'display' : 'none' });
$(modal_id).remove();
} }
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment