Here is a link to the code and jsfiddle. I tried .text and .html both functions. But both do not work on IE8. Can someone provide me a solution for IE? (I googled and people seem to have similar problems, but can't get a solution) Thanks.
http://jsfiddle.net/3eaGL/
<div class="controls"> <div class="btn-group" data-toggle="buttons-radio"> <input name="MySecurity[my_education]" id="MySecurity_my_education" type="hidden" value="0" /> <button type="button" class="btn" value="2" display="Private">P</button> <button type="button" class="btn" value="1" display="Friends">F</button> <button type="button" class="btn" value="0" display="All ( Public )">A</button> </div> <text class="mySecurityDisplay"></text> </div> $("button[display]").bind('click', function(){ var buttonValue=this.value; $(this).siblings("input[type=hidden]").val(buttonValue); $(this).parent().next().text($(this).attr( 'display' )); });
Bujji source share