0

I have script on button, which fadeIn dimming, load and place content, and fadeOut dimming:

$(document).on("click", "#Navigation area", function(){
    $('#loader').fadeTo(300, 1);
    $('#dimming').fadeTo(300, 1, function(){
        $("#choose-door").hide();
    });
    alert(1);
    var style = $(this).attr("class");
    $("#content").load("/style.html", function(r){
        alert(2);
        $(this).fadeIn();
        $("#dimming").css({"height":$("body").height()});
        loadDb(style);   
    });
    return false;
});

A normal browser(not IE) works fine, when alert(2) runs, dimming is visible. IE works fine just once, then dimming is show for one second, when content loaded(maybe it's run fadeOut, not fadeIn). When alert(2) runs in IE not first time, dimming is invisible.

f0rtis
  • 326
  • 2
  • 13
  • First of all - there is a syntax error in your on() function : the element selector "#Navigation area" has a space in it - there shouldn't be one. Try changing it to "#navigation-area" first. Also : could you make a fiddle ? HTML code would be nice – wick3d Jul 31 '14 at 10:15
  • @wick3d Sorry, too many code will need. It's big js application with xml and other stuff. Selector is correct, because i bind event to all area tags in div with id Navigation. – f0rtis Jul 31 '14 at 10:35
  • Ah! Sorry about that. I got completely confused about that selector ;] – wick3d Jul 31 '14 at 11:21

1 Answers1

0

I've searched around for a solution to your problem and the only thing that might be causing some problemws with the IE browser points to .load() function.

Try this possible solution and give feedback please.

jQuery's .load() not working in IE - but fine in Firefox, Chrome and Safari

Community
  • 1
  • 1
wick3d
  • 652
  • 6
  • 17