If the element which supports keyboard input (such as an input element, or any other element that would triggers a virtual keyboard to be shown on focus if a physical keyboard were not present), indicate focus.
$(document).on("touchmove", carditem_s3, function(e) { ... });
$(document).bind('touchend', function() { ... });
То есть, привязка обработчика touchend выполняется ко всему документу, без каких либо ограничений. - let text = `{"content":"<svg width=\"133\" height=\"510\" viewBox=\"0 0 133 510\">"}`
+ let text = '{"content":"<svg width=\\"133\\" height=\\"510\\" viewBox=\\"0 0 133 510\\">"}'
console.log(JSON.stringify({content: '<svg width="133" height="510" viewBox="0 0 133 510">'}))
// '{"content":"<svg width=\\"133\\" height=\\"510\\" viewBox=\\"0 0 133 510\\">"}'
Как написано в описании циклов, с await может работать только for ofВ каком описании? С await прекрасно работает классический for.
function sleep(delayms) {
return new Promise((resolve) => setTimeout(() => resolve(), delayms));
}
async function foo() {
for (i = 0; i < 10; i += 1) {
await sleep(1000);
console.log(i);
}
return 'done';
}
await foo();
// 0
// 1
// ...
// 9
// "done"
let response;
$(document).ajaxSuccess(function(e, xhr, settings) {
response = xhr.responseJSON
});