laktek / really-simple-color-picker

Simple Color Picker written in jQuery.
http://laktek.com/2008/10/27/really-simple-color-picker-in-jquery
MIT License
179 stars 65 forks source link

Destroy colorpicker #15

Open peterpham opened 11 years ago

peterpham commented 11 years ago

How to properly destroy a color picker instance?

redon commented 11 years ago

need that too

georgecoltart commented 10 years ago

+1

andrewboudreau commented 9 years ago

as a simple work around, i added this to the create method

element.data("colorPickerDelete", function () {
                element.unbind();
                newPalette.remove();
                newHexLabel.remove();
                newHexField.remove();
                newControl.remove();
            });

and then executed as needed with

 $(element).data("colorPickerDelete")();