jquery mobile如何突出ui-state-highlight

时间:2016-10-20 20:56:31

标签: jquery-mobile highlight

jQuery mobile有什么亮点吗?例如,突出显示表格行。 Jquery ui有ui-state-highlight。

<table>
   <tr class="ui-state-highlight">

它应该适用于不同的主题和样本。

感谢。

1 个答案:

答案 0 :(得分:0)

/*
I'm also searching for that question. The only way I just now can think at this is using jQuery to find the selector:
 $("table tr.myTR").addClass('error');*/


----------


    <style>
    .error {
    background-color: #fbec88;
    }
    tr:nth-child(even) {
    background: #e9e9e9;
    }
    </style>


 <div data-role="content">

        <table data-role="table" data-mode=""  id="myTable">

            <tbody>
            <tr class="myTR">
                <td>Alfreds Futterkiste</td>
            </tr>
            <tr>
                <td>Maria Anders</td>
            </tr>
            <tr>
                <td>Obere Str. 57</td>
            </tr>
            <tr>
                <td>Berlin</td>
            </tr>
            <tr>
                <td>12209</td>
            </tr>
            <tr>
                <td>Germany</td>
            </tr>
            </tbody>
        </table>
    </div>

</div>

<script>
    $(function () {
        $("table tr.myTR").addClass('error');
    })

</script>