我试图禁用点击'Spreader'按钮。似乎无法阻止它关闭。我有一个想要保留的onmousedown事件,但我不想关闭吊具。有人知道禁用点击吊具的最佳方法吗?
答案 0 :(得分:0)
您可以设置minPercent属性以满足您的需求。
var wheel;
window.onload = function () {
wheel = new wheelnav("wheelDiv");
wheel.spreaderEnable = true;
wheel.createWheel(["This", "is", "custom", "spreader"]);
wheel.spreadWheel();
var wheelspreader = document.getElementById("wheelnav-wheelDiv-spreader");
var wheelspreadertitle = document.getElementById("wheelnav-wheelDiv-spreadertitle");
wheelspreader.onmousedown = function() {openSpreader();}
wheelspreadertitle.onmousedown = function() {openSpreader();}
};
var openSpreader = function() {
wheel.minPercent = wheel.maxPercent;
}
这是JS Bin。