5102 Posts in 1520 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1382 Views |
-
jquery image gallery

17 March 2009 at 7:51am
Hi
I am trying to implement a jquery image gallery like jqgalscroll, but I can't get it to work. If I set it up with a plain html file, it works.
Here is the required code http://benjaminsterling.com/jquery-jqgalscroll-photo-gallery
This is what I have tried in SS:
in /mysite/code/page.php
Requirements::javascript('mysite/javascript/jqgalscroll.js');
Requirements::javascript('http://code.jquery.com/jquery-latest.pack.js');
Requirements::css('mysite/css/jqGalScroll.css');then I have put this function in /themes/mytheme/templates/page.ss
<script type="text/javascript">
$(document).ready(function() {
$('#demoOne').jqGalScroll();
});
</script>and also tried to have it in my /mysite/code/page.php
Requirements::customScript("
(function($){
$(document).ready(function() {
$('#demoOne').jqGalScroll();
});
})(jQuery);
");Anyone here see what I am doing wrong?
-
Re: jquery image gallery

17 March 2009 at 9:39am
You should probably include the jquery framework first if your gallery plugin depends on it.
-
Re: jquery image gallery

17 March 2009 at 9:42am
Yes, got it there... Requirements::javascript('http://code.jquery.com/jquery-latest.pack.js');
-
Re: jquery image gallery

17 March 2009 at 9:44am
But in your code it's below the jqgalscroll.js... right?
-
Re: jquery image gallery

17 March 2009 at 9:54am
That was it, thank you thank you thank you... couldn't see it myself
| 1382 Views | ||
|
Page:
1
|
Go to Top |

