<meta name="keywords" content=" текст ">
document.addEventListener('touchstart', handleTouchStart, false);
document.addEventListener('touchmove', handleTouchMove, false);
var xDown = null;
var yDown = null;
function getTouches(evt) {
return evt.touches ||
evt.originalEvent.touches;
}
function handleTouchStart(evt) {
const firstTouch = getTouches(evt)[0];
xDown = firstTouch.clientX;
yDown = firstTouch.clientY;
};
function handleTouchMove(evt) {
if ( ! xDown || ! yDown ) {
return;
}
var xUp = evt.touches[0].clientX;
var yUp = evt.touches[0].clientY;
var xDiff = xDown - xUp;
var yDiff = yDown - yUp;
if ( Math.abs( xDiff ) > Math.abs( yDiff ) ) {
if ( xDiff > 0 ) {
{location.href="http://dev2.yourstartup.by/odezhda-hrmz/bryuki";}
} else {
{location.href="http://dev2.yourstartup.by/odezhda-hrmz/bryuki";}
}
}
xDown = null;
yDown = null;
};
<fieldset id="mse2_ms|price">
<legend>Цена</legend>
<div class="range mse2_number_inputs ">
Дипозон :
<span class="min_val">25</span> -
<span class="max_val">40</span>
<label for="mse2_ms|price_0" class="d-flex align-items-center">
<input type="hidden" class="price_0" name="cena" id="mse2_ms|price_0" value="28" data-current-value="25" data-decimal="0">
</label>
<label for="mse2_ms|price_1" class="d-flex align-items-center">
<input type="hidden" class="price_1" name="cena" id="mse2_ms|price_1" value="37" data-current-value="40" data-decimal="0">
</label> </div>
<div class="mse2_number_slider ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all"><div class="ui-slider-range ui-widget-header ui-corner-all" style="left: 20%; width: 60%;"></div><span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 20%;"></span><span class="ui-slider-handle ui-state-default ui-corner-all" tabindex="0" style="left: 80%;"></span></div>
</fieldset>
$(".price_0").keyup_min(function () {
var value = $(this).val();
$(".min_val").text(value);
}).keyup();
$("price_1").keyup_max(function () {
var value = $(this).val();
$(".max_val").text(value);
}).keyup();