gpt4 book ai didi

javascript - BlueImp Gallery - 如何停用滑动事件

转载 作者:行者123 更新时间:2023-12-01 03:49:23 35 4
gpt4 key购买 nike

我正在使用BlueImp Gallery (DEMO)。我需要在某些情况下锁定隐藏按钮,效果很好。但现在我还需要隐藏鼠标和触摸滑动。

说明:用户可以向左或向右滑动,这将改变当前图片。

我还无法找到负责的事件。如何停用滑动事件并再次激活它?这可能吗?

最佳答案

他们本来无意发布此功能,但它就在那里。

var galleryContext

// initalize your gallery
blueimp.Gallery([{/* your images */}], {

// we need the context of the gallery
onopened: function () {
galleryContext = this
}

})

// now disable
galleryContext.destroyEventListeners()

// or enable
galleryContext.initEventListeners()

关于javascript - BlueImp Gallery - 如何停用滑动事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43347343/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com