Hi!
Sorry to hop in this topic but it's always easier than creating a new
one :)
My problem is that I have a dropdown list, but the child list (li >
ul) is not exactly below the parent.
So when I leave the parent to hover the child, it disappears before I
have the chance.
This is not something I
I will reformate the code myself but thx. And a really big thx for
helping me it´s working. You saved my day ... really.
thx :)
On 17 Dez., 22:21, Michael Geary wrote:
> p.s. If there are extra blank lines in my code samples, those aren't
> intentional (especially not that one in the middle of
p.s. If there are extra blank lines in my code samples, those aren't
intentional (especially not that one in the middle of the chain). Gmail is
adding those for some reason!
On Thu, Dec 17, 2009 at 1:19 PM, Michael Geary wrote:
> I'm sorry, I should have spotted the major bug in the code that I
I'm sorry, I should have spotted the major bug in the code that I posted.
In fact, it's particularly embarrassing, because I wrote a recipe for the
jQuery Cookbook [1] on this exact topic. It's recipe 5.2, "What's Wrong with
$(this)?"
Inside the setTimeout callback function, "this" does not have
thx for the quick answer, but this way i´ve tried it too. I have
copied your code and test it too but it just don´t work.
The function is called an a alert for example makes it output but the
important code is not running like this.
On 17 Dez., 18:21, Michael Geary wrote:
> You are calling the l
have you tried placing your jquery code into a new function and
calling that function in setTimeout ?
On Nov 4, 2:27 pm, north wrote:
> Hi,
>
> I'm trying to use a jQuery statement inside a setTimeout function, but
> I don't get it to work. I tried a lot of variants, like this one (I'm
> using 't
Thanks a lot for you answer, Michel.
I have already switched to using a function within setTimeout, but I
found my problem lies elsewhere. I might open a new thread with a
better fitting title for this.
On 4 Nov., 14:06, Michel Belleville
wrote:
> I'd use an anonymous function and pass it to set
excellent. thanks very much.
On Aug 31, 8:24 am, KeeganWatkins wrote:
> So, it's just a simple issue with scope. Try this instead (which was
> working when applied via FireBug to your demo page:
>
> $(document).ready(function(){
> $("#barcode span").hover(
> function () {
>
So, it's just a simple issue with scope. Try this instead (which was
working when applied via FireBug to your demo page:
$(document).ready(function(){
$("#barcode span").hover(
function () {
$(this).addClass("barover");
},
function () {
// Store sp
Hi,
I tried this but it didn't work. It resulted in the class not being
removed at all. You can see here:
http://www.toomanydesigns.com/test/noflash/
On Aug 30, 11:20 am, KeeganWatkins wrote:
> The basic syntax for delaying a function using setTimeout is this:
>
> setTimeout(function() {
>
The basic syntax for delaying a function using setTimeout is this:
setTimeout(function() {
// ...code here executes when the timeout is complete
}, 2000 /* Length of timeout, in milliseconds */);
so for your example, something like this should work:
$(document).ready(function(){
$("#b
function updateMsg() {
setTimeout(function() {
$.get("db.php",
function(data) {
addMessages(data);
});
updateMsg();
That is just awesome, thanks very much.
Just like you said, I did see the syntax as setTimeout("funcName()",
2000); everywhere, even on tutorial sites. I could have saved a few
hours, 3 advil and my sanity if I found this out earlier.
That is just awesome, thanks very much.
Just like you said, I did see the syntax as setTimeout("funcName()",
2000); everywhere, even on tutorial sites. I could have saved a few
hours, 3 advil and my sanity if I found this out earlier.
You can see setTimeout("funcName()", 2000); everywhere on the net but
it's actually quite ridiculous as it's much easier (and faster) to
just pass a function reference to it like this:
setTimeout(sendit, 2000);
also this will solve the scoping issues as well.
If you want to pass some arguments
Holy @!$! that was fast. Thanks guys,
This is all in doc.ready. If I move the regular functions out, I
cannot use the 'olde' var in them. If I set the 'olde' var outside of
doc.ready, I can't use it inside doc.ready.
I'm sure there is a simple fix for this but the little grey cells are
smoking a
> When I run into this, I put my functions outside the doc.ready.block,
> but call them from within it. Then they can share vars.
Without any code, it's pretty hard to help troubleshoot issues...
But if I had to take a wild guess, I'd say it was a scoping issue.
The setTimeOut function excutes
When I run into this, I put my functions outside the doc.ready.block,
but call them from within it. Then they can share vars.
Yeah - some sample code would help...
On Dec 3, 1:52 pm, QuadCom <[EMAIL PROTECTED]> wrote:
> I am trying to use setTimeout to call another function. Everytime I
> put the functions I wish to call within the doc.ready block, I get
> errors stating that the function is undefined. If I move it out
thanks a lot
On 8月16日, 下午8时11分, "Karl Rudd" <[EMAIL PROTECTED]> wrote:
> You want:
>
> setTimeout( function() { $('#content').unblock() }, 5000);
>
> See the following for a bit more about what is happening:
>
> http://docs.jquery.com/How_jQuery_Works#Callback_with_arguments
>
> Karl Rudd
>
David,
Thank you so much for the suggestion. As you expected, it worked
perfectly for me. I ended up with the following:
function addHoverHide(linkClass, layerId) {
var t;
$("a." + linkClass).hover(function() {
clearTimeout(t);
// custom function which creates drop shadow
How about using closure like this?
function addHoverHide(linkClass, layerId) {
var t;
$("." + linkClass).hover(function() {
clearTimeout(t)
$("#" + layerId).show();
}, function() {
t = setTimeout(function() {$("#" + layerId).hide()}, 2000);
});
}
$(document).ready(function ()
22 matches
Mail list logo