Announcement

#1 2014-08-12 02:36:31

ivo
Guest

horizontal scrollbar mousewheel

Hi Greetings,

guys, trying to import a piece of javascript code into category pages for horizontal scrolling, having a long list of big size thumbnails i would like to scroll using mousewheel, the code alone it works i can see here http://jsfiddle.net/6b28X/29/ and was imported into header.tpl in the modus theme, jquery library is loaded, is there anywhere else need to setup anything to make this horizontal scrolling work? Let me say i am pretty excited by the performance and rich optionset by piwigo and can't wait to move my pictures in!

Piwigo version: 2.6.3
PHP version: 5.4
MySQL version: 5.5
Piwigo URL: http://fotografer.de/piwigo/index.php?/recent_pics

 

#2 2014-08-13 15:52:21

ivo
Guest

Re: horizontal scrollbar mousewheel

i end up using the jquery mousewheel plugin instead, which does the perfect job in this case

$(function() {

   $("#thumbnails").mousewheel(function(event, delta) {

      this.scrollLeft -= (delta * 30);
   
      event.preventDefault();

   });

});

problem with the other script was when the thumbnails list appeared inline in css white-space:nowrap which was expanding the list beyond the browser width but the javascript was evaluating only the width of the browser window and thatswhy thinking there is nothing to scroll

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2022 · Contact