Hey Jason,

I thought it made sense too - the explanation of why it happens.

Yes, it would be ideal if jquery were just added to the portal
templates.  However, the developers don't have control over the portal
templates.  They are strictly locked down, and there is no way the
manager of the portal will put it in.  So we need to come up with
another way of either dynamically adding the plugin, then using it, or
detecting if jquery is already called before calling it again.  Of
course, that last one would require that all developers do that, which
may not happen.  It would be awesome if jquery itself would know that
it's already been declared and not override itself if it was.

On May 18, 7:42 pm, Jason Huck <[EMAIL PROTECTED]> wrote:
> That makes sense. jQuery is loaded, then extended by loading a plugin,
> but then replaced with a fresh, unaltered copy of jQuery, all of which
> takes place before document.ready(), where the (by then nonexistent)
> plugin is finally called.
>
> I would consider including the base jQuery file via a stub or template
> so that it's available on any/all pages in the system, then use
> something like one of the .require() plugins to manage the loading of
> additional plugins from within individual portlets. That's if you're
> looking for a pure Javascript solution. You could do something similar
> on the server side to prevent scripts from being loaded multiple
> times.
>
> - jason
>
> On May 18, 9:33 pm, Shelane <[EMAIL PROTECTED]> wrote:
>
> > if you have this in this order, the plugin call won't work.  it will
> > give an error that the plugin function is not defined
>
> > <script type="text/javascript" src="/scripts/jquery.pack.js"></script>
>
> > <script type="text/javascript" src="/scripts/jquery.corner.js"></
> > script>
>
> > $(function(){
> > $('#bodyframe').corner('tr');
>
> > });
>
> > <script type="text/javascript" src="/scripts/jquery.pack.js"></script>
>
> > Since this is a portal, I may not know if the jquery was already
> > included and I can't stop it being included in another portlet.

Reply via email to