I do not know how well i remaked this code, but the biggest problem is this:
when i am clicked on menu item, than black box are showing. When i clicked in white space/background or somewhere else, than box disappeared. It is logical to assume, that when i am clicking second menu item (when first menu item is actived), than first menu item (black box) should disappear, and second menu item should be activated. However, when i am clicking second menu item, both black boxes is activated.
$(document).ready(function () {
$('#icons').click(function () {
if ($('#chat-drop').is(":visible")) {
$('#chat-drop').hide()
$('#rodyti').removeClass('active');
} else {
$('#chat-drop').show()
$('#rodyti').addClass('active');
}
return false;
});
Full code: http://jsfiddle.net/wW75v/4/
I would be grateful for any help