Using jQuery, I would like to disable scrolling of the body:
My idea is to:
body{ overflow: hidden;}
Try this code:
$(function() { // ... var $body = $(document); $body.bind('scroll', function() { if ($body.scrollLeft() !== 0) { $body.scrollLeft(0); } }); // ... });