document.querySelector(".mainslider_slider").scrollLeft = 0;
mySuperFunction1(ignoreCache, isReverse, removeEmpty, visible) { ... }
mySuperFunction2({ignoreCache, isReverse, removeEmpty, visible}) { ... }
mySuperFunction1(false, true, true, true);
mySuperFunction2({
ignoreCache: false,
isReverse: true,
removeEmpty: true,
visible: true
})
$emit(`name`, [arg1, arg2]);
@событие="metod(...$event)"
const randomLetters = {
q: true,
w: true,
e: true,
r: true,
t: true,
y: true,
};
const successAnswers = [];
document.onkeydown = function (e) {
const key = e.key.toLowerCase();
const latter = randomLetters[key];
if (latter === true) {
successAnswers.push(key);
delete randomLetters[key];
console.log(`randomLetters :>>`, randomLetters);
console.log(`successAnswers :>>`, successAnswers);
}
};
let breadcrumbs = [`site.com/catalog`, `site.com/catalog/sub-catalog`, `site.com/catalog/sub-catalog/item`];
let indexCurrent = breadcrumbs.indexOf(location.href);
let indexPrev = Math.max(0, indexCurrent - 1);
let prevURL = breadcrumbs[indexPrev];
location.href = prevURL;
<template>
<div class="parent">
<child-component ref="child" />
<button @click="$refs.child ? $refs.child.onClick($event) : ``">Ok</button>
</div>
</template>
export default {
name: `child-component`,
methods: {
onClick($event) {
console.log(`$event :>>`, $event);
}
}
}
transform: translate
body и меню, для меню position: fixed; right: - /*ширина нужная*/
+ во время открытия к body overflow: hidden
$reviewsGroupedNumbers
и прогоняем масcив из .csv используя в качестве ключа для объекта номер, пример:[+7 (111) 111-11-11, +7 (111) 111-11-11, +7 (111) 111-11-11].forEach(function( item ) {
if( !$reviewsGroupedNumbers[ item ] ) {
$reviewsGroupedNumbers[ item ] = [];
}
$reviewsGroupedNumbers[ item ].push({
countNumber: '...',
technicType: '...',
rating: '...'
});
});
$reviewsGroupedNumbers[ '+7 (111) 111-11-11' ].length;