Skip to content

onClickExtend #28

Description

@Tchitchu

I'm using chrome(87.0.4280.88) but have tried firefox and edge

onClickExtend doesnt seem to do anything.

I am trying to allow onclick and onmousemove to reset timeout
the only way i was able to get the time out to reset onclick was to attach it to the $(document).on('click', function()
here is my testing code::

<title>jQuery Session Timeout Script</title>
<link rel='stylesheet' type='text/css' href='https://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css'>
<link rel="stylesheet" type="text/css" href="CSS/jAlert/dist/jAlert.css">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->

<script src='https://code.jquery.com/jquery-3.3.1.min.js'></script>
<script src='https://netdna.bootstrapcdn.com/bootstrap/3.0.3/js/bootstrap.min.js'></script>
<script src='https://htmlguyllc.github.io/jAlert/dist/jAlert.min.js'></script> <!--Needed -->
<script src='JS/jTimeout.js'></script>
<script> $(function(){ $(Document).on('click', function(){ $.jTimeout.reset(80); }); $.jTimeout({ timeoutAfter: 80, loginUrl: 'index.php', logoutUrl: 'index.php', extendOnMouseMove: true, });
                var timer,
  				setTimer = function(){
  					timer = window.setInterval(function(){
  						$('#secondsRemaining').val( $.jTimeout().getSecondsTillExpiration() );
  					}, 1000);
  				};

  				setTimer();

  			});

  		</script>

  </div>
	
</div>

any help would be appreciated

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions