[jQuery] Re: trying in a function to change css color on divs

2008-01-15 Thread hollow
Thanks for your answer. Well it looks good but what i'm trying to do is to take the name of the selected input field $('input[name$=the selected input name]').change(function(){ and change the div whoms #id is the same name of the input name. so the second part is ok

[jQuery] Re: trying in a function to change css color on divs

2008-01-14 Thread Eric Martin
How about: script type=text/javascript $(document).ready(function () { $('input[name$=bgcolor]').change(function(){ $('#'+this.name).css('background-color', this.value); }); }); /script /head body input type=text name=body_bgcolor class=update value= class=texte