21491 Posts in 5783 Topics by 2622 members
|Go to End|
24 May 2010 at 1:45pm Last edited: 24 May 2010 3:03pm
I have a few more basic questions, working on my first Silverstripe site and its been quite a frustrating experience so far.
25 May 2010 at 9:20pm
Your issue may be a conflict between prototype and jquery. SSNavigator uses prototype (as does much of the CMS). Both use the $ symbol as their main function (which is stupid, but that's another subject).
What may be happening is that jquery and the lightbox load before prototype, and when prototype loads, it overwrites the definition of $, and jquery $ and the lightbox are gone.
You can correct this in different ways:
1. by forcing the order. You need to do something like this in your controller init, or somewhere that is always called for each page:
The paths that these are loading from will be visible in firebug (easiest way to see it, but you can see them in the HTML as well, near the end). The above code, or some variation like that, can be used to force the order. It's not particularly elegant, but it's straightforward.
2. Another way to correct it in your page's code is to use the symbol jquery instead of $. Even if prototype overwrites $, the jquery global is still present.
3. Another way still is to wrap the jquery code in a closure and explicitly pass jquery global in as $.
Longer term (past 2.4) we're moving away from prototype, so the conflict will be resolved, but that won't help you in the immediate.
2 June 2010 at 7:20am
Hello, I have few questions ..
How to embed something like this:
Also I tried to use Requirements::clear();, but any way jquery 1.4 included via $SilverStripeNavigator, but liquid-canvas requires jquery-1.3.2
|Go to Top|