Removing elements with effects

You will often create interfaces such as lists or tables that will be representing data from a database. If the interface is for management purposes, you will typically be able to add, edit, and remove these items. We can use jQuery effects to add to the user experience when these items are added, as described in the Fading elements recipe. We can also provide effects when removing an item from the DOM. Thanks to jQuery, it is very easy to do.

Getting ready

As with the other recipes in this chapter, you are going to need a blank HTML document. Save this document as recipe-9.html and ensure it is within the same directory as the latest version of jQuery.

How to do it…

Understand how you can remove DOM elements with effects ...

Get jQuery 2.0 Development Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.