WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

onClickExtend #28

@Tchitchu

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

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