Scribus Forums

Scribus => General Discussion => Topic started by: dukesanj on May 20, 2011, 12:44:33 pm

Title: Can someone help me with some JS code please?
Post by: dukesanj on May 20, 2011, 12:44:33 pm
Could someone please help me with some Js code?
I need to implement more than one gallery on a page, and the current script only allows one gallery.
Can someone please let me know if they can show me how to change the script to allow 10+ galleries on a page please?

Here's a copy of the script:
<script type="text/javascript" src="jquery/jquery-1.4.1.js"></script>


   <script type="text/javascript">
   var currentImage;
    var currentIndex = -1;
    var interval;
    function showImage(index){
        if(index < $('.bigPic img').length){
           var indexImage = $('.bigPic img')[index]
               if(currentImage != indexImage ){
                    $(currentImage).fadeOut(500, function() {
                   myTimer = setTimeout("false", 3000);
            $(indexImage).css({'display':'block', 'opacity':1});
            currentImage = indexImage;
            currentIndex = index;
            $('.thumbs li').removeClass('active');
            $($('.thumbs li')[index]).addClass('active');
    function showNext(){
        var len = $('.bigPic img').length;
        var next = currentIndex < (len-1) ? currentIndex + 1 : 0;
    var myTimer;
    $(document).ready(function() {
       myTimer = setTimeout("false()", 3000);
      showNext(); //loads first image
        $('.thumbs li').bind('click',function(e){
           var count = $(this).attr('rel');

And heres the url for the page:

I would really appreciate someones help.
Many thanks