[英]Problem with addeventlistener and turn js
I want to create a book that contains elements that appear, I have had problems in using an event that activates the fade every time the page is changed.我想创建一本包含出现的元素的书,我在使用每次更改页面时都会激活淡入淡出的事件时遇到问题。
<div id="flipbook">
<div id="pag1"> </div>
<div id="pag2"> </div>
</div>
<script type="text/javascript">
$("#flipbook").turn({
width: 1131,
height: 800,
autoCenter: true
});
</script>
<script>
var pag1 = document.getElementById('pag1')
pag1.addEventListener ('load', (function(){
/* function fade in */
})
)
</script>
使用 'onload' 而不是 'load' 作为事件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.