bootstrap-tour icon indicating copy to clipboard operation
bootstrap-tour copied to clipboard

Multiple Popover

Open aslamkhan669 opened this issue 7 years ago • 3 comments

image

I am getting this issue of multiple popover on my site. I am not using the tour css file and also backdrop is not getting removed when clicked on next step or even when tour is ended. `var tour = new Tour({ steps: [ { element: "#menu-primary-navigation > li.active.menu-home > a", title: "Initialize", content: "Content of my step", position:"bottom"

        }
        
        ]
});

tour.addSteps([ { element: "#menu-primary-navigation > li.active.menu-home > a", title: "Step 1", content: "Content of my step" }, { element: "#menu-primary-navigation > li.active.menu-home > a", title: "Step 2", content: "Content of my step" } ]);

            tour.init();
                        
            tour.start();
            
        }`

aslamkhan669 avatar Nov 01 '17 15:11 aslamkhan669

are u using SPA? Cause if you implemented this in your controller, every time you activate that controller you create another instance of this tour

iamisti avatar Nov 03 '17 07:11 iamisti

No I am just adding it on page directly in script tag. Also I have commented out the window resize code in the library to check if its triggering with that resize event but its still there.

aslamkhan669 avatar Nov 03 '17 09:11 aslamkhan669

Try using a more specific selector e.g. #menu-primary-navigation > li.active.menu-home > a:first-child or document.querySelectorAll("#menu-primary-navigation > li.active.menu-home > a")[0]

wernerhp avatar Apr 06 '18 14:04 wernerhp