IE6 forces Two clicks to trigger javascript style=display:inline; event

Posted by JiminyCricket on Stack Overflow See other posts from Stack Overflow or by JiminyCricket
Published on 2010-04-02T18:01:49Z Indexed on 2010/04/02 18:13 UTC
Read the original article Hit count: 166

Filed under:
|
|
|

I have a web form that has 2 radio buttons, depending on which one is clicked it displays a hidden element

This works fine in all browsers except for IE6, which, after I click on the radio button, I have to click again (anywhere on the window) and then the element is displayed...has anyone had behavior like this before?

I tried to not use jQuery and do straight getElementById() but I get the same behavior...

JSCRiPT

function showHidden(divid) {
  $('#'+divid).css( {'display':'inline'} );
}

HTML

<input type=radio name=borp  value=1 onChange='showHidden("brandchecks")' > Brand
<input type=radio name=borp  value=2 onChange='showHidden("productchecks")' > Product

<div id='brandchecks' style='display:none;'>
Blah
</div>

<div id='productchecks' style='display:none;'>
Blah
</div>

© Stack Overflow or respective owner

Related posts about css

Related posts about JavaScript