It's doing exactly what your code asks it to do, which is to toggle
the visibility of #divarea every time you click the dropdown. What you
want is
$('#dropdown').change(function(){
$('#divarea')[ ($(this).val() == 'double') ? 'hide' : 'show' ]()
});
equivalent to
$('#dropdown').change(funct
Try using "change" instead of "click".
-Ben
On Dec 22, 8:44 pm, "Louie Miranda" wrote:
> I tried to hide the using the toggle() function below.
>
> javascript code
>
>
>
> > $(document).ready(function() {
>
> > $("#dropdown").click(function() {
> > $("#divarea").toggle();
> >
2 matches
Mail list logo