I have a script that works in Firefox, Safari, and Chrome. It just doesn't work in Internet Explorer for whatever reason. The code is fairly simple:
<script type="text/javascript">
(function( $ ){
$.fn.tabSwap = function() {
return this.each(function() {
$('.current').removeClass('current');
$(this).addClass('current');
});
};
})( jQuery );
</script>
On a fairly simplified page (posted by Roatin Marth) the code worked just fine in IE 6 and IE 8. On my webpage the code does not work at all in Internet Explorer.
I tried executing the following simple code:
<script type="text/javascript">
$('#statistics').tabSwap();
</script>
I get the following error:
Object doesn't support this property or method
index.html line: 77
code: 0 char: 2
URI: ...
The link to my webpage is:
http://examples.chikachu.com/calculators
Any ideas what's wrong?