How to use .toggle()
method but not for show and hide purposes?
For example, when I click on a certain div I would like to animate it's position
$(div).animate({"left":"+=50px"});
and then on the second click to return the div on the same position $(div).animate({"left":"-=50px"})
.
I know there is other solution but I would like to achieve this with .toggle()
without hiding an showing the div. Any ideas?