How to detect idle time in JavaScript elegantly?

前端 未结 30 2783
别跟我提以往
别跟我提以往 2020-11-21 11:51

Is it possible to detect \"idle\" time in JavaScript?
My primary use case probably would be to pre-fetch or preload content.

Idle time:

30条回答
  •  Happy的楠姐
    2020-11-21 12:36

     
    

    I think this jquery code is perfect one , though copied and modified from above answers!! donot forgot to include jquery library in your file!

提交回复
热议问题