Strict Standards: Redefining already defined constructor for class Object in /home/richards/public_html/cake/libs/object.php on line 54

Strict Standards: Non-static method Configure::getInstance() should not be called statically in /home/richards/public_html/cake/bootstrap.php on line 38
jQuery - Richard Scarrott: Frontend Web Developer

JavaScript's onmouseover/onmouseenter event can often be too eager in that it'll fire even if your cursor just incidentally enters an element whilst moving to another area of the page. This is acceptable in the case of button rollover effects or any other unobtrusive actions but when it comes to more consequential actions it can, in some cases, be disruptive to the UX.

I've therefore written a mousestop event using jQuery's relatively un-touted special event API.

Continue reading

I've recently been working on a jQuery carousel script and I've finally found the time to package it up as a plugin for your consumption. It's been used on a number of live projects so it's battle tested and will run in all major browsers including IE6.

UPDATE 09/03/2011: This plugin has now been rewritten using jQuery UI's Widget Factory with a few extra features including autoScroll - https://github.com/richardscarrott/jquery-ui-carousel

Continue reading

It seems almost every project I work on uses 'in-field' form labels where, to conserve space or offer suggestions, the input acts as a label holding a default value which is consequently removed on focus.

I've seen this implemented in a number of different ways, however it's often done so with little thought -- I guess because it seems like a rather trivial task on the face of it.

Some pitfalls I've seen include:

  • Writing the focus and blur events for each individual input, often inline *shudder*, where the label string is explicitly declared for each input – this doesn't exactly follow...

Continue reading