嗨我有這種代碼可以提供類型書寫效果。但是thigs是我想要動畫只有當用戶向下滾動到這個div時才能運行。你們能幫忙嗎?由於當達到特定分區時啓動jquery動畫
<script>
\t
$(function(){
$("#typed").typed({
strings: ["oru exp", "Oru expertise", '"Our expertise Graphic Designer will create the template based \n on your company activity and will provide with a proffesional \n and ergonic design to your website."'],
typeSpeed: 30,
backDelay: 500,
loop: false,
// defaults to false for infinite loop
loopCount: false,
callback: function(){ foo(); },
resetCallback: function() { newTyped(); }
});
$(".reset").click(function(){
$("#typed").typed('reset');
});
});
function newTyped(){ /* A new typed object */ }
function foo(){ console.log("Callback"); }
</script>
這裏是HTML:有關獲取一定的高度,然後播放動畫
<div class="wrap">
<div class="type-wrap">
<span id="typed" style="white-space:pre;"></span>
</div>
</div>
請發佈html也 – doniyor 2014-10-12 06:22:28
非常感謝。所以你有任何想法如何做到這一點? – ggguu 2014-10-12 06:32:07
你有沒有你不想要的工作例子? – doniyor 2014-10-12 06:36:52