Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (18 sloc) 845 Bytes

Kill it with fire!

Not metaphorically speaking.

Kaboom

See it live: Demo.

Only works on elements with white backgrounds. Change images/circle_eat.png to a different color for otherwise.

Usage:

Takes optional config object

var $thing = $('.thing').killWithFire({
    callback: function() {
        console.log('done!');
    },
    image_path: '/images_dir/' // defaults to images/ . Must have trailing slash!
})

CSS:

You do NOT need to include the CSS file. Just make sure the element you're killing has position:relative or absolute

Originally made for The Hippopotamatron 5000.

Never license your code.