Is it possible to detect \"idle\" time in JavaScript? My primary use case probably would be to pre-fetch or preload content.
Idle time:
I think this jquery code is perfect one , though copied and modified from above answers!! donot forgot to include jquery library in your file!