Scroll to the bottom of a page with jQuery

Some time back I posted how to scroll to the top of a page with jQuery and was recently asked how to scroll to the bottom of a page with jQuery. I took a punt on the answer and posted it in the comments without testing it and the commenter said it didn’t work, so I tested it out for myself and my solution did work. I present it here along with a link to a full working example which shows scrolling to the bottom and scrolling to the top.

Style an HTML form input with CSS and jQuery

It’s possible with CSS to style a particular form input type without having to assign a class to each one with the special style. For example you may want to add a margin before radio buttons in a form but not all the other input elements. Unfortunately this doesn’t work in Internert Explorer 6 (which still has about 25% market share as at the writing of this post) but there is a way around this using Javascript. In this post I’ll look at both the CSS way of doing this and then also using the jQuery Javascript library.

How to disable Javascript in Mozilla Firefox

Forms on websites are typically validated using Javascript on the client side to prevent additional round trips to the server if a form hasn’t been completed correctly, and are then also validated on the server side. When testing a website you need to be able to test both so need to disable Javascript in your web browser to test the server side validation. This post looks at how to disable Javascript in the Mozilla Firefox web browser. The specific version the screenshots come from are Firefox 3 but it should be the same for earlier versions.

Load Javascript files asynchronously

It’s annoying when a web page is loading and gets stuck downloading a Javascript file from a remote domain. Until the file has downloaded, rendering on the page stalls which could potentially lose you traffic as people give up waiting. Instead it’s a good idea to load the remote Javascript asynchronously so the page can continue to render and the code is downloaded in the background.