Im using jcarousel with drupal and the standard carousel is working fine:
http://smartpeopletalkfast.co.uk/oo/content/redHowever I want to add the numbered external controls as demoed here:
http://sorgalla.com/projects/jcarousel/examples/static_controls.htmlIve added the same controls as the demo which is:
<div class="jcarousel-control">
<a href="#">1</a>
<a href="#">2</a>
<a href="#">3</a>
<a href="#">4</a>
<a href="#">5</a>
<a href="#">6</a>
<a href="#">7</a>
<a href="#">8</a>
<a href="#">9</a>
<a href="#">10</a>
</div>
From the demo, I think the extra javascript that I need to add is:
<script type="text/javascript">
function mycarousel_initCallback(carousel) {
jQuery('.jcarousel-control a').bind('click', function() {
carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
return false;
});
};
</script>
However its not working. Ive tried adding the code to the begging and end of my head, as well as the end of the page (just within the end of the body). Is the code correct? If so, am I loading it incorrectly?
The current javascript that's working (for the standard carousel) is created by the drupal UI so sorry if this makes it a little unclear.
Thanks