Skip to content
Snippets Groups Projects
Commit 0d53d735 authored by Peter Rotich's avatar Peter Rotich
Browse files

Close tip popup on click outside the tip box.

Credit: http://stackoverflow.com/a/7385673/2867073
parent 7145785a
No related branches found
No related tags found
No related merge requests found
......@@ -213,4 +213,12 @@ jQuery(function() {
e.preventDefault();
$(this).parent().parent().remove();
});
$(document).live('mouseup', function (e) {
var container = $('.tip_box');
if (!container.is(e.target)
&& container.has(e.target).length === 0) {
container.remove();
}
});
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment