Reputation: 746
I must have some problem with my method of toggling, but I'm getting an issue where once my toggle is activated I have to click each button twice to get an action. Im using a class to assign the toggle function to two links.
$(function() {
$(".partyToggle").toggle(
function() {
$("#wheres-the-party").animate({"height": "450px", "margin-bottom": "0px"}, 500);
$("#mapCta").delay(500).animate({"opacity": "0"}, 500);
$(".partyToggleClose").delay(500).animate({"height": "50px"}, 500);
},
function() {
$("#wheres-the-party").delay(500).animate({"height": "200px", "margin-bottom": "0"}, 500);
$("#mapCta").animate({"opacity": "1"}, 500);
$(".partyToggleClose").delay(500).animate({"height": "0"}, 500);
}
);
});
Upvotes: 1
Views: 1486