0

I am using Bootstrap Tour v0.11, but I am unable to activate the tour. I want to start the tour with a button so I added a click function. However, when I check the console, I get a SyntaxError on my element.

Here is my button and div I want to highlight on my tour:

<a class="btn btn-link" href="#" id="start-tour" type="button">Start</a>

<div id="firstStep">
<div class="box lead my-uba"><a href="/MyUBANew/tabid/3007/Default.aspx"><strong>My UBA</strong></a></div>
</div>

And here are my Options:

var tour = new Tour({
     steps: [
     {
                    debug:"true",
        element: “#firstStep",
        title: "Title of my step",
        content: "Content of my step"
     }
     ]
    });

    // Initialize the tour
    tour.init();

    // Start the tour
    $('#start-tour').click(function(e){
    tour.start();
    e.preventDefault():
    });
    });

For some reason, my browser thinks element:"#firstStep", is incorrect. I copied directly from the API documentation so I don't know what I am doing wrong.

UPDATE: I was able to fix the error by retyping the double quotes since I did a copy/paste. I am now receiving jQuery errors. My site is currently running on v1.9.1. What's the minimum for Bootstrap Tour to work? I can't find anything in their documentation.

  • If you copy and pasted directly from your code, that quote symbol in your element: "#firstStep" line isn't a standard double quotes " it's an opening curly double quotes usually generated by a word processor “ -- which is probably causing your problem. – clockwatcher May 30 '17 at 19:49
  • Thanks! That error went away after updating my double quotes. I am still having issues activating the tour after I click the Start button. – Matt Milligan May 30 '17 at 20:34

0 Answers0