- 1
jQuery( this ).parent().parent().parent().parent().parent().parent().parent().parent().find(".crate_bottle").html(product_crate_price_final);
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
jQuery( this ).parent().parent().parent().parent().parent().parent().parent().parent().find(".crate_bottle").html(product_crate_price_final);
0
eventRowsStyle() {
if (navigator.userAgent.toLowerCase().indexOf('firefox') > -1) {
return {
height: '187px'
}
} else {
return {
height: '187px'
}
}
}
Слишком много вопросов и мало ответов
0
handleShowScheduler() {
console.log(this.$parent.$parent.$parent.showScheduler, 'sch')
if (this.$parent.$parent.$parent.showScheduler) {
this.$parent.$parent.$parent.showScheduler = false;
setTimeout(() => {
this.$parent.$parent.$parent.showScheduler = true;
}, 200)
} else {
this.$parent.$parent.$parent.showScheduler = true;
}
},
0
const breakpointChecker = function() {
if ( breakpoint.matches === true ) {
//...
return;
} else if ( breakpoint.matches === false ) {
//...
}
};
Источник: https://medium.com/@networkaaron/swiper-how-to-destroy-swiper-on-min-width-breakpoints-a947491ddec8
0
class HelloRooster implements EditorPlugin {
getName() {
return 'HelloRooster';
}
initialize(editor: Editor) {}
dispose() {}
onPluginEvent(e: PluginEvent) {
if (e.eventType == PluginEventType.KeyPress && e.rawEvent.which == 65) {
alert('Hello Rooster');
}
}
}
https://github.com/microsoft/roosterjs
0
<img alt="[object Object]" title="[object Object]" loading="lazy">
https://beru.ru/catalog/avtotovary/76688?hid=90402 , когда смог в жс на бэкэнде
+1
Чем пакеты "npm" лучше старых добрых плагинов "jQuery"?
Плагины зависели только от самого "jQuery", а пакеты волокут за собою десятки и сотни левых говен.
−1
// https://habr.com/ru/company/ruvds/blog/515676/
Разбор худшего в мире куска кода.
−1
$(document).on('click','.head__loginw a',function() {
//реачгоал и гугл для клика по ссылке кабинете
return true;
})
$(document).on('click','.prc__it__bt openModal',function() {
id = $(this).attr('tid');
if(id == 387) {
//мир - 30
}
if(id == 388) {
//мир - 60
}
if(id == 389) {
//мир - 100
}
if(id == 391) {
//МИР-ДОМ-30
}
if(id == 392) {
//мМИР-ДОМ-60
}
if(id == 393) {
//мМИР-ДОМ-100
}
return true;
})
−1
updateTimer() {
requestAnimationFrame(() => {
this.timeLeft = this.resendTimeDuration - (Date.now() * 0.001 - this.lastTimeLeft);
if (this.timeLeft <= 0) {
this.resetTimer();
return;
} else {
this.lastTimeLeft = this.timeLeft;
this.updateTimer();
}
});
}
А как сделать таймер обратного отсчета?