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.

Using Javascript to focus a form element onload

The Personalised Plates website has a big input box on every page for searching for available personalised plates. The page template uses the Javascript form element focus() function to set the focus on this text box when the page loads so the user can start to type in a personalised plate idea without having to click the box with their mouse.