Hi all. I was trying to figure out how to add mousewheel support to jQuery Lightbox (Leandro Vieira Pinho version) and failed. Well, not a big surprise, since I don't have any clue about coding javascript.
For those not familiar with Lightbox and Fancybox: Both are picture galleries based on jQuery. Only Fancybox works with jQuery Mousewheel Pack, so it supports scrolling the pictures contained in the galleries by mousewheel, which is not available in jQuery Lightbox. That is, what I want to add.
What I tried, was copying the mousewheel related parts from Fancybox to jQuery Lightbox and playing around with the code a bit. That didn't work. Then I gave the jQuery Plugin site itself a try and just followed the instructions by adding
- $('#scroll').bind('mousewheel', function(event, delta) {
console.log(delta);
});
to my lightbox.js and the #scroll to different elements in my html pages (I have 'a' and 'area' tags that would have to be addressed). It didn't work and changing #scroll to .scroll to trigger the function by classes didn't work either.
Can someone be so kind and post the code that I need to add (and if important tell in which line)?
Sample code can be found here:
#lb triggers the lightbox overlay so I could use it to trigger mousewheel as well. I'm using jQuery v1.2.3 (at least the file sais so, it came included with lightbox) and jquery.mousewheel-3.0.6.pack.js (requires 1.2.2+).
Regards
Greg