JS: fix first part of #422; make items in drop-down acutally work

This commit is contained in:
Jef van Schendel 2012-04-01 18:06:49 +02:00
parent 339105fa36
commit 98853c63fd

View File

@ -18,15 +18,12 @@
$(document).ready(function() {
$(".dropdown_items").hide();
$(".dropdown").click(function(e) {
e.preventDefault();
$(".dropdown_items").toggle();
});
$(".dropdown_items").mouseup(function() {
return false
});
$(document).mouseup(function(e) {
if($(e.target).not(".dropdown_items")) {
if($(e.target).is(".dropdown")) {
$(".dropdown_items").toggle();
} else if($(e.target).is(".dropdown_items")) {
return;
} else {
$(".dropdown_items").hide();
}
});