This code works in every browser except, IE7, 8 and 9. I know I can use jquery tabs, but I like doing things differently to learn more native javascript. Open the fiddle in IE and you will see what I mean. Open it in any other browser, it will work. Somebody please tell me what I am doing wrong. Thanks
Share
In IE9,
this.pathnamereturns_display/, but in Chrome, it’s/_display/.In both IE9 and Chrome
window.location.pathnameis/_display/.So the
this.pathname == window.location.pathnamefails in IE.Updated example: http://jsfiddle.net/rL9Mj/1/