[jQuery] Re: input:empty and remember password

2008-08-26 Thread sperks
Thanks Andy, This is a good script for switching input content, but the problem with a login form is that one of the fields is a password field and displays as . Therefore, I'm using a background image that is removed when there's content. On Aug 25, 4:33 pm, Andy Matthews [EMAIL

[jQuery] Re: input:empty and remember password

2008-08-26 Thread sperks
Karl, Thanks, your code reads well and understanding that you hadn't tested it, I threw it in to give it a whirl. It didn't work, but I'm seeing if I can put the tweaks in where needed. I'll probably end up bloating it up a little, but I'll come back with the solution if I can get it to play

[jQuery] Re: input:empty and remember password

2008-08-26 Thread sperks
Resolved: Took what Karl suggested and reconfigured it into my original script. The key here was to change the assumption that the area would be empty with the page was ready, thus putting the background styling in onload rather than trying to remove it afterward. HTML: fieldset id=loginArea

[jQuery] Re: input:empty and remember password

2008-08-25 Thread Andy Matthews
This is what someone on this list gave me about 2 weeks ago: // the focus / blur functionality of the text input // fields for the email a friend form. $('#input.email').bind('focus', function() { // Set the default value if it isn't set if ( !this.defaultValue )

[jQuery] Re: input:empty and remember password

2008-08-25 Thread Karl Rudd
Run your is there anything in it check again on load. So something like (untested): $(document).ready(function() { $('#loginArea').addClass('active'); function flagEmpty( elem ) { elem = $(elem || this); // if elem isn't passed in then use this if (elem.val().length 0)