After another look at how to navigate the pages of the tour, I returned to where I was yesterday: the tour changes from index.cshtml to page.cshtml and vice versa, but this happens in one click - page.cshtml only flashes open. The step popup does not open in the page.cshtml file, and we do not stay on this page.
So, I thought I would add another step to page.cshtml (step five and sixth step) and BINGO!
Thanks to kuala_dev for the pointer. Work code below:
INDEX.CSHTML
@{ } <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title></title> <link href="../assets/css/bootstrap.css" rel="stylesheet"> <link href="../assets/css/bootstrap-responsive.css" rel="stylesheet"> <link href="../bootstrap-tour/bootstrap-tour.css" rel="stylesheet"> </head> <body> </br> </br> <p class="step-handle" id="step-welcome"> step welcome </p></br> <p class="step-handle" id="step-one"> step 1</p></br> <p class="step-handle" id="step-two"> step 2 </p></br> <p class="step-handle" id="step-three"> step 3 </p></br> <p class="step-handle" id="step-four"> step 4</p></br> <p class="step-handle" id="step-seven"> step 7</p></br> <hr /> <button id="pause-tour">Pause Tour</button> <hr /> <button id="resume-tour">Resume Tour</button> </body> </html> <script src="../bootstrap-tour/jquery.js"></script> <script src="../bootstrap-tour/bootstrap-tooltip.js"></script> <script src="../bootstrap-tour/bootstrap-popover.js"></script> <script src="../bootstrap-tour/bootstrap-tour.js"></script> <script type="text/javascript"> var tour = new Tour({ afterSetState: function(key, value) { console.log(key, value, tour.getState(), tour.getStep()); } }); tour.addSteps([ { element: "#welcome", title: "WELCOME", content: "Welcome to the bootstrap tour" }, { element: "#step-one", title: "Step One Title", content: "Step One Content" }, { element: "#step-two", title: "Step Two Title", content: "Step Two Content" }, { element: "#step-three", title: "Step three Title", content: "Step three Content" }, { path: "/page.cshtml", element: "#step-four", title: "Step four Title", content: "Step four Content" }, { element: "#step-five", title: "Step five Title", content: "Step five Content" }, { path: "/index.cshtml", element: "#step-six", title: "Step six Title", content: "Step six Content" }, { element: "#step-seven", title: "Step seven Title", content: "Step seven Content" } ]); tour.restart(); $("#pause-tour").on("click", function() { tour.end(); }); $("#resume-tour").on("click", function() { tour.start(true); }); </script>
PAGE.CSHTML
@{ } <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title></title> <link href="../assets/css/bootstrap.css" rel="stylesheet"> <link href="../assets/css/bootstrap-responsive.css" rel="stylesheet"> <link href="../bootstrap-tour/bootstrap-tour.css" rel="stylesheet"> </head> <body> <hr> <h2 class="step-handle" id="step-five" style="float: left">We're Big Show Offs</h2> <hr> <h2 class="step-handle" id="step-six" style="float: left">We're Big Show Offs</h2> </body> </html> <script src="../bootstrap-tour/jquery.js"></script> <script src="../bootstrap-tour/bootstrap-tooltip.js"></script> <script src="../bootstrap-tour/bootstrap-popover.js"></script> <script src="../bootstrap-tour/bootstrap-tour.js"></script> <script type="text/javascript"> var tour = new Tour({ afterSetState: function(key, value) { console.log(key, value, tour.getState(), tour.getStep()); } }); tour.addSteps([ { element: "#welcome", title: "WELCOME", content: "Welcome to the bootstrap tour" }, { element: "#step-one", title: "Step One Title", content: "Step One Content" }, { element: "#step-two", title: "Step Two Title", content: "Step Two Content" }, { element: "#step-three", title: "Step three Title", content: "Step three Content" }, { path: "/page.cshtml", element: "#step-four", title: "Step four Title", content: "Step four Content" }, { element: "#step-five", title: "Step five Title", content: "Step five Content" }, { path: "/index.cshtml", element: "#step-six", title: "Step six Title", content: "Step six Content" }, { element: "#step-seven", title: "Step seven Title", content: "Step seven Content" } ]); tour.restart(); $("#pause-tour").on("click", function() { tour.end(); }); $("#resume-tour").on("click", function() { tour.start(true); }); </script>