Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

jQuery Cycle Lite Plugin and SilverStripe


Go to End


14 Posts   13265 Views

Avatar
bummzack

Community Member, 904 Posts

10 April 2009 at 3:04am

Most likely it's because there's a variable name clash? Could it be that prototype or some other library is being loaded that shadows the $ variable? Maybe you should have a look in firebug which javascript files are being loaded.

Avatar
martimiz

Forum Moderator, 1391 Posts

9 July 2009 at 2:25am

I stumbled upon this thread as I'm re. new to jQuery - a bit late maybe, but I thought to let you know anyhow: for me it worked when I added '$' to the function as I saw here: http://docs.jquery.com/Using_jQuery_with_Other_Libraries somewhere halfway down the page.

<script type="text/javascript">
	jQuery(document).ready(function ($) {
		$('#slideshow').cycle();
	});
</script>

Avatar
Chip Designs

Community Member, 15 Posts

25 June 2010 at 2:54pm

Hey Martimiz,

You're not too late. Your solution is the only one that worked for me. Thanks heaps!!

Cheers,
Rob

Avatar
edk

Community Member, 39 Posts

25 June 2010 at 3:25pm

Edited: 25/06/2010 3:25pm

Another way to do this (Banal actually helped with on another post a while back) is have your JQuery syntax like this...

;(function($) {
	$(document).ready(function() {
 				
 		$('#slideshow1').cycle();

	});
})(jQuery);

You just wrap JQuery in this function which will then negate any conflicts of the usage of the '$' sign.

Avatar
doubleedesign

Community Member, 19 Posts

26 May 2011 at 11:43pm

I know this thread is old but just wanted to say thankyou edk - your sample is the only one that would work for me.

Avatar
SSadmin

Community Member, 90 Posts

30 May 2011 at 10:58am

sounds like its a common problem with the conflict between Jquery and prototype lib.

Go to Top