S
S
Sergey Kondrashevsky2020-02-19 14:15:39
JavaScript
Sergey Kondrashevsky, 2020-02-19 14:15:39

Input is blocked while the previous one is not active?

Hello!

let adapt = "Адаптировать сайт под смартфоны и планшеты?";
let mobileTemplates = "Нужно ли разрабатывать дизайн сайта под мобильные устройства?";


I have two inputs. The first one is called => adapt if this input is not active, then the second input called => mobileTemplates should be disabled => disabled. And if the input adapt is active, then the input mobileTemplates will be unlocked and can be selected.
Please help

If the wording seemed to someone not reasonable, I apologize!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Spirin, 2019-06-20
@FaTaLcheG

we are basically delivering the same thing.

You are wrong.
Add a console.log() call and see the output
function delay(func, delayTime){
  return function(){
    var savedThis = this;
    var savedArgs = arguments;
    setTimeout(function(){
      console.log(savedThis, this, savedArgs, arguments);  // <---
      func.apply(this, arguments);
    }, delayTime);
  }
}

A different set of arguments is used. A context depending on the mode .

M
Maxim Cheryabushkin, 2020-02-19
@Seryoga96

https://codepen.io/MCheryabushkin/pen/yLNJdpW?edit...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question