Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

popover exiting if href="" #10

Closed
jcorreia opened this issue Mar 21, 2013 · 4 comments
Closed

popover exiting if href="" #10

jcorreia opened this issue Mar 21, 2013 · 4 comments

Comments

@jcorreia
Copy link

Hi,
great work you have here :)
Here is a little bug? I´ve found.
The popover was exiting, and I couldnt found what why.
The problem is that I had in the link that start the boostro this:
a class="alert alert-block" id="help" href=""

the fix was to have href="#"

Just a quick advice to turn this even better.
You could use a configuration js like this:

jQuery(function($) {
  var tour = new Tour();

  tour.addStep({      
    element: "#passo1",    
    placement: "bottom",
    animation:true,
    title: "help ?",    
    content: "content things"
  });

instead of having to change html adding data-bootstro-title and data-bootstro-content.

That example was taken from http://sorich87.github.com/bootstrap-tour/

Thanks,
jcorreia

@clu3
Copy link
Owner

clu3 commented Mar 22, 2013

Your advice is a good idea , thanks. It will reduce the size of the HTML and putting bootstro stuff into a separate cacheable .js file. I agree.

As per your bug, if you wanna trigger popover always then you should have a $(e).preventDefault() ; return false;
inside the click handler for your anchor element. I think that will solve the problem

@jcorreia
Copy link
Author

Hi,
sorry, but I dont know enought jquery to understood your solution. Can you give a code example ?
Thanks

@clu3
Copy link
Owner

clu3 commented Mar 22, 2013

@jcorreia in your case
$("#help").click(function(e){
bootstro.start();/// or howevery you call bootstro
e.preventDefault();
return false;
});

@jcorreia
Copy link
Author

ah..thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants