STEVE!!!!

I ride alongside you in this boat of shame.  I have the exact same
problem.  Portlet interface, two styles of instantiating portlets.
Long have I suffered this bug to no avail.  I have cheesily and not
completely solved the problem by storing the jQuery object in another
variable and then extending the jQuery that's "not right" with a copy
of the OK one.  However, this sucks.  And it doesn't work reliably now
that I'm trying to solve it in IE.

I've characterised this problem in the past as "plugins falling out of
jQuery" and "the bane of my existence" on the jQuery-UI group and
here, and I've noticed that it seems to happen after the .load()
method is called.  I've also noticed that it is really "cramping my
style" and "making me want to kill myself."

Now that there are two of us, can anyone provide some guidance?
Advice?  Comfort?

--adam

On Mar 31, 6:50 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I am building a portal interface in jQuery (and UI). Each portlet has
> a sortable drag handle which each feature roll-up/down and close links
> on hover.
>
> I use server-side scripting to build the page on first load. All the
> drag/rollup/close events are recorded in a DB using ajax, so that the
> next time the page is hard-loaded the portlets are displayed as they
> were left.
>
> There is also a 'customise this page' link which dynamically adds
> portlets to the DOM on an event. The portlet code is identical to that
> used on hard-load, only this time the code is prepended to an existing
> DOM element.
>
> All the jQuery stuff (sorting, roll-up etc.) works properly when the
> content is 'hard-loaded'. However, when adding portlets to the DOM on
> an event, all the clever jQuery stuff doesn't work.
>
> I'm not sure, but I believe this is because the config javascript
> waits until $(document).ready. This happens on 'hard-load' but has no
> effect on DOM stuff added after this.
>
> How would you recommend I re-invoke the jQuery javascript after adding
> a dynamic element to the DOM?
>
> Thanks for your help.
>
> Regards,
> Steve

Reply via email to