I still don't get what you really want to do.
Once you click on your #load element, you attach a datepicker to your
input. Unbinding the click event from the #load element will just
disable the load trigger, but the datepicker is still attached to the
input element. To detach a UI element use: datepicker("destroy").
by(e)
Stephan
2009/2/4 mcologne <[email protected]>:
>
> upps there was an error:
>
> unload is just an eventhandler to unbind #load
>
> $(#unload).click(function() {
> $("#load").unbind('click', loadfn)
> });
>
> but this doesn't work
> On Feb 4, 8:53 pm, mcologne <[email protected]> wrote:
>> hi,
>>
>> i'm not sure how to unbind a datepicker...
>>
>> html is:
>> <p>Date: <input type="text" id="datepicker"></p>
>> <a href="#" id="load">load datepicker</a><br />
>> <a href="#" id="unload">unload datepicker</a><br />
>>
>> javascript:
>> $(document).ready(function() {
>> var loadfn = function () {
>> $("#datepicker").datepicker({
>> showOn: 'button',
>> buttonImage: 'templates/images/calendar.gif',
>> buttonImageOnly: true
>> });
>> };
>> $("#load").click(loadfn);
>>
>> });
>>
>> is there a possibility to use something like
>> $("#unload").unbind('click', unloadfn) ?
>>
>> how looks this function like?
>> or must i use datepicker( "disable" )?
>>
>> best regards m
>> cologne
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery UI" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/jquery-ui?hl=en
-~----------~----~----~----~------~----~------~--~---