Bootstrap Tour

Bootstrap Tour è uno script che ci permette di costruire una guida interattiva usando i popover di Bootstrap.


Per installare BT è necessario incorporare nella pagina:


//nella head
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tour/0.10.3/css/bootstrap-tour.min.css">
...
//dopo il footer
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-tour/0.10.3/js/bootstrap-tour.min.js"></script>
		

Instanziare il tour nel javascript.


// Instance the tour
var tour = new Tour({
	
  steps: [
  {
    element: "#step_one",
    title: "Title of my step",
    content: "Content of my step"
  },
  {
    element: "#step_two",
    title: "Title of my step",
    content: "Content of my step"
  }
]});

// Initialize the tour
tour.init();

// Start the tour
tour.start();