Dead Sea

It's annoying when you're scrolling through a page and you happen to scroll over a map that's embedded, so your scroll wheel starts zooming into the map and now your map is all askew, and you can't find your socks and you forget your phone number, so you have a friend call you.

Dead sea is a micro-framework (less than 1K) that lets you call deadsea.blockScrollInto(element). It deals with DOM elements, not mapping frameworks, so it should work with Modest Maps, Polymaps, and what-have-you.

It's compatible with modern browsers. It won't break IE, it just won't do anything in it.

on GitHub , deadsea.min.js

↕ Scroll through this page for a demo

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam sed risus vel massa sagittis pretium. Donec gravida est quis elit pharetra vestibulum mattis tortor facilisis. Maecenas leo elit, vehicula ut rutrum iaculis, fringilla vel quam. Aliquam nunc metus, tempor quis volutpat ac, porttitor in purus. Donec quis nibh nisl, id auctor nulla. Nunc id lobortis leo. Nulla volutpat, est non ullamcorper gravida, sapien erat volutpat odio, eget pellentesque mi augue in risus. Suspendisse malesuada sapien nec lacus porta dapibus. Morbi a ipsum quis turpis volutpat pellentesque. Curabitur urna ante, blandit pulvinar convallis id, elementum eget metus. Sed quis egestas mauris. In velit lorem, iaculis ac molestie eget, convallis vel augue. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Maecenas fermentum cursus odio, vulputate hendrerit mauris aliquam eget. Phasellus tortor elit, pharetra non viverra quis, rhoncus ut sem. Nam nec neque a dui accumsan ultricies ac ut leo. Aenean sed dui turpis. Vestibulum elit mi, molestie ultrices lacinia bibendum, pulvinar tempor eros. Duis ac vulputate sapien.

Cras euismod semper sem, quis commodo dolor iaculis at. Donec erat nisl, ullamcorper ac auctor vel, dapibus et libero. Nunc sollicitudin enim quis libero blandit non ullamcorper urna suscipit. Fusce et eleifend erat. Nulla facilisi. Ut tristique volutpat euismod. Mauris venenatis eros ut tortor cursus non interdum arcu scelerisque. Morbi vehicula volutpat erat. Donec congue neque ac erat pulvinar dignissim. Phasellus vel tristique lorem.

A Modest Maps Map

Vestibulum faucibus nisi vel felis egestas eget convallis purus elementum. Aenean libero mauris, molestie sed varius vitae, aliquam id dui. Phasellus feugiat iaculis orci in facilisis. Suspendisse fringilla semper nibh, ultrices imperdiet tellus semper et. Aenean vel mauris lacus. Maecenas vulputate pharetra odio, id fringilla risus pretium eget. Vestibulum at urna ante, quis porttitor elit. Quisque faucibus euismod dui sit amet convallis. Praesent interdum, turpis in accumsan pulvinar, turpis velit pulvinar justo, ut sollicitudin magna ligula id nunc. Donec faucibus nulla ut sapien dapibus accumsan. Nullam pretium luctus eros, at pellentesque felis lacinia in. Phasellus lobortis aliquet ullamcorper. Praesent nec lacus et sem dictum pellentesque quis vel orci. Praesent orci dolor, cursus ut euismod eget, semper et nisl. Nunc at viverra orci. In ultrices euismod dignissim. Sed in purus sem, dapibus convallis ipsum. Maecenas non dolor vel odio rutrum adipiscing.

He and I were never very friendly. Although, however, we were friendly, even very. I've got something wrong here: To be exact, he and I were not friendly and were always on bad terms. And this is how we got crossed: I was standing beside a shop; they were issuing sugar there, and I was standing in the queue, trying not to listen to what was being said around me. I had slight toothache and was not in the greatest of moods. It was very cold outside, and though everyone was wearing quilted fur coats they were still freezing. I was also wearing a quilted fur, but I was not freezing myself, though my hands were freezing because I had to keep taking them out of my pockets to move the suitcase I was holding between my knees, so that it didn't go missing. Suddenly someone struck me on the back. I flew into a state of indescribable indignation and, quick as lightning, began to consider how to punish the offender. During this time, I was struck a second time on the back. I pricked up my ears, but decided against turning my head and pretended that I hadn't noticed. I just, to be on the safe side, took the suitcase in my hand. Seven minutes passed and I was struck on the back a third time. At this I turned round and saw in front of me a tall middle-aged man in a rather shabby, but still quite good, military fur coat.

Cras euismod semper sem, quis commodo dolor iaculis at. Donec erat nisl, ullamcorper ac auctor vel, dapibus et libero. Nunc sollicitudin enim quis libero blandit non ullamcorper urna suscipit. Fusce et eleifend erat. Nulla facilisi. Ut tristique volutpat euismod. Mauris venenatis eros ut tortor cursus non interdum arcu scelerisque. Morbi vehicula volutpat erat. Donec congue neque ac erat pulvinar dignissim. Phasellus vel tristique lorem.

Cras euismod semper sem, quis commodo dolor iaculis at. Donec erat nisl, ullamcorper ac auctor vel, dapibus et libero. Nunc sollicitudin enim quis libero blandit non ullamcorper urna suscipit. Fusce et eleifend erat. Nulla facilisi. Ut tristique volutpat euismod. Mauris venenatis eros ut tortor cursus non interdum arcu scelerisque. Morbi vehicula volutpat erat. Donec congue neque ac erat pulvinar dignissim. Phasellus vel tristique lorem.

Scroll in here!

Cras euismod semper sem, quis commodo dolor iaculis at. Donec erat nisl, ullamcorper ac auctor vel, dapibus et libero. Nunc sollicitudin enim quis libero blandit non ullamcorper urna suscipit. Fusce et eleifend erat. Nulla facilisi. Ut tristique volutpat euismod. Mauris venenatis eros ut tortor cursus non interdum arcu scelerisque. Morbi vehicula volutpat erat. Donec congue neque ac erat pulvinar dignissim. Phasellus vel tristique lorem.

When I again wanted to take my place in the queue, they wouldn’t let me in and even pushed me gradually out on to the street. Holding back my anger at such bad manners, I went off home. At home I discovered that my brother had taken all the money from my purse. At this stage I got absolutely furious with my brother, and since then he and I have never made it up.

Once I couldn’t contain myself and burst out laughing. They rushed in horror to escape - some through the door, some through the window, and some straight through the walls.