I am trying to get my dropdown menu box so that if i click outside it it will scroll up. I am using the code below to do just that. But for some reason when i click it it just scrolls on up for no reason. You can see a demo here of what i mean. http://bit.ly/sIvM2I To see an example click see our newfeed.
And this is the jfiddle im using http://jsfiddle.net/zBkxj/6/ To see an example click see our newfeed.
Why is it just scrolling up when i click it on http://bit.ly/sIvM2I ? What is wrong with my javascript? To see an example click see our newfeed.
<script type='text/javascript'>//<![CDATA[
$(window).load(function(){
$('#bottom').click(function() {
$('#content').slideDown();
});
$(document).click(function(e) {
if (e.target.id !='bottom') {
$('#content').slideUp();
}
});
});//]]>
</script>
This code works as you expected
try the live demo at js fiddle