$(document).on('click', '#btn', function(e) {
store.search({
term: $('#input').val(),
num: 1,
page: 1,
country : 'us',
lang: 'lang'
})
.then(response => {
fs.writeFileSync('file.json', JSON.stringify(response));
})
.catch(err => {
fs.writeFileSync('file.json', JSON.stringify(err));
});
});
function cdpause() {
// pauses countdown
clearTimeout(t);
clearInterval(interval);
};
function countdown() {
// starts countdown
cddisplay();
if (count == 0) {
// time is up
} else {
count--;
t = setTimeout("countdown()", 1000);
}
};
$("#id[pressed = 'false']").on('click'
$("#id[pressed = 'true']").on('click'
$(document).on('click', "#id[pressed = 'true']", function(){
$(document).on('click', "#id[pressed = 'false']", function(){
<script>
jQuery(document).ready(function() {
jQuery('#shop-basket a').on('click', function() {
var a = jQuery(this);
var b = a.attr('href');
window.location = b;
});
});
</script>
$(".accordion-titulo").click(function(e) {
e.preventDefault();
$(".accordion-titulo").removeClass("open");
$(".accordion-content").slideUp(350);
var contenido = $(this).next(".accordion-content");
contenido.slideDown(350);
$(this).addClass("open");
});
if( width !=width2 && height !=height2 ){
...
}
setInterval(function(){
$("#some-container").load("schedule.php #some");
}, 2000);
<div id="some-container"></div>