I have a form that is hidden and will be displayed when clicking a link; i created jQuery for this and it's working. Now i want the option to hide the form again but with the current code i have the form is show, but then closed again when i click the link. Below is my jQuery code, how can i modify it to keep the form displayed but allow me to hide it by clicking on the same link?
Code: Select all
$(document).ready(function() {
$('form').hide();
//$('a.current').click(function() {
$('a.more').click(function() {
$('form').slideDown('slow');
//$(this).hide();
return false;
});
});
// ----
$(document).ready(function() {
$('a.more').click(function() {
$('form').slideUp('slow');
return false;
});
});