Bootstrap-tour is incompatible with a row within a table structure

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.

Answer №1

To address this issue, simply include the following rule in your code:

.tour-step-backdrop>td
{
  position: relative;
  z-index: 1101;
}

For a demonstration, refer to the example provided at http://jsfiddle.net/DYNbj/24/

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Why is my MongoDB $match aggregation query not returning results within a specified date range?

I have been struggling with a MongoDB aggregation query that is not returning any results, just an empty array. It seems like the issue lies in how it's processing the date range. Oddly enough, when I use PriceHourly.find({ date: { $lt: end, $gt: sta ...

Retrieve the value of a dropdown menu that contains multiple selections associated with a single model

My current code generates a calendar entry listing for the courtroom, with each case having a "status" dropdown that is set by the judge post-hearing. I now need to save this data in the database. I have successfully added ng-change which triggers the desi ...

How can I display actual images received as escaped string literals from ExpressJS?

Is there a way to transform this data from ExpressJS into an actual image? The information I'm receiving looks like this instead of an image: {`data: 'PNG\r\n\x1A\n\x00\x00\x00\rIHDR\x00\x00\ ...

Learn the method of showcasing a JavaScript variable value within an HTML href tag

Currently, I am in the process of rewriting my URL and category name to be passed into the URL. For this purpose, I am creating a URL friendly string using the following JavaScript function: function getUrlFriendlyString(str) { // convert spaces to &ap ...

the 'class' keyword cannot be utilized in ECMA6

I attempted to execute a class in ECMA2015 but encountered the following error: class Task { constructor(name) { this.name=name; this.completed = false; }; } I received the error below: class Task { ^^^^^ SyntaxError: Unexpected reserved word} Not ...

Tips for updating process.version in a Node.js environment

After upgrading my node version from v3 to v11 using nvm with the command nvm use 11.12.0, I noticed that when I check the version using node -v in the terminal, it correctly shows 11.12.0. I also have a node js application that is started through pm2. I ...

Obtain the current time for a specific user

I'm currently struggling with obtaining the accurate 'trusted' user time, in order to prevent any cheating through manipulation of their computer's clock. Whether I utilize a basic date object, moment timezone, or even Google timezone ...

Samsung S4 Android device experiencing interruption in HTML5 video playback

When using Android Webview to play html5 videos, including Youtube videos (using my own tags and Youtube embedded iFrames), I came across an issue with the Samsung Galaxy S4. The problem occurs in the following scenario: Play a video. Press 'back&ap ...

Maintain the default material-ui class styles while making customizations to override others

Currently, I am working on customizing the material-ui tooltip and specifically need to adjust the margin for the tooltipPlacementTop class: const useStyles = makeStyles(theme => ({ tooltipPlacementTop: { margin: '4px 0' ...

Tips for sending an input file to an input file multiple times

As a developer, I am facing a challenge with a file input on my webpage. The client can add an image using this input, which then creates an img element through the DOM. However, I have only one file input and need to send multiple images to a file.php i ...

What is the process for using dojo to load content?

As I work on creating a single-page website with the help of dojo, I refer to tutorials that explain how to utilize dojo/request for ajax requests. The process is straightforward - simply make a request, receive HTML content, and insert it into a designate ...

Creating a function that assigns an anonymous function which in turn returns another anonymous function

Can you explain the difference in JavaScript between these two code snippets? var reader = new FileReader(); reader.onload = (function (theFile) { return function (e) { loadData(e.target.result); }; })(file); reader.readAsText(file); a ...

Guide on accessing Azure Configuration Application settings in a Node application with JavaScript

Currently, I have a node.js application named "myClient" deployed on Azure as an App Service. Within this setup, I utilize several configuration files that contain specific values tailored to their respective runtime environments: appconfig.json is used f ...

Choose checkboxes based on the checkboxes that were previously selected

My goal is to have a checkbox automatically selected based on the previously selected checkbox. For example, if I select the first checkbox (which has a specific class), then only the checkbox with the same class as the first one should be selected using j ...

Steps for creating a square button

Is it possible to create a square button on my website that still functions like a traditional button? I want the button to change appearance slightly when scrolled over. Currently, I have an example where the button is not clickable: http://jsfiddle.net ...

Determining the value of an object property by referencing another property

Upon running the code below, I encounter the following error message: Uncaught TypeError: Cannot read property 'theTests' of undefined $(document).ready(function() { var Example = {}; Example = { settings: { theTests: $(&apo ...

Issues arise with transferring React component between different projects

My goal is to develop a React component that serves as a navigation bar. This particular component is intended to be imported from a separate file into my App.js. Currently, the component is designed to simply display a 'Hello world' paragraph, ...

How can you align a div next to another using the float property in CSS?

/*Custom Styling for Divs*/ #box1 { border: 1px solid; border-radius: 25px; width: 900px; } #box2 { border: 1px solid; border-radius: 25px; width: 430px; } #box3 { float: right; border: 1px solid; border-radius: ...

Tips for overcoming indentation issues using ESLint?

Ever since I started using Vue 3 with ESlint, I've been encountering a new problem. Whenever I try to run my code, I am bombarded with numerous errors like: --fix option.</p> I'm looking for ways to disable this troublesome feature of ESl ...

What is the best way to specify the content that needs to be paginated in ui-Bootstrap

I've been utilizing ui-Bootstrap and attempting to set up pagination, but it seems like I'm overlooking a key element. Despite reading through the documentation and examining numerous plunkers for guidance on how they define the content to pagina ...