Mouse Wheel Scroll
-
Hi Malihu,
Thank you so much for this plugin, it is wonderful and flexible and I am using it in one of my latest designs that I am currently building for a client.
I have been trying to set up the plugin to auto-scroll to the next/previous anchor using the mousewheel script you provided in another post:
<script src="https://new.enhanceltd.com/wp-content/themes/kapital/js/jquery.mousewheel.min.js"></script> <script> (function($){ $(window).load(function(){ /* bind mousewheel event on document */ $(document).mousewheel(function(e){ e.preventDefault(); var section=$("#content > section"), /* define your sections selector (change to your selector) */ currentTarget=$(".mPS2id-target"), /* define the current section */ /* if mouse-wheel delta is less than zero scroll-to next section from current if mouse-wheel delta is greater than zero scroll-to previous section from current */ to=e.deltaY<0 ? currentTarget.next().attr("id") : currentTarget.prev().attr("id"); /* if variable to is defined, use plugin's scrollTo method to programmatically scroll to target */ if(to){ $.mPageScroll2id("scrollTo",to); } }); }); })(jQuery); </script>
However, though my static links are working, my scroll wheel has completely stopped working. Is there a way to fix this?
You can view my working page here: https://new.enhanceltd.com/services-3/
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Mouse Wheel Scroll’ is closed to new replies.