Added preventDefault to example links in the documentation

Fixes #8990 -- the old CSS selector assigned to hashtag links in the documentation
did not cover all cases that required the preventDefault method. I expanded this to
cover .bs-example hashtag links as well, which fixes the reported Scrollspy issue.