I have a DIV with many elements that are all clickable. Each one with it's own unique event. This DIV has a "docked" mode where it shows in some other place and layout on the page, when the mode is toggled.
I have to note that my main target browser is IE8. Many of the problems I'm facing here (SSSLLLLLOOOOWWWWW) just go away when I test on Chrome.
I was trying to use the $(...).html() method to move the HTML content to the new location. This works but the events are lost. I can use the .live() instead of .bind() but this makes all event responses about 10 time slower (remember I have MANY elements in that DIV).
Another thing I tried, is to just create content into both DIVs and bind events to both. Then I can toggle the main DIV visibility. That made the DOM creation much slower than before (still an instant on Chrome, but not on IE).
I'm looking for the "classic" way (if it exist) to perform this relocation of content on the page, while keeping the events intact.
UPDATE Think of this docking action as something similar to docking a floating window to one side of the screen in visual studio.