17691 Posts in 4607 Topics by 2180 members
General Questions
SilverStripe Forums » General Questions » JQuery Slideshow Woes
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 1499 Views |
-
JQuery Slideshow Woes

1 August 2009 at 12:21am Last edited: 1 August 2009 12:24am
Hi All,
I am trying to get JQuery Slideshow working on a website.
I just can't seem to get it to work, the images are not rotating, merely tile over one another, no effects.
Here is my code as it is now.
Homepage.php - Javascript requirements
function init() {
parent::init();
Requirements::Javascript("mysite/javascript/slideshow.js");
Requirements::Javascript("mysite/javascript/jquery.js");
Requirements::customScript("
$(document).ready(function() {
$('#slideshow').slideshow({
timeout: 2000,
type: 'random',
pauselink: 'pause1',
pausecallback: function(self){
self.html('Play')
},
playcallback: function(self){
self.html('Pause');
}
});
$('#slideshow2').slideshow({
timeout: 2000,
type: 'sequence',
pauselink: 'pause2'
});
});
");
}Homepage.ss - The Slideshow HTML
<div id="slideshow">
<a href="1"><img src="/../../../assets/darksideofthemoon.jpg" alt="" /></a>
<a href="2"><img src="/../../../assets/absolution.jpg" alt="" /></a>
<a href="3"><img src="/../../../assets/acertaintrigger.jpg" alt="" /></a>
<a href="4"><img src="/../../../assets/liberationtransmission.jpg" alt="" /></a>
<a href="5"><img src="/../../../assets/americanidiot.jpg" alt="" /></a></div>
I'm still a little clueless when it come to using Javascript with Silverstripe. Am I doing this right? If not, can anyone show me the exact way to implement this?
Thanks
-
Re: JQuery Slideshow Woes

1 August 2009 at 1:19am
Maybe this will help http://ssbits.com/working-with-banners/
-
Re: JQuery Slideshow Woes

2 August 2009 at 6:50am
Yeah, thats the exact thing I want to do. The problem is I can't get it working.
I need to know if my code is in the right place....
Can anyone please help? I'm obviously missing something simple
| 1499 Views | ||
|
Page:
1
|
Go to Top |


