[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-07 Thread Cesar Sanz


check this out http://plugins.jquery.com/project/timers

- Original Message - 
From: James james.gp@gmail.com

To: jQuery (English) jquery-en@googlegroups.com
Sent: Thursday, August 06, 2009 4:19 PM
Subject: [jQuery] Re: Make event happen after a certain amount of time has 
passed.




Then you can do something like this:

Have a setTimeout (say, executes in 20 seconds) with a callback
function, say moveToLocation.

Then you need a way to find out whether the div has been scrolled to
the certain location or not. That can be done by checking either for
the user's top/left coordinate of their screen, or you can set a
variable when the user clicks on that button.

After the 20 seconds comes by and the moveToLocation function is
called, it checks for that location (or some variable you set). If
it's true (meaning, the user has scrolled to the certain location),
then do nothing. Otherwise, do the auto-scroll.

The idea is that the moveToLocation is called no matter what. It's
just that whether you do the actual action or not depends on the state
of things.


On Aug 6, 12:09 pm, Simon Vansintjan svansint...@gmail.com wrote:

Well, it's pretty theoretical at the moment, so there's no code down, but
the idea would be that a div appears, and that the user can click on a
button that would scroll the div to a certain location. However, if the 
user
doesn't click, I would still want the div to move to that location (in 
case

he/she doesn't get it that it would move, dunno).



On Thu, Aug 6, 2009 at 6:03 PM, James james.gp@gmail.com wrote:

 Use the setTimeout/setInterval functions with some kind of global
 counter. If some kind of action/event occurs, the counter would be
 refreshed and the function would not execute.
 Would you like to specify in more detail what you would like to
 achieve?

 On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote:
  Hey,

  After a user hasn't triggered an event for a given amount of purple,
  would it be possible to trigger that event anyway?

  I have no idea how to even start looking for this.

  Thanks for any hints/ideas/whatever you can throw my way.

  Simon

--
simon.vansintjan.org 




[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-07 Thread Simon Vansintjan
That's a pretty neat plugin. Thanks Cesar.

On Fri, Aug 7, 2009 at 10:48 AM, Cesar Sanz the.email.tr...@gmail.comwrote:


 check this out http://plugins.jquery.com/project/timers

 - Original Message -
 From: James james.gp@gmail.com
 To: jQuery (English) jquery-en@googlegroups.com
 Sent: Thursday, August 06, 2009 4:19 PM
 Subject: [jQuery] Re: Make event happen after a certain amount of time has
 passed.



 Then you can do something like this:

 Have a setTimeout (say, executes in 20 seconds) with a callback
 function, say moveToLocation.

 Then you need a way to find out whether the div has been scrolled to
 the certain location or not. That can be done by checking either for
 the user's top/left coordinate of their screen, or you can set a
 variable when the user clicks on that button.

 After the 20 seconds comes by and the moveToLocation function is
 called, it checks for that location (or some variable you set). If
 it's true (meaning, the user has scrolled to the certain location),
 then do nothing. Otherwise, do the auto-scroll.

 The idea is that the moveToLocation is called no matter what. It's
 just that whether you do the actual action or not depends on the state
 of things.


 On Aug 6, 12:09 pm, Simon Vansintjan svansint...@gmail.com wrote:
  Well, it's pretty theoretical at the moment, so there's no code down, but
  the idea would be that a div appears, and that the user can click on a
  button that would scroll the div to a certain location. However, if the
  user
  doesn't click, I would still want the div to move to that location (in
  case
  he/she doesn't get it that it would move, dunno).
 
 
 
  On Thu, Aug 6, 2009 at 6:03 PM, James james.gp@gmail.com wrote:
 
   Use the setTimeout/setInterval functions with some kind of global
   counter. If some kind of action/event occurs, the counter would be
   refreshed and the function would not execute.
   Would you like to specify in more detail what you would like to
   achieve?
 
   On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote:
Hey,
 
After a user hasn't triggered an event for a given amount of purple,
would it be possible to trigger that event anyway?
 
I have no idea how to even start looking for this.
 
Thanks for any hints/ideas/whatever you can throw my way.
 
Simon
 
  --
  simon.vansintjan.org


 



-- 
simon.vansintjan.org


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread James

Use the setTimeout/setInterval functions with some kind of global
counter. If some kind of action/event occurs, the counter would be
refreshed and the function would not execute.
Would you like to specify in more detail what you would like to
achieve?

On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote:
 Hey,

 After a user hasn't triggered an event for a given amount of purple,
 would it be possible to trigger that event anyway?

 I have no idea how to even start looking for this.

 Thanks for any hints/ideas/whatever you can throw my way.

 Simon


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread Simon Vansintjan
Well, it's pretty theoretical at the moment, so there's no code down, but
the idea would be that a div appears, and that the user can click on a
button that would scroll the div to a certain location. However, if the user
doesn't click, I would still want the div to move to that location (in case
he/she doesn't get it that it would move, dunno).

On Thu, Aug 6, 2009 at 6:03 PM, James james.gp@gmail.com wrote:


 Use the setTimeout/setInterval functions with some kind of global
 counter. If some kind of action/event occurs, the counter would be
 refreshed and the function would not execute.
 Would you like to specify in more detail what you would like to
 achieve?

 On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote:
  Hey,
 
  After a user hasn't triggered an event for a given amount of purple,
  would it be possible to trigger that event anyway?
 
  I have no idea how to even start looking for this.
 
  Thanks for any hints/ideas/whatever you can throw my way.
 
  Simon
 



-- 
simon.vansintjan.org


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread James

Then you can do something like this:

Have a setTimeout (say, executes in 20 seconds) with a callback
function, say moveToLocation.

Then you need a way to find out whether the div has been scrolled to
the certain location or not. That can be done by checking either for
the user's top/left coordinate of their screen, or you can set a
variable when the user clicks on that button.

After the 20 seconds comes by and the moveToLocation function is
called, it checks for that location (or some variable you set). If
it's true (meaning, the user has scrolled to the certain location),
then do nothing. Otherwise, do the auto-scroll.

The idea is that the moveToLocation is called no matter what. It's
just that whether you do the actual action or not depends on the state
of things.


On Aug 6, 12:09 pm, Simon Vansintjan svansint...@gmail.com wrote:
 Well, it's pretty theoretical at the moment, so there's no code down, but
 the idea would be that a div appears, and that the user can click on a
 button that would scroll the div to a certain location. However, if the user
 doesn't click, I would still want the div to move to that location (in case
 he/she doesn't get it that it would move, dunno).



 On Thu, Aug 6, 2009 at 6:03 PM, James james.gp@gmail.com wrote:

  Use the setTimeout/setInterval functions with some kind of global
  counter. If some kind of action/event occurs, the counter would be
  refreshed and the function would not execute.
  Would you like to specify in more detail what you would like to
  achieve?

  On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote:
   Hey,

   After a user hasn't triggered an event for a given amount of purple,
   would it be possible to trigger that event anyway?

   I have no idea how to even start looking for this.

   Thanks for any hints/ideas/whatever you can throw my way.

   Simon

 --
 simon.vansintjan.org


[jQuery] Re: Make event happen after a certain amount of time has passed.

2009-08-06 Thread Simon Vansintjan
Alright, that's pretty much exactly what I had in mind, thanks a bunch.

On Thu, Aug 6, 2009 at 6:19 PM, James james.gp@gmail.com wrote:


 Then you can do something like this:

 Have a setTimeout (say, executes in 20 seconds) with a callback
 function, say moveToLocation.

 Then you need a way to find out whether the div has been scrolled to
 the certain location or not. That can be done by checking either for
 the user's top/left coordinate of their screen, or you can set a
 variable when the user clicks on that button.

 After the 20 seconds comes by and the moveToLocation function is
 called, it checks for that location (or some variable you set). If
 it's true (meaning, the user has scrolled to the certain location),
 then do nothing. Otherwise, do the auto-scroll.

 The idea is that the moveToLocation is called no matter what. It's
 just that whether you do the actual action or not depends on the state
 of things.


 On Aug 6, 12:09 pm, Simon Vansintjan svansint...@gmail.com wrote:
  Well, it's pretty theoretical at the moment, so there's no code down, but
  the idea would be that a div appears, and that the user can click on a
  button that would scroll the div to a certain location. However, if the
 user
  doesn't click, I would still want the div to move to that location (in
 case
  he/she doesn't get it that it would move, dunno).
 
 
 
  On Thu, Aug 6, 2009 at 6:03 PM, James james.gp@gmail.com wrote:
 
   Use the setTimeout/setInterval functions with some kind of global
   counter. If some kind of action/event occurs, the counter would be
   refreshed and the function would not execute.
   Would you like to specify in more detail what you would like to
   achieve?
 
   On Aug 6, 11:43 am, Simon svansint...@gmail.com wrote:
Hey,
 
After a user hasn't triggered an event for a given amount of purple,
would it be possible to trigger that event anyway?
 
I have no idea how to even start looking for this.
 
Thanks for any hints/ideas/whatever you can throw my way.
 
Simon
 
  --
  simon.vansintjan.org
 



-- 
simon.vansintjan.org