我使用我的網站上https://projects.lukehaas.me/scrollify/和我有麻煩禁用它的滾動功能後,我打開一個模式禁用部分滾動。我正在使用標準的onclick動作來打開模式,所以我可以在其中注入某些東西,但我不確定是什麼。Scrollify - 時態是開放
這是我Scrollify初始化:
jQuery.scrollify({
section : ".vc_section",
sectionName : "section-name",
interstitialSection : "",
easing: "easeOutExpo",
scrollSpeed: 2000,
offset : 0,
scrollbars: true,
standardScrollElements: "footer",
setHeights: true,
overflowScroll: true,
updateHash: false,
touchScroll: true,
before:function(i,panels) {
var ref = panels[i].attr("data-section-name");
if(ref === "first") {
jQuery("#hero-container").removeClass("hidden");
}
if(ref === "second") {
jQuery("#hero-container").addClass("hidden");
}
},
after:function() {},
afterResize:function() {},
afterRender:function() {}
});
然後,我通過一個簡單的onclick函數中調用一個模式:
jQuery('.schedule-visit-toggle, .schedule-visit-toggle a').on('click touchstart', function(evt) {
evt.stopPropagation();
evt.preventDefault();
jQuery('#schedule-visit-modal').foundation('open');
});
如果您在已經嘗試或已經擁有的內容上發佈了一些示例代碼,將會更容易 –
已更新我的問題 –