1

Alright, so right now I am using jQuery and Twitter Bootstrap to throw together a site, and I wanted it so when I jumped to an anchor my page would scroll smoothly, which I achieved by using this:

var $root = $('html, body');
$('a').click(function() {
$root.animate({
    scrollTop: $( $.attr(this, 'href') ).offset().top
}, 500);
return false;
});

which works flawlessly, the issue is when I now try to open my Modal using:

<a href="#MyModal" role="button" class="btn" data-toggle="modal">Learn More</a>    

it wont work! Any help will be greatly appreciated and I will put up more info if needed, thanks!

4

0 回答 0