X Page Scroller 2

Description

This demo shows how to control the scrolling of the window. When a mousedown event occurs on a button, scrolling begins and continues until the mouseup event occurs.

Discuss this demo.

Related demos: an old demo, another old demo, yet another old demo, Page Scroller 1.

Updates

24 Oct 09: Now works with Safari and Chrome.

22 Oct 09: Initial implementation.

Browser Testing

24 Oct 09: Tested on WinXP-SP2 with Firefox 3.5.3, Opera 9.63 & 10.0, Safari 3.1.2 & 4.0.3, Chrome 3.0.195.27, and IE 7.

Safari Test Notes

It seems that the "document.documentElement.scroll*" properties are incorrect, while the "document.body.scroll*" properties are correct.

However, it seems that "document.body.clientHeight" is incorrect, while "document.documentElement.clientHeight" is correct.

clientWidth and clientHeight are not used in this demo because "window.scrollTo" does its own range checking.

Chrome Test Notes

As expected, with Chrome utilizing WebKit, it has the same symptoms as Safari.

Zero Aggression Principle

A libertarian is a person who believes that no one has the right, under any circumstances, to initiate force against another human being for any reason whatever; nor will a libertarian advocate the initiation of force, or delegate it to anyone else.

Those who act consistently with this principle are libertarians, whether they realize it or not. Those who fail to act consistently with it are not libertarians, regardless of what they may claim.

- L. Neil Smith

On the other hand...

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Declaration of Independence

When in the Course of human events it becomes necessary for one people to dissolve the political bands which have connected them with another and to assume among the powers of the earth, the separate and equal station to which the Laws of Nature and of Nature's God entitle them, a decent respect to the opinions of mankind requires that they should declare the causes which impel them to the separation.

We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness. — That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed, — That whenever any Form of Government becomes destructive of these ends, it is the Right of the People to alter or to abolish it, and to institute new Government, laying its foundation on such principles and organizing its powers in such form, as to them shall seem most likely to effect their Safety and Happiness. Prudence, indeed, will dictate that Governments long established should not be changed for light and transient causes; and accordingly all experience hath shewn that mankind are more disposed to suffer, while evils are sufferable than to right themselves by abolishing the forms to which they are accustomed. But when a long train of abuses and usurpations, pursuing invariably the same Object evinces a design to reduce them under absolute Despotism, it is their right, it is their duty, to throw off such Government, and to provide new Guards for their future security.

But I must explain...

Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?

To the People of the Confederate States of America

Animated by the confidence in your spirit and fortitude, which never yet has failed me, I announce to you, fellow-countrymen, that it is my purpose to maintain your cause with my whole heart and soul; that I will never consent to abandon to the enemy one foot of the soil of any one of the States of the Confederacy; that Virginia, noble State, whose ancient renown has been eclipsed by her still more glorious recent history, whose bosom has been bared to receive the main shock of this war, whose sons and daughters have exhibited heroism so sublime as to render her illustrious in all times to come - that Virginia, with the help of her people, and by the blessing of Providence, shall be held and defended, and no peace ever be made with the infamous invaders of her homes by the sacrifice of any of her rights or territory. If by stress of numbers we should ever be compelled to a temporary withdrawal from her limits, or those of any other border State, again and again will we return, until the baffled and exhausted enemy shall abandon in despair his endless and impossible task of making slaves of a people resolved to be free.

Let us not, then, despond, my countrymen; but, relying on the never-failing mercies and protecting care of our God, let us meet the foe with fresh defiance, with unconquered and unconquerable hearts.

- Jefferson Davis

On the other hand...

At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.

Healthcare Reform is More Corporate Welfare

Last Wednesday the nation was riveted to the President’s speech on healthcare reform before Congress. While the President’s concern for the uninsured is no doubt sincere, his plan amounts to a magnanimous gift to the health insurance industry, despite any implications to the contrary.

For decades the insurance industry has been lobbying for mandated coverage for everyone. Imagine if the cell phone industry or the cable TV industry received such a gift from government? If government were to fine individuals simply for not buying a corporation’s product, it would be an incredible and completely unfair boon to that industry, at the expense of freedom and the free market. Yet this is what the current healthcare reform plans intend to do for the very powerful health insurance industry.

- Ron Paul