Thanks to all...

The problem seems to work fine if I declare MooTools import script
AFTER Magnolia CMS import script.
In that way, Magnolia defines its own $ function and then MooTools
override it with "our" common $.

I can not explain why it entered that conditional if (typeof $ !=
'function').

Anyway, now it works fine.

M.

On 18 Dic, 17:38, nutron <[email protected]> wrote:
> I'll reiterate that your example that you shared worked fine for me.
>
>
>
> On Thu, Dec 18, 2008 at 8:38 AM, Aaron Newton <[email protected]> wrote:
> > On Thu, Dec 18, 2008 at 1:56 AM, Matteo Pelucco (via Nabble) <
> > [email protected]<ml-user%[email protected]>
> > > wrote:
>
> >> Hi nutron,
> >> thanks for your help.
> >> In my code I include MooTools as first <script> tag.
> >> Then I include the guilty code, wich cause other MooTools script to
> >> fail.
> >> So, $ function is defined and the code
>
> >> typeof $ != 'function'
>
> >> says "true", on every browser.
> >> So, the function $ should not to be redefined, isn't it?
>
> >> I can not understand why this piece of script touch MooTools...
>
> >  I'm not sure why this isn't working. You might instead do
>
> > if (!window.$)
>
> > But that might not solve your problem. What happens if you log the value of
> > window.$ at the time of that conditional? What does the browser say it is at
> > that point?
>
> -----
> The MooTools Tutorial:  http://www.mootorial.comwww.mootorial.com
> Clientcide:  http://www.clientcide.comwww.clientcide.com
> --
> View this message in 
> context:http://n2.nabble.com/MooTools-and-Magnolia-CMS-tp1667374p1673735.html
> Sent from the MooTools Users mailing list archive at Nabble.com.

Reply via email to