playSegments()
, который похож на то, что вам нужно. Попробуйте что-то типа:const half = [0, 150]; // [ первый кадр, средний кадр ]
if (this.showMobileMenu === true) {
burgerLottieIcon.setDirection(1);
burgerLottieIcon.playSegments(half, true);
} else {
burgerLottieIcon.setDirection(-1);
burgerLottieIcon.playSegments(half, true);
}
Array.prototype.amount = function() {
return this.reduce((a, i) => a + Number(i), 0);
}
let nums = 123123;
let arr = `${nums}`.split('');
const sum1 = arr.slice(0, 3).amount();
const sum2 = arr.slice(3, 6).amount();
if (sum1 == sum2) {
console.log('сумма первых цифр равняется остальным трём');
} else {
console.log('нет, не равняется');
}
$(function () {
$("#shipping_method_0_flat_rate25").on("change", function () {
if ($("#shipping_method_0_flat_rate25").prop("checked")) {
$("#ship-to-different-address-checkbox").attr("checked", true);
} else {
$("#ship-to-different-address-checkbox").removeAttr("checked");
}
});
});