Troubleshooting navigation issues with Intro.js in Vue on multiple pages

Currently, I am utilizing intro.js in conjunction with the vue-intro.js binding to create an onboarding experience for my users. This walkthrough should seamlessly guide them through various routes within the application.

For more information: vue binding https://github.com/alex-oleshkevich/vue-introjs intro.js docs

While I have successfully implemented it using v-directives, I aim to extend this functionality across multiple routes with programmatic navigation.

I have experimented with different methods of selecting elements, such as query selectors, but without success. Additionally, I have tried various combinations of mounted/created methods.

this.$intro().addStep({
    element: '#one',
    intro: "step one",
    position: 'right',
})

this.$intro().addStep({
    element: '#two',
    intro: "step two",
    position: 'bottom'
})

this.$intro().start().oncomplete(() =>
    this.$route.push("someroute")

)

My objective is to seamlessly navigate through each step and trigger the oncomplete( () => callback) event when transitioning between pages. This will allow me to progress through different Vue pages while maintaining the continuity of the onboarding process.

Answer №1

It's important to note that IntroJS can be sensitive to the current DOM class name. If a specific element is not found (for example, if your DOM is rendered late in Vue), IntroJS may not work as expected. To address this, consider binding the message directly to the HTML using the "data-intro" or "data-title" props from IntroJS. You can find an example in their Hello-world project here:

Thank you

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

Combining two ng-model inputs in Angular for seamless data integration

New to Angular and seeking some guidance. I currently have two input fields, one for the area code and the other for the number. // Input field for area code <input area-input type="tel" required="true" name="area" ng-model="employee.home.area">&l ...

Utilizing vue.js 3 to implement dual @click events on a single HTML element

I need to assign 2 mouse click events to a div element. One should be triggered by holding down the shift key while clicking, and the other by a regular click, like this: <div @click.shift="aaa()" @click="bbb()">...</div> T ...

Issues with zDepth functionality in Material-UI (React.js) not being functional

Can anyone explain the concept of zDepth to me? I have a component with the following render method: render() { return ( <div> <AppBar zDepth={2} title="Some title" iconElementLeft={<IconButton onClick={this ...

VueJS1 flexible $parent.$parent method duration

Trying to utilize a parent function across multiple layers of nested child components. {{ $parent.$parent.testFunction('foo', 'bar') }} This approach currently functions, however, each time I navigate through levels in the hierarchy, ...

What is the proper way to implement if-else statements in JSX?

Is there a way to implement if else statements in JSX? I am currently using the following code snippet <h2 className='font-bold text-lx'>$ {item?.price == null && item?.type =='Sell' ? 'Please contact agency' : ...

TypeScript does not raise errors for ANY variables that are initialized later

In my code, there is a function that accepts only numeric variables. function add(n1: number) { return n1 + n1; } However, I mistakenly initialized a variable with type "any" and assigned it a string value of '5'. let number1; number1 = &apo ...

Using Node.js and Typescript to implement a chain of logical AND operations with an array of any length

Setting: I am developing a versatile function that determines a boolean outcome based on logical AND operations. However, the function is designed to handle various types of objects and arrays, each requiring different conditions. Currently, my code look ...

What is the process of encoding a string for HTML display using JavaScript?

Recently, I developed a webpage for creating blog posts. To handle the description input, I integrated CKEDITOR. However, when I save the data in my mongo database, it is stored as: '<p>How are you?</p>\r\n' Surprisingly, ...

Learn how to automatically navigate to another page upon successfully creating an account and setting a value in the Firebase database

I am working on a system where, after successfully creating an account and setting a value in Firebase database, the user will be redirected to another page. Currently, I have managed to navigate to the next page but I am facing an issue with setting the ...

Issue encountered during rendering: The function used is not a filter

Everything works fine with the search filter and pagination on the initial load. However, upon clicking to go to the next page, an error occurs stating **'Error in render: "TypeError: this.tickets.filter is not a function"'**. This issue can b ...

Issue detected: Code coverage functionality in Jest is not functioning as expected

When attempting to use jest --coverage --watch, the goal is to only see coverage related to the specific component being tested and to track increased coverage as more tests are added. However, despite successfully running modified tests, the resulting cov ...

What is the best way to display nested data in the item prop of a Vuetify data table?

We are developing an application that involves Users and Events. Users can apply to work at different events. Currently, we are trying to implement a Vuetify data table that displays the events a user has applied to along with their application status for ...

The magic of jQuery's prop() method meets the powerful optimization of the

I have been using the google closure compiler and encountered a warning that doesn't make sense to me. I am trying to check if a radio button is checked with the following code: // ==ClosureCompiler== // @output_file_name custom.js // @compilation_le ...

Delving into the prolonged compilation time and deciphering the root cause of the latency issue within AngularJs

Lately, I've become fixated on a particular issue that I need your help solving. My task at work involves creating a list of posts with comments, each post having the states of view, edit, and delete. To manage the posts and comments, I've devel ...

How to use the Watch method to trigger actions in a VueJS 2 component

Currently, I am in the process of using VueJS2 with 2 components. Idea behind this: Whenever a method is activated in one component, I intend for a method in the other component to be activated as well. To achieve this, I believe I need to utilize the wa ...

Is it considered bad practice to pass "props" outside of the props object?

I have been utilizing the AntD <Table /> component, and as I create the columns, I want to provide custom props to my cells that are not within the data being supplied to the table. These could include aspects like theme, color palette, and layout se ...

What is the process for appending a value to an array of JSON objects?

I have a JSON array containing objects which I need to pass the values to the DataTables. [{ _id: '58a2b5941a9dfe3537aad540', Country: 'India', State: 'Andhra Pradesh', District: 'Guntur', Division: ...

Turn on the text field when the enter key is pressed

I've searched online for solutions, but none of them have resolved my issue. Upon loading my page, I am able to successfully have my JS file select the first textfield. However, I am struggling with getting it to proceed to the next textfield when th ...

Guide on how to incorporate an external javascript file into an HTML button

I am currently working on an exercise through Udacity that involves creating an HTML form with JavaScript functions. The task is to input text into the form, submit it, and have it displayed on the webpage within a blue square. This exercise is designed to ...

NodeJS - issues with nodemon auto-reload feature causing my server to not

After successfully installing NodeJS version 4.4.5, I proceeded to install nodemon version 1.9.2 by following all the installation instructions using npm (npm install -g nodemon). In a newly created folder, I have my server.js file with some basic code: ...