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.
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.
- Previous 10 entries
- 1
- Page 22(current)
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>
Hey Martimiz,
You're not too late. Your solution is the only one that worked for me. Thanks heaps!!
Cheers,
Rob
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.
I know this thread is old but just wanted to say thankyou edk - your sample is the only one that would work for me.
sounds like its a common problem with the conflict between Jquery and prototype lib.
- Previous 10 entries
- 1
- Page 22(current)