let submit = $("[data-submit]");
submit.on("click", function () {
let roomSearch = parseInt($("#rooms").val());
let floor = parseInt($("#floors").val());
$("[data-room][data-floor]").each(function () {
let roomHave = $(this).data("room");
let floorsHave = $(this).data("floor");
if (roomHave !== roomSearch && floorsHave !== floor) {
$(this).addClass("hide");
} else $(this).removeClass("hide");
});
});
Car.prototype.moveRight = function (dx) {
this.x += 5;
if (this.x < dx) {
setTimeout(() => this.moveRight(dx), 16);
} else {
this.x = dx;
}
this.carElement.css({
left: this.x,
top: this.y
});
};
var nissan = new Car(100, 200);
nissan.moveRight(500);
let out = [];
for (let i = 0, j = 10; i <= 10; i++, j--) {
out.push(i, j);
}
console.log(out.join(' '));
const min = +oneType.getAttribute('min');
const max = +oneType.getAttribute('max');
nOne = (oneType.value - min) * 100 / (max - min);
remove = (event) => {
const path = event.composedPath();
this.mestoApi.deleteCard(this.cardData._id)
.then(() => {
console.log(path);
this.placeCardLikeIcon.removeEventListener('click', this.like);
this.placeCardDeleteIcon.removeEventListener('click', this.remove);
this.placeCard.remove();
})
.catch(err => console.log(`Ошибка: ${err}`))
};