Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign up"disable" feature #3
Comments
This comment has been minimized.
This comment has been minimized.
Are you talking about a |
This comment has been minimized.
This comment has been minimized.
more disable/hide than destroy. For example: I want to show something different, with "normal" scrolling, then return to multiscroll. |
This comment has been minimized.
This comment has been minimized.
Yeah, that's mainly a destroy function. As you have to unbind all the events used by the plugin. |
This comment has been minimized.
This comment has been minimized.
or a if(disabled)return; in all event handlers... as a start ;) |
This comment has been minimized.
This comment has been minimized.
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;
} |
This comment has been minimized.
This comment has been minimized.
+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? |
This comment has been minimized.
This comment has been minimized.
the code isnt huge really, you can find all the events, there arnt many. Also look at the code above |
This comment has been minimized.
This comment has been minimized.
see here #21 |
This comment has been minimized.
This comment has been minimized.
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? |
This comment has been minimized.
This comment has been minimized.
@dsgnco may be:
or check version of plugin |
This comment has been minimized.
This comment has been minimized.
@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. |
This comment has been minimized.
This comment has been minimized.
Is it possible to disable the mousewheel functions so that slides only change when you click the nav? |
This comment has been minimized.
This comment has been minimized.
Yeah, use the function You can use it in the |
This comment has been minimized.
This comment has been minimized.
thanks, this works great however the navigation now doesnt change slides, when used on |
This comment has been minimized.
This comment has been minimized.
As a quick hack I've stopped the |
This comment has been minimized.
This comment has been minimized.
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? |
This comment has been minimized.
This comment has been minimized.
@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.