I’m wondering how exactly to apply a style to a div, and then remove it slowly via animation? Check out the fiddle link here, this obviously doesn’t work, but how would I fix it so it does?
http://jsfiddle.net/csaltyj/PzUdA/
EDIT: sorry, meant fade the background out, not the div itself.
Or you can simply remove the
.animate()and replace with:EDIT based on your comments that you want to just remove the class and not content:
Simply include jQueryUI and use .toggleClass() as is reflected in this working jsFiddle demo.
jQuery: