if (Date.now() > session.date) {
session.isRedirect = false;
session.unanswered = [];
}
function onScroll() {
var scroll_top = $(document).scrollTop();
$(menu_selector + " a").each(function(){
var hash = $(this).attr("href");
var target = $(hash);
if (target.position().top <= scroll_top && target.position().top + target.outerHeight() > scroll_top) {
$(menu_selector + " a.active").removeClass("active");
$(this).addClass("active");
$(this).trigger('hover'); // <= Add
} else {
$(this).removeClass("active");
}
});
}
$('.block').on('click', function() {
$(this).find('.item').show();
});
let entity = 'object.foo.bar.test.prop',
value = 'someProp123',
data;
let obj = entity
.split('.')
.reverse()
.forEach(key => {
data = [];
data[key] = value;
value = data;
})