The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

Possible JavaScript Question?

  • # May 2, 2013 at 4:38 pm

    Is there a way in JavaScript to have it change the page if the user hasn’t moved there mouse in 2 minutes?

    # May 2, 2013 at 4:58 pm

    This reply has been reported for inappropriate content.

    Sure. But it seems like a really bad idea. Can you give us a little more context?

    # May 2, 2013 at 5:23 pm

    Here’s an image of a website i’m making the client wants it so when the user clicks on the boxes it would change content and it would also change if the user doesn’t move their mouse… I’m using the Kentico CMS… not my choice. Could you point me to an example site so maybe I can mimic/ use the jQuery or JavaScript? Thanks Guys!

    # May 2, 2013 at 5:26 pm

    Some pseudo code to help you along.

    1.) Create a counter that counts to 119 seconds.
    2.) Reset counter if mouse move event is fired.
    -- or --
    2.) Reset counter if x or y has changed.
    3.) Once counter reaches target time redirect page.

    If you are dealing with log in times, shopping carts, etc you may want to deal with your server side stuff (sessions etc). Always remember, i can disable JS :)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed