e2interactive forums » Sample of (E)2 Photo Gallery

Search:

Scrolling more than a single thumbnail

(4 posts)
  • Started 5 months ago by unclebill
  • Latest reply from unclebill

  1. unclebill
    Member

    I'm set up with 5 thumbnails, and I've made a change so that when you click to scroll right, a whole new set of 5 thumbnails scrolls in. That's great, but when the last few thumbnails scroll in, the scroll right arrow remains, and I can keep scrolling nothing. Any way to have that scroll arrow disappear when there's no more thumbnails to scroll like it did when I was just scrolling single thumbnails?

    Posted 5 months ago #
  2. unclebill
    Member

    Can anyone help me with this?
    The page is here. (A work in progress)

    Notice how the right arrow remains and you can keep on scrolling thumbnails
    even though there are no more thumbs remaining to scroll.

    Posted 5 months ago #
  3. Okay, got it.

    Open up the e2photo.js file and find the following on line 116:

    function checkbutton(mynum){
    	if ( mynum == 0 ) {
    		mm_shl('back','hidden');
    		mm_shl('more','visible');
    	} else if ( mynum < thumbnailnum - maxthumbvisible ) {
    		mm_shl('back','visible');
    		mm_shl('more','visible');
    	} else {
    		mm_shl('back','visible');
    		mm_shl('more','hidden');
    	}
    }

    change it to:

    function checkbutton(mynum){
    	var thumbBoxWidth = $('thumbgall').getCoordinates().width;
    	if ( mynum == 0 ) {
    		mm_shl('back','hidden');
    		mm_shl('more','visible');
    	} else if ( mynum < thumbBoxWidth - moveamount ) {
    		mm_shl('back','visible');
    		mm_shl('more','visible');
    	} else {
    		mm_shl('back','visible');
    		mm_shl('more','hidden');
    	}
    }

    Now find line 165:

    currentpos-=1;

    and change it to:

    currentpos-=moveamount;

    Now find line 167:

    currentpos+=1;

    and change it to

    currentpos+=moveamount;

    See how that works for you.

    Posted 5 months ago #
  4. unclebill
    Member

    Works sweetly now. I thank you very much, both for the help and for the wonderful script.

    Posted 5 months ago #

RSS feed for this topic

Reply

You must log in to post.