Cecilia 1403 (Talk | contribs) |
Cecilia 1403 (Talk | contribs) |
||
Line 296: | Line 296: | ||
<div class="col-lg-6 d-none d-lg-block"> | <div class="col-lg-6 d-none d-lg-block"> | ||
<div class="team-pictures"> | <div class="team-pictures"> | ||
− | <a class="teamcard" href="#carousel" data-slide-to="0"> | + | <a href="javascript:void(0);" onclick="getFigureId(0)"> |
+ | <img src="https://static.igem.org/mediawiki/2018/5/55/T--Chalmers-Gothenburg--Agnes.jpg" alt="Agnes" width="100%" height="auto"> | ||
+ | <h5> | ||
+ | Agnes | ||
+ | </h5> | ||
+ | </a> | ||
+ | <!---<a class="teamcard" href="#carousel" data-slide-to="0"> | ||
<img src="https://static.igem.org/mediawiki/2018/5/55/T--Chalmers-Gothenburg--Agnes.jpg" alt="Agnes" width="100%" height="auto"> | <img src="https://static.igem.org/mediawiki/2018/5/55/T--Chalmers-Gothenburg--Agnes.jpg" alt="Agnes" width="100%" height="auto"> | ||
<h5> | <h5> | ||
Agnes | Agnes | ||
</h5> | </h5> | ||
− | </a> | + | </a>---> |
</div> | </div> | ||
</div> | </div> | ||
Line 448: | Line 454: | ||
</footer> | </footer> | ||
</div> | </div> | ||
+ | <script> | ||
+ | function getItems() { | ||
+ | return document.querySelectorAll('div.carousel-item'); | ||
+ | } | ||
+ | |||
+ | function getIndicators() { | ||
+ | return document.querySelectorAll('ul.carousel-indicators li'); | ||
+ | } | ||
+ | |||
+ | function getFigureId(id) { | ||
+ | //console.log(id); | ||
+ | var items = getItems(); | ||
+ | var indicators = getIndicators(); | ||
+ | |||
+ | for (var i = 0; i < items.length; i++) { | ||
+ | if (i == id) { | ||
+ | //items[i].className = 'carousel-item active'; | ||
+ | } else { | ||
+ | items[i].className = 'carousel-item'; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | for (var i = 0; i < indicators.length; i++) { | ||
+ | if (i == id) { | ||
+ | //indicators[i].className = 'active'; | ||
+ | } else { | ||
+ | indicators[i].className = ''; | ||
+ | } | ||
+ | } | ||
+ | |||
+ | items[id].className = 'carousel-item active'; | ||
+ | indicators[id].className = 'active'; | ||
+ | } | ||
+ | </script> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 20:27, 14 October 2018