Hi,
thanks for your answer, but your code has the same behavior as my
code.

I try to go into details to explain the error.

When you open the dropdown an move the mouse over "option 2" it shows
the valiue of option 2, but when you move the mouse over option 3
(from option 2) it shows the value of option 2 again.



On 4 Nov., 18:55, ricardobeat <[EMAIL PROTECTED]> wrote:
> use $("#fooinfo").html( $("#fooselect").val() ); to get the current
> selection text!
>
> On Nov 4, 1:36 pm, hschulz <[EMAIL PROTECTED]> wrote:
>
> > Hello,
>
> > i want to display some additional information in a div, while
> > selecting an option from a select.
> > It works so far, except that it always display the previous mouseover
> > text.
>
> > the used html
> >     <form>
> >         <div id="fooinfo">qwertz</div>
> >         <select id="fooselect" name="foo">
> >             <option value="foo option 2"> option 2</option>
> >             <option value="foo option 3"> option 3</option>
> >             <option value="foo option 4"> option 4</option>
> >             <option value="foo option 5"> option 5</option>
> >             <option value="foo option 6"> option 6</option>
> >         </select>
> >     </form>
>
> > and the script
> >   $(document).ready(function(){
> >      $("#fooselect option").mouseover(function() {
> >        $("#fooinfo").html($("#fooselect option:selected").text());
> >     });
> >  });
>
> > Any suggestions
>
> > Thanks
> > hschulz

Reply via email to