更新时间:2023-10-30 16:33:28
默认情况下,元素禁用Touchswipe。
Touchswipe is disabled by default for a elements.
请参见 http://labs.rampinteractive.co.uk/touchSwipe/demos/Excluded_children.html
来自链接:
默认情况下,$。fn.swipe.defaults.excludedElements的值为按钮,输入,选择,textarea,a,.noSwipe ,要替换或清除列表,请重新设置excludeElements数组。作为补充,请执行以下操作(不要忘记开头的逗号)...
From the link: By default the value of $.fn.swipe.defaults.excludedElements is "button, input, select, textarea, a, .noSwipe, " To replace or clear the list, re set the excludedElements array. To append to it, do the following (dont forget the proceeding comma) ...
excludedElements:$.fn.swipe.defaults.excludedElements+", #some_other_div" });
我最终只是更改了插件中的默认设置,因为我所有的模态都是锚元素的子代。
I ended up just changing the defaults in the plugin, since all my modals were children of an anchor element.
excludedElements:"button, input, select, textarea, .noSwipe"