JS li tag onclick not working on IE8
IE8 and earlier don’t have addEventListener, but they do have its non-standard predecessor, attachEvent. They’re not quite the same. Here’s a “hook this event” function that uses what’s available: var hookEvent = (function() { var div; // The function we use on standard-compliant browsers function standardHookEvent(element, eventName, handler) { element.addEventListener(eventName, handler, false); return element; } … Read more