Skip to content

Releases: ericbutler555/plain-js-slidetoggle

v2.0.0

14 Feb 23:12
Compare
Choose a tag to compare

In version 2, I've made the slideToggle function a method off the HTML element, which mirrors how it's written in jQuery. So now you call it like this:

document.querySelector('.whatever').slideToggle(200, myCallback);

instead of

slideToggle(document.querySelector('.whatever'), 200, myCallback);

Same change for slideUp() and slideDown(). Check the source code of the updated demo page for more examples.