$( "#slider" ).slider({
animate: true,
range: "min",
value: 50,
min: 100,
max: 1000,
step: 50,
slide: function( event, ui ) {
$( "#slider-result" ).html( ui.value );
},
change: function(event, ui) {
$('#hidden').attr('value', ui.value);
$('.item-cost').each(function(index) {
if (ui.value > $(this).text() ){
$(this).parent().parent().parent().parent().parent().fadeOut();
} else {
$(this).parent().parent().parent().parent().parent().fadeIn();
}
});
}
});
</script>
<script>
$(document).on('change', '#choose', function (e) {
var valueSelected = this.value;
var providerSelected = $('#provider_select').val();
if (valueSelected !== "Все") {
if (providerSelected == 'Все провайдеры') {
$(`.taryf-filter[data-choise="${valueSelected}"]`).fadeIn();
$(`.taryf-filter[data-choise!="${valueSelected}"]`).fadeOut();
}
else {
$(`.taryf-filter[data-choise="${valueSelected}"]`).fadeIn();
$(`.taryf-filter[data-choise!="${valueSelected}"]`).fadeOut();
$(`.taryf-filter[data-provider!="${providerSelected}"]`).hide();
}
}
else {
$('.taryf-filter').fadeIn();
}
});
$(document).on('change', '#provider_select', function (e) {
var proselect = this.value;
var valueSelected = $('#choose').val();
if (proselect == 'Все провайдеры') {
$('.taryf-filter').fadeIn();
}
else {
if (valueSelected == 'Все') {
$(`.taryf-filter[data-provider="${proselect}"]`).fadeIn();
$(`.taryf-filter[data-provider!="${proselect}"]`).fadeOut();
}
else {
$(`.taryf-filter[data-provider="${proselect}"]`).fadeIn();
$(`.taryf-filter[data-provider!="${proselect}"]`).fadeOut();
$(`.taryf-filter[data-choise!="${valueSelected}"]`).hide();
}
}
});
</script>
`.taryf-filter[data-choise="${valueSelected}"]`
$(this).parent().parent().parent().parent().parent().fadeIn();
$(this).closest(".myClass").fadeIn();
$(`.taryf-filter[data-provider!="${proselect}"]`).fadeOut();
$(`.taryf-filter:not([data-....]`).fadeIn(); //хотел исправить всё, но кол-во ошибок победило
...