Forums

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

Home Forums JavaScript Change function animation duration? Reply To: Change function animation duration?

#158657
TheDoc
Member

No, in this case you can’t have it outside. You could define a default outside but you’d still need to do the check again.

var default = 600;

// the following would be somewhere inside your function

var speed = duration ? duration : default