views:

5

answers:

1

Greetings,

I am using http://haineault.com/media/jquery/ui-timepickr/page/

I want to be able to change the parameters

something like:

$('aField').timepickr( some default parameters);

user makes some choices

$('aField').remove(timepickr); ???????????????????????????

$('aField').timepickr( some other parameters reflecting user choices);

how can i destroy unlink remove disassociate ... (?) an instance of timepickr?

I have tried $('aField').timepickr( 'destroy'); cloning cussing ...

A: 

Their destroy function is not correctly cleaning up, as a work-around, try this:

$('aField').timepickr('destroy').next(".ui-timepickr").remove(); //Blow it away
$('aField').timepicker(); //Bring it back, new options

Only change is we're cleaning up the elements it creates after destroying the widget itself.

Nick Craver