Using jquery I have the function below. When the button is clicked it slides a div underneath that button, however there are multiple buttons on the page and if they click one button I want to make sure if any other buttons were clicked their div toggles back to sliding up so only one div is showing at any given time when a button is clicked. Any suggestions?
$('.ftable').delegate('.button.green.table','click',function() {
ftableid = $(this).attr('title');
$("#formtable" + ftableid).slideToggle("fast", function() {
//code here
});
return false;
});
1 Answer