This is a migrated thread and some comments may be shown as answers.

Destroy ColorPicker

1 Answer 240 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 30 Jul 2013, 02:53 AM
Given I have an input element that has already been converted to a color picker.  ( ex: $(input).kendoColorPicker(); )

  1. How do i get a reference to that color picker to say set the value?
  2. Destroy that color picker?

Thanks,
Jason

1 Answer, 1 is accepted

Sort by
0
Holger
Top achievements
Rank 1
answered on 30 Jul 2013, 06:32 AM
Hi,

1.    You can access the ColorPicker widget like this:
var colorPicker = $(input).data('kendoColorPicker');
      To set the color you can either use the color() or the value() method.

2.    To destroy the widget use the destroy() method. The destroy method does not remove the element from the DOM, but destroys it's JavaScript representation.

Regards,
Holger
Tags
ColorPicker
Asked by
Jason
Top achievements
Rank 1
Answers by
Holger
Top achievements
Rank 1
Share this question
or