obj = {
a: 'first',
b: 2,
c: [ 'second', 3, {} ]
};
console.log( JSON.stringify( obj, null, 4 ) );
// {
// "a": "first",
// "b": 2,
// "c": [
// "second",
// 3,
// {}
// ]
// }
var classes = [ 'search', 'search_input', 'cancel_btn' ];
if ( classes.some(class_name => target.classList.includes( class_name )) ) {
cancelSearch();
}
HTMLElement.prototype.hasAnyOfClasses = function( classes ) {
return classes.some(class_name => this.classList.includes( class_name ))
}
if ( target.hasAnyOfClasses([ 'search', 'search_input', 'cancel_btn' ]) ) {
cancelSearch();
}
$(function() {
$(window).on("scroll resize", function() {
var o = $(window).scrollTop() / ($(document).height() - $(window).height());
$(".progress-bar").css({
"width": (100 * o | 0) + "%"
});
$('progress')[0].value = o;
})
});