简体   繁体   中英

Radio Buttons on bootstrap table not working with IE8

I want to put radio button inside a table (rendered with twitter bootstrap). The problem is the radio button is not working with IE8 (impossible to click). It works perfectly with FF or Chrome.

The fiddlecode : http://jsfiddle.net/WuBa5/8/ but fiddle seems to not work on IE8.

Here is the code :

<table class="table table-striped  table-bordered">
<thead>
    <tr>
        <th>Choisir</th>
        <th>Version</th>
        <th>Date de Création</th>
        <th>Commentaire</th>
    </tr>
</thead>
<tbody data-bind="foreach: Versions">
    <tr data-bind="    attr: { 'name': $index }" name="0">
        <td>
            <input type="radio" data-bind="    value: id" name="radiosImport" value="bb1e7d68-fef4-7e4a-bbfe-c39238d2e712"></td>
        <td data-bind="    text: name">1.0</td>
        <td data-bind="    text: commitDate">Version ouverte non archivée</td>
        <td data-bind="    text: description">Initialisation de la base de données 12-08-2013</td>
    </tr>
    <tr data-bind="    attr: { 'name': $index }" name="1">
        <td>
            <input type="radio" data-bind="    value: id" name="radiosImport" value="aa6f304d-696d-ac41-9e7c-d4ef02dc5711"></td>
        <td data-bind="    text: name">1.1</td>
        <td data-bind="    text: commitDate">Version ouverte non archivée</td>
        <td data-bind="    text: description">MAJ DB</td>
    </tr>
</tbody>

I finaly found the answer. The problem is with JQuery not auto-closing the input tag. I changed the JQuery code to generate the input with :

tdbodyRadio.append("<input type='radio' data-bind='value: id' name='radiosImport' onchange='EventOnModal.onClickRadio();'/>");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM