Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Jquery .animate Re: Jquery .animate

#48949

Johnny is right on, with .animate you can’t actually toggle per-say, but you can create a variable like var portSize = “small”; then use an if statement to grow the div on click, resign the variable to something like “big”, and add another if statement that shrinks the div if var portSize = “big”; then assign it back to “small” at the end, making it toggle-like.