I want to click outside box and NOT on the (click me) to hide the box. However when i click on the box and the link, i want to box to stay on. Hope someone here can help. Thanks so much. you guys are the best. here is http://jsfiddle.net/hamdlink/y94nr/
<style>
ul li{
list-style: none;
}
.click-me{
display: inline;
}
.hidden{
display:none;
background: #333;
width:150px;
color:red;
padding:30px;
}
</style>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script>
$(document).ready(function(){
$('.click-me').click(function(){
$('.hidden').slideDown();
});
$('body').click(function(e){
if(e.target.className!=='click-me'){
$('.hidden').slideUp();
}
});
});
</script>
<ul>
<li class="click-me">click me
<ul class="hidden">
<li>Link 1</li>
<li>Link 2</li>
<li>Link 3</li>
<li>Link 4</li>
<li>Link 5</li>
<li>Link 6</li>
</ul>
</li>
</ul>