Javascript

Javascript Updates

High Contrast

Ever had the problem of having to build a site that needs to work in all aspects. Most people forget about the high contrast mode for accessibility types. High contrast is actually very simple to work out but in a small amount of code, but finding this took me a few hours of painful thinking as well as research. Well better get back to it it's simple just detect if a background image is found on an element, simple well here is just a snippet of code which should help you out. function highContrastMode() { var header = document.getElementById("header"); if (header != null && (header.currentStyle.backgroundImage ==...