Clicking a popover scrolls back to top of the page [Bootstrap and Django] Clicking a popover scrolls back to top of the page [Bootstrap and Django] django django

Clicking a popover scrolls back to top of the page [Bootstrap and Django]


You can solve that by preventing the default action of the anchor element:

$('a#testpop').on('click', function(e) {e.preventDefault(); return true;});


You can add href="javascript://" to the anchor tag.


Remove the href="#" tag, it should work.