I've embedded fullpage.js in my page and on the sections which have scroll in it, Links, submit buttons and checkboxes doesn't seems to be working in it. I tried putting an alert on click of a link for testing
$('.project-image').click(function(){
alert('hola')
})
even this simple thing is not working and there is no error on console. it looks like something is preventing clicks.
答案 0 :(得分:0)
谢谢你们,我明白了。 删除switch case后:a.preventDefault();来自handleEvent:function(a)来自文件scrolloverflow.js所有链接现在都在工作。 我以前吓坏了,所以对于其他人我附上示例代码以供参考。
handleEvent: function(a) {
switch (a.type) {
case "touchstart":
case "pointerdown":
case "MSPointerDown":
case "mousedown":
this._start(a);
break;
case "touchmove":
case "pointermove":
case "MSPointerMove":
case "mousemove":
this._move(a);
break;
case "touchend":
case "pointerup":
case "MSPointerUp":
case "mouseup":
case "touchcancel":
case "pointercancel":
case "MSPointerCancel":
case "mousecancel":
this._end(a);
break;
case "orientationchange":
case "resize":
this._resize();
break;
case "transitionend":
case "webkitTransitionEnd":
case "oTransitionEnd":
case "MSTransitionEnd":
this._transitionEnd(a);
break;
case "wheel":
case "DOMMouseScroll":
case "mousewheel":
this._wheel(a);
break;
case "keydown":
this._key(a);
break;
case "click":
this.enabled && !a._constructed && (a.preventDefault(), a.stopPropagation())
}
}
只需删除最后一个案例“点击”