-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"disable" feature #3
Comments
Are you talking about a |
more disable/hide than destroy. For example: I want to show something different, with "normal" scrolling, then return to multiscroll. |
Yeah, that's mainly a destroy function. As you have to unbind all the events used by the plugin. |
or a if(disabled)return; in all event handlers... as a start ;) |
I was able to disable the listeners and allow the slideshow to run automatically $(document).ready(function() {
$('#myContainer').multiscroll({
verticalCentered : true,
scrollingSpeed: 200,
easing: 'easeInQuart',
menu: false,
sectionsColor: [],
navigation: true,
navigationPosition: 'right',
navigationColor: '#000',
navigationTooltips: [],
loopBottom: true,
loopTop: true,
css3: true,
paddingTop: 105,
paddingBottom: 50,
normalScrollElements: null,
keyboardScrolling: false,
touchSensitivity: 5,
//events
//afterLoad: function(id9, index){},
});
});
$.fn.multiscroll({
afterLoad: function (anchor, index) {
setInterval(function() {
setTimeout(function(){
$.fn.multiscroll.moveSectionDown();
}, 700);
}, 4000);
},
afterRender: function(){
setInterval(function() {
setTimeout(function(){
$.fn.multiscroll.moveSectionDown();
}, 700);
}, 4000);
}
});
This will set an interval and run the function after 4 seconds, in this case
To disable the mouse scrolling
/**
* Detecting mousewheel scrolling
*
* http://blogs.sitepointstatic.com/examples/tech/mouse-wheel/index.html
* http://www.sitepoint.com/html5-javascript-mouse-wheel/
*/
function MouseWheelHandler(e) {
return true;
} |
+1 on that @Antonimo . I'm using your fantastic plugin @alvarotrigo, but have huge problems when the page needs to be rendered in mobile, since i have to enable normal scrolling instead of split scroll (or toggle between tablet portrait - normal scroll and landscape - split scroll) I really have no idea, which event listeners to disable, in order to achieve that. Can you please help me? |
the code isnt huge really, you can find all the events, there arnt many. Also look at the code above |
see here #21 |
I'm having an issue when using $.fn.multiscroll.build(); for click references For instance: This works, however when clicking the .gallery-close button, code inspector throws the error "Uncaught TypeError: ((m.event.special[e.origType] || (intermediate value)).handle || e.handler).apply is not a function" Is there another way to go about preventing the page scroll on click? Ideas? |
@dsgnco may be:
or check version of plugin |
@talgautb thanks, this is what I have implemented, the problem is on the click function to close, the multiscroll.build(); works but it throws an error in the web inspector "Uncaught TypeError: ((m.event.special[e.origType] || (intermediate value)).handle || e.handler).apply is not a function" and I cannot seem to locate the source of the error... Just wanting to eliminate that js error in the web inspector. |
Is it possible to disable the mousewheel functions so that slides only change when you click the nav? |
Yeah, use the function You can use it in the |
thanks, this works great however the navigation now doesnt change slides, when used on |
As a quick hack I've stopped the |
Hi there, I'd like also to stop the wheel navigation, either on the whole website, or on one specific section. I found that the addMouseWheelHandler is in the jquery.multiscroll.extensions.min.js but this is a js minified file that I was could download once the licence was paid. Any way to have a normal version of this file so that I make the wheel change? Should I "de" minify the file myself? |
@GaelJaboulay if you want to disable the mouse wheel event just use the method |
"disable" feature would be nice, to disable, and turn off all event listeners, when needed.
The text was updated successfully, but these errors were encountered: