I have problem with this toggle on jQuery 1.8.2 i works but on 1.11.0 no. Can you help me what is wrong?
$('.open').toggle(function () {
$('.obj').animate({
top: "0"
}, 500);
},function () {
$('.obj').animate({
top: "-8%",
}, 500);
});
As mentioned in the comments you will need to do this using the click method. Here is an example that uses the element's data to store the state: