animsition插件继续预加载

时间:2016-11-11 13:45:39

标签: javascript jquery html animation animsition

我今天开始使用animsition,一开始看起来很简单。但是,当我在我的html代码中使用它时,animsition将无法正常工作并继续预加载。

Html正文

<div class="panel1">
  <div class="tex">text</div><div class="t">t</div>
  <div class="animsition head">
    <h2>Something</h2>
  </div>
</div>

JS

$(".animsition").animsition({
inClass: 'fade-in-up',
outClass: 'fade-out-up',
inDuration: 1500,
outDuration: 800,
linkElement: '.animsition-link',
// e.g. linkElement: 'a:not([target="_blank"]):not([href^="#"])'
loading: true,
loadingParentElement: 'body', //animsition wrapper element
loadingClass: 'animsition-loading',
loadingInner: '', // e.g '<img src="loading.svg" />'
timeout: false,
timeoutCountdown: 5000,
onLoadEvent: true,
browser: [ 'animation-duration', '-webkit-animation-duration'],
// "browser" option allows you to disable the "animsition" in case the css property in the array is not supported by your browser.
// The default setting is to disable the "animsition" in a browser that does not support "animation-duration".
overlay : false,
overlayClass : 'animsition-overlay-slide',
overlayParentElement : 'body',
transition: function(url){ window.location.href = url; }
});

浏览器显示一个永不完成加载的预加载器。

1 个答案:

答案 0 :(得分:2)

发现它! Animsition不适用于最新版本的jquery(3.1.1)。所以要小心,使用animsition。