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: Monday, August 17, 2009 1:35 PM
Subject: [jQuery] Re: Timeout
http://www.w3schools.com/js/js_timing.asp
Depending
http://www.w3schools.com/js/js_timing.asp
Depending on how you define inactive (e.g. no mouse movement, no
keypress, etc.) you can have such events trigger a clear timeout to
clear any existing timeout, and add a new 20 second timeout. This you
can use jQuery for to help make things easier.
jQuery is JavaScript!
Use the regular JavaScript sintax
Maurício
-Mensagem Original-
De: shaf
Para: jQuery (English)
Enviada em: sábado, 15 de agosto de 2009 17:36
Assunto: [jQuery] Timeout
Hi Guys
How do I set a timeout in jquery ? E.g. if a page is inactive for 20
setTimeout(Run, 1);
function Run() {
$.ajax(..)
}
On Mar 31, 11:18 am, Elledinho elledi...@gmail.com wrote:
Hi guys.
Can you tell me how to make a ajax-script witch is running in the
background?
I want a script witch reloads a .php-file every 10th second.
How can I do this?
Oops.. pressed enter too early
$(document).ready(function() {
setTimeout(Run, 1);
});
function Run() {
$.ajax(
.
success: function() {
setTimeout(Run, 1);
}
);
}
On Mar 31, 12:39 pm, MorningZ morni...@gmail.com wrote:
Just a little fix. Use setInterval() instead of setTimeout().
setTimeout() only executes once.
I get that mixed up sometimes too. :p
On Mar 31, 6:41 am, MorningZ morni...@gmail.com wrote:
Oops.. pressed enter too early
$(document).ready(function() {
setTimeout(Run, 1);
});
In his code the timeout is called again in the callback. For this
application it really doesn't matter which one you use.
setInterval(function(){
$.ajax({...});
}, 1);
On Mar 31, 3:44 pm, James james.gp@gmail.com wrote:
Just a little fix. Use setInterval() instead of setTimeout().
just had the same problem... here is how i would suggest you fix it.
jQuery.noConflict();
jQuery(document).ready( function($) {
$(#main-menu ul.menu li)
.mouseover( function() {
$(this).children(ul).css(display,block);
})
I think I've managed to do that.
While aborting request I do:
if (req){
req.abort();
req.is_aborted=true;
req=null;
}
and in error_handler:
error_handler:function(xhr, textStatus, errorThrown){
if (textStatus=='timeout' (!xhr || xhr.is_aborted)){
return true;
.mouseout( function() {
setTimeout('$
(this).children(ul).css(display,none);', 500);
Another option that works better instead of using getTimeout and such
in jQuery is to use animate(callback) on an already visible
element...
ex:
.mouseout(function(){
This would delay hiding for half a second
.mouseout( function() {
setTimeout('$
(this).children(ul).css(display,none);', 500);
});
For this sort of thing, I strongly recommend the hoverIntent plugin:
http://cherne.net/brian/resources/jquery.hoverIntent.html
--Karl
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Sep 10, 2008, at 10:59 AM, RichUncleSkeleton wrote:
I've made a drop-down menu
12 matches
Mail list logo