Hello! There is such a link:
<a href="javascript:void(0)" onclick="showHide('block_id')">Скрыть/Показать элемент</a> Do you need to make two clicks on JS after a specified time?
Скрыть/Показать элемент...">
Hello! There is such a link:
<a href="javascript:void(0)" onclick="showHide('block_id')">Скрыть/Показать элемент</a> Do you need to make two clicks on JS after a specified time?
As I understand it, you need something onclick. Well, or as noted in the comments it is better to add with addEventListener
setTimeout(function () { for(let i=0;i<2;i++) showHide('block_id') }, TIMEOUT) But if you need to make two clicks at intervals of time, then maybe you are solving a slightly wrong problem. Maybe it needs to be done differently at the root.
Source: https://ru.stackoverflow.com/questions/771599/
All Articles
setTimeout()andaddEventListener(). - LFC