let arr = [1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3];
var seed = 12837823631;
arr = arr.sort((a,b)=>rand() - rand());
function rand(){
seed = (45 * seed + 21) % 67;
return seed/67;
}
let arr = ["genre","type","long","country","awards","result","actor"];
arr.forEach((c)=>{
document.querySelector(`#category-${c}`).addEventListener('click', () => {
document.querySelector(`#subcategory-block-${c}`).classList.toggle('active');
document.querySelector(`#menu-figure-${c}`).classList.toggle('activeForMenuFigure');
})
});
var time = "10:25";
var duration = 1232 ;
const hour = Math.floor(duration / 60);
const min = duration - hour * 60;
let hs = parseInt(time.split(":")[0]);
let ms = parseInt(time.split(":")[1]);
let he = (hs + hour + Math.floor((min+ms)/60))%24;
let me = (min+ms)%60;
alert(`${hour}:${min} - ${he}:${me}`)
function checkParams() {
var name = $('#name').val();
var email = $('#email').val();
var phone = $('#phone').val();
if(name.length != 0 && email.length != 0 && phone.length != 0 && $('#personaldata').prop("checked") && ($('#cakecheck').prop("checked") || $('#drinkcheck').prop("checked")))
$('#submit').removeAttr('disabled');
else
$('#submit').attr('disabled', 'disabled');
}
function addProductView(id){
let lastProducts = [];
try{
lastProducts = localStorage.getItem("last_products");
if(lastProducts == null)
lastProducts = [];
else
lastProducts = JSON.parse(lastProducts);
}catch(e){
lastProducts = [];
}
lastProducts = lastProducts.filter(e=>e.id !=id);
lastProducts.push({
date:Date.now(),
id:id
});
localStorage.setItem("last_products",JSON.stringify(lastProducts.sort((c,n)=>n.date - c.date).splice(0,20)));
}
function getLastViews(){
let lastProducts = [];
try{
lastProducts = localStorage.getItem("last_products");
if(lastProducts == null)
lastProducts = [];
else
lastProducts = JSON.parse(lastProducts);
}catch(e){
lastProducts = [];
}
return lastProducts.sort((c,n)=>n.date - c.date).map(e=>e.id);
}
$('.lft-close').on('click', function(){
filterShow.bind(this)();
});
$('.lft-close').on('click', function(){
filterShow.apply(this)
});
$('.lft-close').on('click', function(){
filterShow.call(this)
});
previewsContainer
default: null
Defines where to display the file previews – if null the Dropzone element itself is used. Can be a plain HTMLElement or a CSS selector. The element should have the dropzone-previews class so the previews are displayed properly.