0

このサイトにプリローダーがあります: http://exit.santamartastudio.es/で、プリローダーが非表示になる場合とそうでない場合があります。私はそれを探しましたが、なぜ失敗したのかわかりません。

更新(ここにコードがあります):

$(document).ready(function(){
  setLoader();
  Here I load the rest of jquery
});



$(window).load(function () {
  hideloader();
});

機能:

// Setloader
function setLoader() {
  disable_scroll();
  $('body').css('overflow', 'hidden');
}
// Hideloader
function hideLoader() {
  var windowWidth = $(window).width(); //retrieve current window width

  $('#loader img').animate({
    left: '+=' + ((windowWidth/2) + 100)
  }, 1000, 'easeOutExpo');

  $('#loader span').animate({
    left: '-=' + ((windowWidth/2) + 100)
  }, 1000, 'easeOutExpo');
  setTimeout(function () {
    $('#loader').fadeOut(800, 'linear', function(){
      enable_scroll();
      $('body').css('overflow', 'visible');
      $(this).hide();
    });
  }, 200);
}
4

1 に答える 1