Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 154
  • Last Modified:

Highlight changed Radiobutton in Chrome not working

I have a simple highlight that just puts a halo around a changed Radio button, it can be seen at this jsFiddle

http://jsfiddle.net/V6DSn/3/

It works OK in IE but not in Chrome. Any ideas from the experts?

Andy
0
Andy Green
Asked:
Andy Green
  • 5
  • 3
1 Solution
 
leakim971PluritechnicianCommented:
yes, that work only on IE.
you need to replace them check this : http://jsfiddle.net/V6DSn/4/

               $('input:radio').click(function () {
                   //remove all 
                   $('input:radio').parent().removeClass("highlight");
                   //add currect
                   $(this).parent().addClass("highlight");
               });

Open in new window

0
 
Andy GreenAuthor Commented:
Thanks leakim971 but its gone the other way now. Doesn't work in IE. Is there a cross browser solution

Andy
0
 
leakim971PluritechnicianCommented:
for IE add this CSS :

:checked { 
    background-color: red;
}

Open in new window

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Andy GreenAuthor Commented:
I have done that:



http://jsfiddle.net/V6DSn/5/


Problem now is that in IE the radio stays red when I select another button. Works OK in Chrome.

Andy
0
 
leakim971PluritechnicianCommented:
replace click by change : http://jsfiddle.net/V6DSn/8/
0
 
Andy GreenAuthor Commented:
All text highlightedHmm. It works in JS fiddle, but in  my page this happens when I select any Radio button:

All the text is highlighted with the background colour, not just the radio.

See image.

More on this tomorrow. fed up with it now.
0
 
Andy GreenAuthor Commented:
If I can rewind - this is using actual markup from my app: http://jsfiddle.net/kXufK/2/

This works in IE but not in Chrome

Andy
0
 
Andy GreenAuthor Commented:
My original query has been answered. So points for that. I'll open another question for my on going problem.

Thanks

Andy
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now