Useful bit of Javascript

Never thought about using javascript for this before but I had a requirement to force the window to the top of the page whilst executing a javascript onClick event.  Very simple but thought I'd note it down for future reference: scrollTo(x,y)

window.scrollTo(0,0);

More from this section

RECENT PERSONAL WORK

A.G. Cox Plumbing
alltradeart Case Study
Kwik Travel Case Study
Allotment Case Study

RECENT ARTICLES

Rails and Apache

In what appears to be a very useful find ' read more

Useful bit of Javascript

Never thought about using javascript for this before but I had a requ... read more

Quick jquery Gallery

I had a look at some of the gallery plugins available for jquery and ... read more

Massive CPU usage when updating Fedora using YUM/RPMQ

We noticed that YUM and RPMQ processes were using a massive amount CP... read more

CREDITS

powered by php-wax the php framework