If you don't do:

$('#selector').clone(true);

Then none of your event handlers will be copied over. Additionally,
when you clone the dom and reuse it, you lose any of the .data()
elements jquery places in it.

You should, instead of copying the dom then rendering it, simply hide
the content when the user focuses a new tab, and show the content if
and when they come back

On Mar 21, 3:43 am, Saurabh <saurabhperi...@gmail.com> wrote:
> hi,
>
> in our application we have created tabs that caches the old tab
> content and then goes to new tab. when user comes back to old tab we
> put that html again.
>
> by *caching* i mean that we take full dome using jquery clone function
> in a javascript variable and by *putting it back* i mean we do jquery
> replaceWith to the div.
>
> Following is link to the example i have created to 
> showhttp://www.reach1to1.com/sandbox/jquery/cache_problem/index.html
>
> after you visit this page check that datepicker is working fine. then
> click on the button "Cache and render again" and then datepicker stops
> working.
>
> Looking for solution,
>
> regards,
> saurabh

Reply via email to