Note: This implementation demonstrates the library but the included demo files better demonstrate the fullscreen app potential. Get the files at GitHub


Scroll Me Bro

A simple jQuery backed scroll arrester

Quickly block un-intentional background scrolling when certain elements are scrolled or touched. Un-intentional scrolling and bouncing can make an app's layout seem loose and sloppy.

The Test

Scrolling inside of this div with the mouse wheel or on a touch device should allow the content to freely scroll up and down.


Implementation

Add the scroll lock to your page with one line of jQuery!

var noBroNo = new ScrollBlocker($('#noBroNo'));

Need to nest a scrollable element in one that is locked?

var nestedScrollingDiv = new NestedScroller($('#nested-scroll'));

Github Project Page

Syntax Highlighting by Highlight.js

Ipsum text by Veggie Ipsum

Don't scroll me Bro.

Scroll This div with the mouse wheel. With the scroll blocker turned on, there should be no effect on the right hand side

The Test

Click the Remove button and test the page out without scroll blocker. With the scroll blocker removed the right side of the page now scrolls When the mouse wheel is used on the left side. Gross right?



Veggies es bonus vobis, proinde vos postulo essum magis kohlrabi welsh onion daikon amaranth tatsoi tomatillo melon azuki bean garlic.

Gumbo beet greens corn soko endive gumbo gourd. Parsley shallot courgette tatsoi pea sprouts fava bean collard greens dandelion okra wakame tomato. Dandelion cucumber earthnut pea peanut soko zucchini.

Turnip greens yarrow ricebean rutabaga endive cauliflower sea lettuce kohlrabi amaranth water spinach avocado daikon napa cabbage asparagus winter purslane kale. Celery potato scallion desert raisin horseradish spinach carrot soko. Lotus root water spinach fennel kombu maize bamboo shoot green bean swiss chard seakale pumpkin onion chickpea gram corn pea. Brussels sprout coriander water chestnut gourd swiss chard wakame kohlrabi beetroot carrot watercress. Corn amaranth salsify bunya nuts nori azuki bean chickweed potato bell pepper artichoke.


This is a nested scroller.