jquery

Detect Locale with javascript

Posted by on 31 Oct 2011 at 9:37 am

There may be times where you would want to detect the language of the users browser. I would normally use php to detect the users browser language. However, when this is not possible, it can also be done using the following javascript: thelocale = ‘en-GB’; // set default locale if ( navigator ) { if [...]

Hiding content – accessibility consideration

Posted by on 21 Aug 2011 at 7:56 pm

If you need to hide content but still want it available to screen readers, avoid using  display:none in your CSS. display:none means exactly what it says – NONE! Thus the element will also be hidden from all screen readers and all browsers. To have the element hidden from browsers, but still available to screen readers [...]

Force compatibility viewer

Posted by on 31 Jul 2011 at 6:43 am

A few months ago I created a large CMS website for a client using HTML5 plenty of jQuery. I thought it looked great. However, she informed me that it wasn’t rendering properly. It looked fine to me. She was using the latest version of IE, IE9 – I wasn’t. The answer was simple, force the [...]