[jQuery] Re: bind eventhandler after animation finished

2009-01-24 Thread Stephan Veigl
First of all, slideUp(speed, callback) and slideDown(speed, callback) have callback functions which are called once the animation is finished. (see http://docs.jquery.com/Effects/slideDown#speedcallback -> examples) But I'm not sure if this really solves your problem. If you bind the mouseleave e

[jQuery] Re: strip tag leaving its content

2009-01-24 Thread Stephan Veigl
This solution is easier one if the parent element has only one element - the span, if the parent element hase more spans (or other elements) parent.html() would overwrite all elements and replace them with the content of the child. The performace might also be an issue, however I have no idea whi

[jQuery] Re: strip tag leaving its content

2009-01-24 Thread Stephan Veigl
try: var wrap = $("#wrap"); // your span or other wrapper element wrap.children().insertBefore(wrap); // insert children before wrapper element, insertAfter() inverses children order wrap.remove(); // remove wrapper element by(e) Stephan 2009/1/24 BrainBurner : > > Hello, > > I'm writing an ef

[jQuery] Re: How to select an element using its attributes

2009-01-23 Thread Stephan Veigl
I don't think that you can use a jQuery function within a select expression. try: var nosrc = $("#photo").attr("src"); $(".imgs[src!='+nosrc+']").hover(function(){... by(e) Stephan 2009/1/23 Quan Wen : > > Hi all, I am a newbie to jQuery. > I encounter a problem in the 2nd line > $(".imgs[src

[jQuery] Re: select the parent recursively

2009-01-23 Thread Stephan Veigl
No, it was just for readability and to point out, that it can be any jQuery element 2009/1/23 donb : > > Is there a reason for 'var input' other than possibly readability? > Just wondering if there is some functional significance. > > On Jan 22, 6:06 am, Stephan Vei

[jQuery] Re: select the parent recursively

2009-01-22 Thread Stephan Veigl
try: var input = $("input"); var parent = input.parents("span[xmlns]"); by(e) Stephan

[jQuery] Re: Identify last keeypess

2009-01-20 Thread Stephan Veigl
haven't tested it, but what happens if you try: var lastKeyCode = 0; // submit the login form if the user hits enter $('.login_input').keypress(function(event) { if(event.keyCode == 13 && lastKeyCode != UP && lastKeyCode != DOWN ) { $('#login').submit(); } lastKeyCode = event.keyCode; });

[jQuery] Re: Problems with finding parental -tag

2009-01-19 Thread Stephan Veigl
how about: $(".thisClass").parents("a"); by(e) Stephan

[jQuery] Re: Plugin problem with mouseover/mouseout and setTimout

2009-01-17 Thread Stephan Veigl
Check out this code, I'm using it to show a popup (#add_popup) and fade out if the mousepointer is out for more than 1 second. At the moment it's just a Quick&Ditry hack. Just to give you a clue. $("div").dblclick(function(ev){ timer = $("#add_popup").data("popup-timer"); if (tim

[jQuery] Re: abort an animation?

2009-01-17 Thread Stephan Veigl
thanks 2009/1/17 Jesse Skinner : > You can call .stop() to stop an animation, and .css('opacity', 1) to remove > transparency. > Cheers, > Jesse Skinner > www.thefutureoftheweb.com > > On Sat, Jan 17, 2009 at 11:13 AM, Stephan Veigl > wrote: >> >>

[jQuery] abort an animation?

2009-01-17 Thread Stephan Veigl
How can I abort an animation? I have a slow fadeOut() on an element. Under some conditions I would like to stop the fadeout and show the element without any transparency. How can I do this? Stephan

[jQuery] Re: jQuery Ajax, getting data returned from my PHP script

2009-01-16 Thread Stephan Veigl
try: echo$ajax_validation_response; instead of return $ajax_validation_response; in your PHP script

[jQuery] Re: namespacing events

2009-01-16 Thread Stephan Veigl
Thanks for the clarification. But there is still some point I'm confused of. If the dot is not a namespace separator I would expect it to be a logical "and", or "or" operator. But my experiments show that you cannot interpret it as logical operator either, or at least I don't get it. So what's b

[jQuery] Re: namespacing events

2009-01-16 Thread Stephan Veigl
But I'm not trying to trigger "my.event", I trigger "my.event.a". With a bind("my.event.a") I would expect to catch "my.event.a" events only, and not "my.event.xxx". While for a bind("my.event") I would expect to catch all "my.event", "my.event.a", "my.event.xxx", ... events. Stephan

<    1   2