Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to strike-through the text, in selected/checked row, in Bootstrap-table,

I have a Bootstrap-table

<table id="tblTodaysNews"
..
data-click-to-select="true"
data-response-handler="responseHandler">
<thead>
    <tr>
    <th data-field="Select" data-checkbox="true" data-align="center" valign-align="middle" data-width="5px"></th>
    <th data-field="ID" data-visible="false"></th>
    <th data-field="Title" data-title="Title" data-align="left" valign-align="middle" data-width="auto"></th>
    <th data-field="Description" data-title="Message" data-align="left" valign-align="middle" data-width="70%"></th>
    ...     

What i want to do is that when user checks any check-box, in 'Select' data-field, the Title and Description, change their appearance, say, strike-through/Italic. I want to use this ‘checkbox’ to give a visual indication to the user that these rows will be deleted from the database, once user click, a separate, ‘Delete’ button.

Thanks in advance.

like image 719
veeru Avatar asked Sep 10 '15 14:09

veeru


1 Answers

Try this

tr.selected {
  text-decoration: line-through;
}

Here's a working fiddle: http://jsfiddle.net/e3nk137y/11801/

like image 197
Martin Burch Avatar answered Sep 28 '22 09:09

Martin Burch