[jQuery] Re: Bindind keydown function to a form - submit on keydown (value change)

2010-01-20 Thread Mircea
Thanx Nathan, It works. It does change the class to the #family form. Is it possible to make it change the class to the Option element? option class=option value=Georgia label=GeorgiaGeorgia/ option option class=option value=Times New Roman label=Times New RomanTimes New Roman/option option

Re: [jQuery] Re: Bindind keydown function to a form - submit on keydown (value change)

2010-01-20 Thread Nathan Klatt
On Wed, Jan 20, 2010 at 11:20 AM, Mircea i...@amsterdamsat.com wrote: Thanx Nathan, It works. It does change the class to the #family form. Is it possible to make it change the class to the Option element? You mean style the option element? function setFamily() { $('#family

Re: [jQuery] Re: Bindind keydown function to a form - submit on keydown (value change)

2010-01-20 Thread Nathan Klatt
Sorry, function setFamily() { $('#family').css('font-family', $('#family :selected').val()); } $(#family option).each(function() { $(this).css('font-family', $(this).val()) }); setFamily(); $('#family').bind(change keypress, setFamily); http://jsbin.com/agifi/2/edit Nathan

[jQuery] Re: Bindind keydown function to a form - submit on keydown (value change)

2010-01-20 Thread Mircea
Thanx a lot Nathan! It works like a charm. All the best