21309 Posts in 5738 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 973 Views |
-
sIFR and Lightbox2.0 conflict on ss2.4

20 August 2010 at 6:18pm
Hi. This is my first post so please be gentle.
I'm using sIFR on SS2.4 and it all works sweet. I've created a custom gallery style page that utilises the FileDataObjectManager and that all works sweet to.
But they don't work so well together. For some reason SIFR drops off and won't display.
I've hard coded the js into the ss file like so which works well with other projects I've done.<script type="text/javascript" src="mysite/javascript/lightbox/prototype.js"></script>
<script type="text/javascript" src="mysite/javascript/lightbox/scriptaculous.js"></script>
<script type="text/javascript" src="mysite/javascript/lightbox/lightbox.js"></script>
<link href="themes/kmcolour/css/lightbox.css" rel="stylesheet" type="text/css" media="screen" / >and added the appropriate Requirements::block to the php file like so.
public function init() {
parent::init();
Requirements::block('sapphire/thirdparty/jquery/jquery.js');
Requirements::block('userforms/thirdparty/jquery-validate/jquery.validate.min.js');
Validator::set_javascript_validation_handler('none');
}But together they just don't get on. Especially the top group. When I remove the js sIFR works fine but of course lightbox don't work
Has anyone come across this before?
Should I be blocking anything else? Any help would be much appreciated.
Forgot to mention how kick arse silverstripe is.
It's made CMS and design translation so easy, coming from a design perspective.Cheers
-
Re: sIFR and Lightbox2.0 conflict on ss2.4

22 August 2010 at 7:41am
Use "noconflit" Jquery function.
-
Re: sIFR and Lightbox2.0 conflict on ss2.4

23 August 2010 at 10:35am
using the this statement may help you solve the problem:
;(function($) {
// this is a substitute for $(document).ready,
// so you don't need to put that later on!
$(function(){
// your code here
});
})(jQuery); -
Re: sIFR and Lightbox2.0 conflict on ss2.4

23 August 2010 at 3:40pm
Thanks for the replies.
Forgot to mention that I'm no JQuery ninja either.
Should I apply this to Lightbox or sFIR js?
Or is the an SS thing where I need to include it in the php or ss template?
My understanding is that there is no real configuration function with Lightbox.
You just add the file links in the head and insert the "rel="lightbox[example]" snip in the image link and away she goes.So I'm confused ast to where I should add the statement.
More help would be much appreciated. Cheers.
| 973 Views | ||
|
Page:
1
|
Go to Top |

