To hide it again, bind a click listener to the document, then you can check if the thing you've clicked on is in your drop down and return false if it is, or hide if it's not. Effectively that means if you click on anything other than a link in the drop down, it will hide it var $dropdown = $(". Dropdown > dd > ul"), $drop_link = $(".
Dropdown > dt > a"); $drop_link. Click(function(e) { $dropdown.toggle(); e.preventDefault(); }); // Bind the click to everything $(document). Mouseup(function(e) { // If the dropdown is visible // and the thing we've clicked is not a descendent of the dropdown if ($dropdown.Is(":visible") && $(e.
Target). Parents('. Dropdown').
Length == 0) { $dropdown.hide(); } }) I've also updated your jsFiddle.
To hide it again, bind a click listener to the document, then you can check if the thing you've clicked on is in your drop down and return false if it is, or hide if it's not. Effectively that means if you click on anything other than a link in the drop down, it will hide it. Var $dropdown = $(".
Dropdown > dd > ul"), $drop_link = $(". Dropdown > dt > a"); $drop_link. Click(function(e) { $dropdown.toggle(); e.preventDefault(); }); // Bind the click to everything $(document).
Mouseup(function(e) { // If the dropdown is visible // and the thing we've clicked is not a descendent of the dropdown if ($dropdown. Is(":visible") && $(e. Target).
Parents('. Dropdown'). Length == 0) { $dropdown.hide(); } }); I've also updated your jsFiddle.
Thanks, it's almost solved. I've got the following problem now. Check out this jsFiddle: jsfiddle.Net/NcNHf/2.
When I click on a menu, I want the other menus to be closed automatically. How do I accomplish that_ – Martijn van Turnhout Oct 28 at 9:56.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.