In the code below, why does the open function work, but the close function does not work?
$("#closeLink").click("closeIt");
How do you just call a function in click() instead of defining it in the click() method?
<script type="text/javascript"> $(document).ready(function() { $("#openLink").click(function() { $("#message").slideDown("fast"); }); $("#closeLink").click("closeIt"); }); function closeIt() { $("#message").slideUp("slow"); } </script>
My HTML:
Click these links to <span id="openLink">open</span> and <span id="closeLink">close</span> this message.</div> <div id="message" style="display: none">This is a test message.</div>
function jquery
Edward Tanguay Jan 15 '09 at 16:19 2009-01-15 16:19
source share