I haven't worked with jQuery that long but i'm not understanding your logic. The lastAjaxCall variable is set twice in your code above which seems weird. Also how will your code track the lastAjaxCall if the variable is constantly being updated before the condition statement for making the ajax call? I need to track two variables for my script to work. When was the last activity on the page and when was the last ajax call. I did notice though that I forgot to reset to my activity counter when an ajax call is made. That was if there hasn't been any activity before the ajaxLimiter option it won't perform another ajax call.

```
			if (opts.refreshOnClick) {
				_pe.document.on('click', function (e) {

					// If there is a click on the page
					if (lastActivity >= 1 && (getCurrentTimeMs() - lastAjaxCall) > opts.ajaxLimiter) {
						if (typeof e.button === 'undefined' || e.button === _pe.leftMouseButton) { // Ignore middle/right mouse buttons
							// Set the time of the last ajax call
							lastAjaxCall = getCurrentTimeMs();
							// Reset the activity counter
							lastActivity = 0;
							start_liveTimeout();
						}
					} else {
						if (typeof e.button === 'undefined' || e.button === _pe.leftMouseButton) {
							lastActivity = getCurrentTimeMs();
						}
					}// END OF if (lastActivity >= 1 && ...
				});
			}
```