Avoid memory leaks in your jQuery code by using the jQuery ‘cleanup’ plugin

As I said before in a previous post I’m currently in the process of developing a ‘mobile first’ front-end framework, and just like before; I have decided to release one of the critical components as a self contained mini project.

This plugin makes jQuery trigger a ‘cleanup’ event on any dom element just before it gets removed or replaced.

The purpose of this plugin; is to allow you to avoid memory leaks by allowing you to remove any perpetually referenced resources associated with a dom element when the ‘cleanup’ event is triggered.

Continue reading