Search code examples
javascripttwitter-bootstrapbootstrap-tour

Bootstrap-tour not initializing


HTML:

<button id="#enrol-btn1">button</button>

JS:

var tour = new Tour({
steps: [{
    element: "#enrol-btn1",
    title: "Exam Enrolment",
    content: "First let's enrol to an exam"
}]

}).init().start(true);

I cannot get it to initialize on this JSFiddle: http://jsfiddle.net/P5fJ2/20/

What else do I need in order to get a basic example going? I looked through a few other questions on SO but couldn't fix this fiddle


Solution

  • You have an (I guess) typo in your html:

    <button id="#enrol-btn1">button</button>
    

    should be

    <button id="enrol-btn1">button</button>
    

    for the Tour to match the element selector you provided in the step ("#enrol-btn1") .