I have a filter that I toggle.
When i click on said area, it toggles the size of filterarea correctly.
What I want to be able to do is close it using another button too.
Setting the height to 15 in another method works, but it assumes the toggle state is not changed, so you have to click it a few times to cycle through to so its in sync.
Is there any way to just tell the filter toggle to occur. Instead of closing it seperately.
$("#filtertoggle").toggle(function () {
$("#filterarea").animate({ height: "200px" }, 400);
},
function () {
$("#filterarea").animate({ height: "15px" }, 400);
});
Calling the below is actually just an unparmeterised toggle, so it will just hide filtertoggle. It doesnt call teh method i created.
$("#goFilter").click(function () {
$( ".filtertoggle" ).toggle();
}