-2
我有一個jquery函數,我需要延遲1秒。 我在這裏搜索了,我需要使用settimeout函數,我不知道如何把它放在jQuery中。jquery - settimeout
這裏是我的代碼:
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('.animacao').addClass("hidden").viewportChecker({
classToAdd: 'visible animated fadeInDown', // Class to add to the elements when they are visible
offset: 100
});
});
</script>
有人可以幫助我,好嗎?
耽誤代碼你想添加一個延遲到被添加每次的元素出現在視口中類?如果是這樣,那就必須通過修改插件來完成。 – adeneo 2015-01-09 19:28:03
你使用了SetTimeout嗎?此頁面有一些示例http://www.sitepoint.com/settimeout-example/ – ryanyuyu 2015-01-09 19:31:27