[jQuery] Re: put the value back in the input (Beginner)

2008-02-15 Thread tlob
works like a charm! but I dont get it... -blur is the opposite of focus, right? -why do you chain it after the focus? -with [0].defaultValue you restore the first value that was stored in an array? -does JS store every changed value of every element in an array? thx a lot! On Feb 15, 3:32 pm,

[jQuery] Re: put the value back in the input (Beginner)

2008-02-15 Thread Michael Price
tlob wrote: works like a charm! Excellent :) but I dont get it... -blur is the opposite of focus, right? Yep - focus is triggered when the user tabs or clicks into the input - blur is triggered when they tab or click out of it so it's no longer the active element. -why do you chain

[jQuery] Re: put the value back in the input (Beginner)

2008-02-15 Thread Cloudream
$('#ANinputID').attr('defaultValue') works in my IE :) On Feb 15, 11:09 pm, Michael Price [EMAIL PROTECTED] wrote: tlob wrote: works like a charm! Excellent :) but I dont get it... -blur is the opposite of focus, right? Yep - focus is triggered when the user tabs or clicks into the

[jQuery] Re: put the value back in the input (Beginner)

2008-02-15 Thread Jamie
Hey, I extended your example code to add a blur function. You can add an if statement in the blur function if you need to restore the default only in certain cases (like only if $(this).val() == ) $(document).ready(function(){ $(#schnellsuche input) .focus(function () {