[jQuery] Re: Form set to display:none isn't updating on page load

2008-06-19 Thread functionasform

Nevermind, I found conflicting code elsewhere in my doc that was
causing this.

On Jun 18, 10:09 pm, functionasform
<[EMAIL PROTECTED]> wrote:
> I'm using the following code to plug empty input fields' "alt" attributes in
> as their values as soon as the page is ready:
>
> $(":text[alt][value=''],textarea[alt][value='']").each(function(){
>         $(this).attr("value",$(this).attr("alt"));
>
> });
>
> The problem is, it's not working on the input fields in a form set to
> display:none. When the form is visible on load, everything works as
> expected, and as well when I include alert($(this).attr("alt")); in the loop
> it displays the appropriate values for those fields even if the form isn't
> visible. Any ideas as to why it wouldn't be plugging the alt's into the
> inputs when set to display:none?
> --
> View this message in 
> context:http://www.nabble.com/Form-set-to-display%3Anone-isn%27t-updating-on-...
> Sent from the jQuery General Discussion mailing list archive at Nabble.com.


[jQuery] Form set to display:none isn't updating on page load

2008-06-19 Thread functionasform


I'm using the following code to plug empty input fields' "alt" attributes in
as their values as soon as the page is ready: 

$(":text[alt][value=''],textarea[alt][value='']").each(function(){ 
$(this).attr("value",$(this).attr("alt")); 
}); 

The problem is, it's not working on the input fields in a form set to
display:none. When the form is visible on load, everything works as
expected, and as well when I include alert($(this).attr("alt")); in the loop
it displays the appropriate values for those fields even if the form isn't
visible. Any ideas as to why it wouldn't be plugging the alt's into the
inputs when set to display:none? 
-- 
View this message in context: 
http://www.nabble.com/Form-set-to-display%3Anone-isn%27t-updating-on-page-load-tp17996524s27240p17996524.html
Sent from the jQuery General Discussion mailing list archive at Nabble.com.