How to stop the scrolling

Jun 21, 2012 at 8:08 AM

Hi, I want to know how I can stop the thumbnails from scrolling. Both the arrow and automatic scrolling.


Jun 22, 2012 at 12:50 PM

Found it. Just remove the line to scroll from function highlightthumb() in file

Jul 30, 2012 at 12:57 PM

Thanks for this, I need to do the same, but it still needs to centralise the thumb. 
So instead of scrolling to image number 40+ each time the page is refreshed, it just centralises the thumb in the nav-container instead? 

Any ideas? 

Jul 31, 2012 at 3:50 AM

how can i stop the scrolling? i already deleted the highlightthumb() but still its scrolling.

Jul 31, 2012 at 5:06 AM

@abelrsuing  - dont delete entire highlightthumb(). Only remove line no. 833.

this.thumbs_wrapper.animate({scrollLeft: left +'px'});

@RyanGled - I dont know hoe to centralize. But I think the variable has_scrolled can be used to move the scroller to any position .

Jul 31, 2012 at 6:09 AM

@GanG2245, thanks a lot!

Jul 31, 2012 at 12:31 PM

Hi GanG,

Thanks for the response!
Still doesn't seem to do what I need though - the problem I have is that my client needs a portfolio page that refreshes and pulls textual data back from a database per page (so the slider resets with start_at_index, passed with PHP) - it's all a bit complex. But each time it resets it scrolls all the way along the thumbnails until it reaches the start_at_index. It'd be much better if I could somehow pass it so it starts there without animation, but maybe I'm asking too much?

Any ideas from anyone would be greatly appreciated. 

Jul 31, 2012 at 3:11 PM
Edited Jul 31, 2012 at 3:14 PM
this.thumbs_wrapper.animate({scrollLeft: left +'px'},0);

Can't believe I missed something that simple.
Basically means the animation doesn't complete, thus is instant. Probably a bit of a hack, but it works.

Aug 6, 2012 at 2:32 PM

Instead of editing the library file, why not override the highlightThumb method?

Just override the method after the declaration

galleries = $('.ad-gallery').adGallery();
galleries[ 0 ].highLightThumb = function(thumb) { this.thumbs_wrapper.find('.ad-active').removeClass('ad-active'); thumb.addClass('ad-active'); if(this.settings.thumb_opacity < 1) { this.thumbs_wrapper.find('a:not(.ad-active) img').fadeTo(300, this.settings.thumb_opacity); thumb.find('img').fadeTo(300, 1); }; var left = thumb[0].parentNode.offsetLeft; left -= (this.nav_display_width / 2) - (thumb[0].offsetWidth / 2); //this.thumbs_wrapper.animate({scrollLeft: left +'px'}); }

Aug 7, 2012 at 9:37 AM

Hi Fabricio,

I did think of doing the same, but it turns out that it stops the thumb container scrolling entirely (which presents a problem when the AD Gallery has 40+ pictures). You've picked up on an interesting point though, I'll have a play as that's a better way of doing things.


Aug 7, 2012 at 2:10 PM

What I've done was copy and paste the plugin method in my code, overrided it and comment the animate line.

All other lines are the same as the plugin method. You can even create your own animate command.

In my case, I commented the line because when i clicked on a thumb, the scroll was animated to the first "page" of thumbs. I've tried every thing to resolve this "problem" and had no success. So, i used The Force! :D