Permalink
Browse files

Committed a few small fixes

  • Loading branch information...
1 parent 92ffaa7 commit 2c78edf5d814967abbdbbcab8f62b8dea8e05076 @dcneiner dcneiner committed Jun 11, 2010
Showing with 5 additions and 17 deletions.
  1. +5 −5 jquery.idle.js
  2. +0 −12 readme.txt
View
10 jquery.idle.js
@@ -3,7 +3,7 @@
return this.each(function () {
var isidle = false,
hasMoved = false,
- lastMove = (new Date).getTime(),
+ lastMove = (new Date()).getTime(),
opts;
if ($.isPlainObject(onactive)) {
@@ -18,19 +18,19 @@
$(this).bind("mousemove", function () {
hasMoved = true;
- lastMove = (new Date).getTime();
+ lastMove = (new Date()).getTime();
if (isidle) {
onactive.call(this);
isidle = false;
}
});
- window.setInterval(function() {
- if ((new Date).getTime() - lastMove > opts.after) {
+ window.setInterval(function () {
+ if ((new Date()).getTime() - lastMove > opts.after) {
if (hasMoved) {
onidle.call(this);
}
- lastMove = (new Date).getTime();
+ lastMove = (new Date()).getTime();
isidle = true;
}
}, opts.interval);
View
12 readme.txt
@@ -1,12 +0,0 @@
-Stupid simple example
-$(document).ready(function() {
-
- $("#content").idle(
- function() {
- $("#content").fadeTo("slow",.1);
- },
- function() {
- $("#content").fadeTo("fast",1);
- }
- );
-});

0 comments on commit 2c78edf

Please sign in to comment.