Mouse Wheel Scrolling in Tablet Template
Is there any way to allow scrolling via the mouse wheel in the tablet layout? I can click and drag but I would also like to scroll with the wheel.
Catch up wih the Appery.io community on our forum. Here you'll find information on the lastest questions and issues Appery.io developers are discussing.
https://forum.appery.io/
Is there any way to allow scrolling via the mouse wheel in the tablet layout? I can click and drag but I would also like to scroll with the wheel.
Hi Brandon,
Please make screen shot of your layout and describe or point the place what you want to wheel by mouse.
Regards.
Yurii, I was able to get the function I was looking for with the following added to "jquery.mobile.scrollview.css":
.ui-scrollview-clip {overflow-y:auto!important;}
::-webkit-scrollbar { width: 0 !important }
This appears to be working, but is there a better way to do this? Thanks
Hi Brandon,
Unfortunatly currently "scrollview" not supports mouse wheel events.
So your solution is ok if it does what you need.
Also you can manage it with JS code but this solution not an easy to implement. For example listen to "mousewheel" event from scroll container and then set appropriate scroll value with this plugin.
Solution for this:
1 Activate page on which you want this behaviour.
2 Add "Page load" event handler.
3 Populate it with following code:
pre
var scrollers = $('.scroller:visible');
var onmousewheel = function(event){
var scroller = jQuery(this);
Code: Select all
var position = scroller.scrollview("getScrollPosition");
var wheel = event.originalEvent.wheelDelta;
position.y = position.y - wheel;
scroller.scrollview("scrollTo", (-1) * position.x, (-1) * position.y); };
scrollers.unibnd("mousewheel").bind("mousewheel", onmousewheel)
/pre
Regards