I am trying to animate a div on a link click to 3px at bottom if the position is already 30%, and goes up if it's 3px.
$(document).ready(function () {
$('#picsClick').click(function () {
if ($('#mainLogo').position().bottom === '30%') {
$("#mainMenu").animate({ bottom: "3px" }, 1100);
}
else if (($('#mainLogo').position().bottom === '3px')) {
$("#mainMenu").animate({ bottom: "30%" }, 1100);
}
});
});
Somehow it does not run as I have set mainMenu div position to bottom 30% and it's position is absolute.
Thanks.