I've got these anchor elements in my page with href to some contents on the same page. I myself can't believe how many methods I'v tried since yesterday to set a simple active class. But non of them worked in IE7+ and even IE10. I checked markups, css and scripts But just no success and That is so so confusing.I tried 2 scripts like \[code\]addClassthat()\[/code\] and \[code\]removeClass()\[/code\] in one simple script and worked in all browsers except ie7+ and in other method I tried \[code\]siblings()\[/code\] which worked too except in ie7+.I even tried the scripts that are already working [in dynamic navigation] in other projects. But for this static absolute URL I'm getting no result in IE7+. I'm just tired to try more in this and in fact very curious to know what the wrong is.By the way, the extra usage of nested html elements is just for designing purpose and nothing else.Here you can see one of the method tried.Help PlzEdit: After 2 days trying and trying I suddenly found the solution. Setting class "x" for all anchor elements and writing the script below would solve the problem.\[code\] $('.x > a').click(function (e) { e.preventDefault(); });\[/code\]However, I appreciate that if anyone could explain the main logic behind using the script above.