JQuery not working in IE7/8

Posted by user1665283 on Stack Overflow See other posts from Stack Overflow or by user1665283
Published on 2012-09-12T09:37:04Z Indexed on 2012/09/12 9:38 UTC
Read the original article Hit count: 157

Filed under:
|

I have been given the following code to implement:

<script type="text/javascript">

  $(document).ready(function(){
    $('.hotspots a').bind('mouseover click', function() {
      $this = $(this);
      if($('.hotspot-target').data('hotspot')!=$this.attr('href')) {
        $('.hotspot-target').data('hotspot', $this.attr('href'));

        $('.hotspot-target').fadeOut(100, function() {
          $('.hotspot-target').css({backgroundImage: 'url('+$this.attr('href')+')'});
          $('.hotspot-target .detail').hide();
          $('.hotspot-target .detail.'+$this.attr('class')).show();

          $('.hotspot-target').fadeIn(100);
        });
      }
      return false;
    })
  });
</script>

It works fine in FF and Chrome with no errors in the console. I also can't see any errors in the IE debugger, though I'm not so used to how that works.

Is there anything obviously wrong with the above code? It's placed at the end of the page

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about internet-explorer