I have different anchor links in my navigation. Currently if you click the submenu i.e. "Beglaubigungen" your jumping to an normal anchor, which is the bootstrap slider. But I want it additionally to slide within the slider to the relating slide. How can I do this?
The slider HTML:
<ul class="list-inline">
<li> <a id="carousel-selector-0" class="selected"> Example 1 </a></li>
<li> <a id="carousel-selector-1" > Example 2 </a></li>
<li> <a id="carousel-selector-2" > Example 3 </a></li>
</ul>
<div id="myCarousel" class="carousel slide">
<!-- main slider carousel items -->
<div class="carousel-inner">
<div class="active item" data-slide-number="0"> abcdefghi</div>
<div class="item" data-slide-number="1"> abcdefghi</div>
<div class="item" data-slide-number="2"> abcdefghi</div>
</div>
</div>
WHAT I HAVE TRIED
I guess the anchor link must look sth like this for the navigation:
https://mydomain.de/#anchor?slide=2
I tried this, but its not working:
$(document).ready(function(){
$('#myCarousel').carousel(window.location.hash.substring(1));
});