Gamegenic
Sortierung
Filter
Preis
€
―
€
"use strict";
var keypressSlider = document.querySelector(".slider-keypress");
var input0 = document.querySelector(".input-with-keypress-0");
var input1 = document.querySelector(".input-with-keypress-1");
var inputs = [input0, input1];
noUiSlider.create(keypressSlider, {
start: [3.5, 65],
connect: true,
range: {
min: [3.5],
max: [65]
}
});
keypressSlider.noUiSlider.on("update", function(values, handle) {
inputs[handle].value = values[handle];
function setSliderHandle(i, value) {
var r = [null, null];
r[i] = value;
keypressSlider.noUiSlider.set(r);
}
inputs.forEach(function(input, handle) {
input.addEventListener("change", function() {
setSliderHandle(handle, this.value);
});
input.addEventListener("keydown", function(e) {
var values = keypressSlider.noUiSlider.get();
var value = Number(values[handle]);
var steps = keypressSlider.noUiSlider.steps();
var step = steps[handle];
var position;
switch (e.which) {
case 13: setSliderHandle(handle, this.value); break;
case 38: position = step[1]; if (position === false) { position = 1; } if (position !== null) {setSliderHandle(handle, value + position); } break;
case 40: position = step[0]; if (position === false) { position = 1; } if (position !== null) { setSliderHandle(handle, value - position); } break;
}
});
});
});
Verfügbarkeit
Hersteller
Sprache
Kategorien
Kategorien
- Gamegenic 50 Matte Tarot Card Game Sleeves 73x122mm Clear / Orange3,90 EUR ** inkl. MwSt. zzgl. Versand
- Star Wars Unlimited Art Sleeves Double Sleeving Pack Space Red9,50 EUR ** inkl. MwSt. zzgl. Versand
- Star Wars Unlimited Art Sleeves Double Sleeving Pack Space Blue9,50 EUR ** inkl. MwSt. zzgl. Versand
- Star Wars Unlimited Art Sleeves Double Sleeving Pack Luke Skywalker9,50 EUR ** inkl. MwSt. zzgl. Versand
- Star Wars Unlimited Art Sleeves Double Sleeving Pack Darth Vader9,50 EUR ** inkl. MwSt. zzgl. Versand
- Gamegenic 50 Matte Mini European Sized Boardgame Sleeves 46x71mm Clear / Ruby3,50 EUR ** inkl. MwSt. zzgl. Versand
- Gamegenic 50 Matte Big Square Board Game Sleeves 82x82mm Clear / Lime3,50 EUR ** inkl. MwSt. zzgl. Versand
- Gamegenic 50 Matte Standard American Sized Boardgame Sleeves 59x91mm Clear / Green3,50 EUR ** inkl. MwSt. zzgl. Versand
- Gamegenic 50 Matte Mini American Sized Boardgame Sleeves 44x67mm Clear / Yellow3,50 EUR ** inkl. MwSt. zzgl. Versand
- Gamegenic 50 Matte Standard European Sized Sleeves 62x94mm Clear / Purple3,50 EUR ** inkl. MwSt. zzgl. Versand
- Gamegenic 90 Matte Dixit / Mysterium Board Game Sleeves 81x122mm Clear / Sand5,25 EUR ** inkl. MwSt. zzgl. Versand
- Gamegenic 50 Matte Standard Card Game Sleeves 66x91mm Clear / Gray3,50 EUR ** inkl. MwSt. zzgl. Versand
Preis
€
―
€
"use strict";
var keypressSlider = document.querySelector(".slider-keypress");
var input0 = document.querySelector(".input-with-keypress-0");
var input1 = document.querySelector(".input-with-keypress-1");
var inputs = [input0, input1];
noUiSlider.create(keypressSlider, {
start: [3.5, 65],
connect: true,
range: {
min: [3.5],
max: [65]
}
});
keypressSlider.noUiSlider.on("update", function(values, handle) {
inputs[handle].value = values[handle];
function setSliderHandle(i, value) {
var r = [null, null];
r[i] = value;
keypressSlider.noUiSlider.set(r);
}
inputs.forEach(function(input, handle) {
input.addEventListener("change", function() {
setSliderHandle(handle, this.value);
});
input.addEventListener("keydown", function(e) {
var values = keypressSlider.noUiSlider.get();
var value = Number(values[handle]);
var steps = keypressSlider.noUiSlider.steps();
var step = steps[handle];
var position;
switch (e.which) {
case 13: setSliderHandle(handle, this.value); break;
case 38: position = step[1]; if (position === false) { position = 1; } if (position !== null) {setSliderHandle(handle, value + position); } break;
case 40: position = step[0]; if (position === false) { position = 1; } if (position !== null) { setSliderHandle(handle, value - position); } break;
}
});
});
});