Is there a way to highlight a table row effectively? I've been struggling with it and tried using the fix mentioned in this bootstrap-tour issue here
Check out this demonstration on jsFiddle: jsFiddle
JAVASCRIPT
$("#dialog").dialog();
var t = new Tour({
backdrop: true,
onShown: function(tour) {
var stepElement = getTourElement(tour);
$(stepElement).after($('.tour-step-background'));
$(stepElement).after($('.tour-backdrop'));
},
steps: [
{
element: "table tbody tr:first-of-type",
title: "Title",
placement: 'bottom',
content: "Content"
}
]
}).restart();
function getTourElement(tour){
return tour._options.steps[tour._current].element
}
HTML
<table>
<thead>
<tr>
<th>Name</th>
<th>Power</th>
<th>Health</th>
</tr>
</thead>
<tbody>
<tr>
<td>Superman</td>
<td>Flying</td>
<td>100%</td>
</tr>
<tr>
<td>Superman</td>
<td>Flying</td>
<td>100%</td>
</tr>
<tr>
<td>Superman</td>
<td>Flying</td>
<td>100%</td>
</tr>
</tbody>
</table>
CSS
table{
width:100%;
}
.tour-step-background,
.tour-backdrop {
position: fixed;
}
.tour-step-background {
background: #fff;
}
The challenge lies in displaying the table row effectively. The current workaround involves changing its CSS to display:block;
, but this might compromise its original style.