简体   繁体   中英

jQuery and IE Rendering issue

I realise that IE is a bit rubbish at most things but I was hoping someone could come up with a way of fixing a display issue in IE when using jQuery.

on the following site, I have used jQuery on the menu to show and hide options (projects and contact)

http://www.isabelarbelaez.com

When these are clicked in IE, they show whatever is behind them for an instant, before loading up normally.

Basically, this looks crap! I was wondering if anyone could suggest a way to get past this? My code for the animation is as follows:

jQuery(document).ready(function($) {
  var timer;
  var display;

  $('li#contact').click(function() {
    clearTimeout(timer);
    $('ul.image_display').css('display', 'none');
    $('ul.projects').fadeOut().hide();
    $('li#cv').removeClass('cur');
    $('li#projects').removeClass('cur');
    $('li#contact').addClass('cur');
    $('ul.contact').fadeIn(function() {
      display = setTimeout( function() {
        $('ul.contact').fadeOut('slow');
      }, 8000);
    });
    timer = setTimeout(function() {
      $('li#contact').removeClass('cur');
      $('li#cv').addClass('cur');
    }, 8625);
  });

  $(function() {
    $('#projects').click(function() {
      clearTimeout(timer);
      $('li#cv').removeClass('cur');
      $(\"ul.contact\").fadeOut().hide();
      $('#contact').removeClass('cur');
      $('#projects').addClass('cur');
      $('ul.projects').fadeIn(function() {
        display = setTimeout( function() {
          $('ul.projects').fadeOut('slow');
        }, 8000);
      });
      timer = setTimeout(function() {
        $('li#projects').removeClass('cur');
        $('li#cv').addClass('cur');
      }, 8625); 
    });
  });

Try with this corrections:

$("ul.image_display li#image_hover img").attr("src", largeAlt ); 

and

$("ul.image_display li#image_hover img").attr("src", "" );

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM