Will McLean is a designer and artist working in the Central Coast of NSW where he lives with his wife and 2 children.

Will is a meticulous developer and favours simplicity and clarity within his code. He can’t stand writing things twice so searches for any way to automate. His experiments can be found in the Exercises section of this site.

Will designs within systems. No project is too small for a design system. He favours the unusual, if not, how can he progress? You can read about his work in the Case Studies section of this site.

Updated: November 1, 2017

This is a Knowledge Base post.

Test if a user has interacted with your page using jquery

Here is some simple jQuery to test if a user has scrolled or clicked on your page.

var userHasInteracted = false;

var updateInteractionValue = function(){
    userHasInteracted = true;
    console.log( userHasInteracted );

$( 'body' ).click( updateInteractionValue );
$( window ).scroll( updateInteractionValue );

console.log( userHasInteracted );