Thanks mike... its working now... :) :) but i am unable to understand
this line of code

var id = x == 'hi' ? '#list' : '#list1';

can u explane me???



On Jan 5, 6:45 pm, Mike Alsup <mal...@gmail.com> wrote:
> > ya i know mike ... but i have to hide another list when you select
> > next like if you select "hi" it has to display list related to "hi"
> > and when we select "Hello" it has to display list related to "Hello"
> > and hide list related to "hi" ... but it not doing... if i put hide
> > code in if() then it simply shows me both list without selecting any
> > option... got my problem??
>
> $(document).ready(function() {
>         $('#list,#list1').hide();
>         $('select.alert').change(function() {
>                 $('#list,#list1').hide();
>                 var x=($(this).val());
>                 var id = x == 'hi' ? '#list' : '#list1';
>                 $(id).show("slow");
>         });
>
>
>
> });- Hide quoted text -
>
> - Show quoted text -

Reply via email to