[jQuery] Drop Down Div
[jQuery] Drop Down Div
I have a div called testidrop,
[code]<div class="testidrop" id="testidrop">...</div>[/code]
normally is is hidden, but when I click on a link (testialink)
it should drop down,
[CODE]<a href="#" id="testialink" class="testialink">Testimonials</a>[/
CODE]
So I thought it was all working great, until I discovered than
whenever you click ANYWHERE on the page it drops down!
:confused:
Here is the code in the head tag
[CODE] <script>
//show testimonials
$(document.getElementById('testialink')).click(function(){$
(document.getElementById('testidrop')).slideToggle("slow")});
$(document.getElementById('close')).click(function(){$
(document.getElementById('testidrop')).slideup("slow")});
</script>[/CODE]
(BTW the reason for the close one, us because there is a link within
the testidrop div that will close it)
any idea why this happens? or what I can do to fix it?