Here:
$("#almond_cake:checked").val() == 'on')

You're checking for the value 'on', but you're setting value="x"?

If you're using that condition, your HTML should look like this:
<input type="radio" id="almond_cake" name="cakes" value="on" />

See if that works.

(And you don't need a closing </input> tag. It's not valid HTML.)


On Jul 2, 7:45 am, Shiro <nimro...@gmail.com> wrote:
> Hi,
> I changed it to the following:
>
> $("#flavors input[name=cakes]").change(function(){
>
>                 if ($("#almond_cake").is(':checked')) {
>
>                         $("#wrapper_almond").show();
>                         $("#pic_almond").show();
>                 } else {
>                         $("#wrapper_almond").hide();
>                         $("#pic_almond").hide();
>                 };
>
> There are more types of 'cakes' listed besides that the one there and
> this works perfectly fine in Mozilla firefox. However, the ever nasty
> Internet explorer gave me some problems. Clicking on almond cake radio
> button is supposed to show the wrapper_almond div, chocolate cake
> radio button shows wrapper_chocolate div, etc. But in IE, whenever I
> click on almond cake, nothing happens, and I click on chocolate cake,
> it shows almond cake instead! There seems to be a delay in clicks
> somehow. I either have to double click the radio button, or right
> click after selecting the radio button. Is there a way around this?
> Any help greatly appreciated!
>
> Sincerely,
> Westley
>
> On Jul 2, 6:00 am, Bharat <bcrupa...@yahoo.com> wrote:
>
> > Can you try the change event instead of click?
> > Bharat
>
>

Reply via email to