Each time a visitor selects a link, I expect the dialog to disappear and page to scroll down to the specific - selected id (w/o refresh). Of course, I have to set some exceptions as well!
<div class="modal fade" id="basicModal6" tabindex="-1" role="dialog" aria-labelledby="basicModal6" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content fp">
<button type="button" class="ol close" data-dismiss="modal" aria-hidden="true"><i class="fa fa-times fa-2x red"></i></button>
<div class="heading text-center">
<h2>Title</h2>
<p>Text</p>
<footer class="f2 text-left wrap2">
<a href="#home">link A</a>
<a href="#bclass">link B</a>
<a href="#gclass">link C</a>
</footer>
</div>
</div>
</div>
</div>
You can use
.modal('hide');
like this:for internal links it will automatically redirect to the location, you just need to hide the div. You can do it by this:
If your links are static:
if dynamic:
Alternatively, You can also add this onclick on links:
for external links it will be redirected to the link, no worries there.