In flexdashbard, we can create different headings:
- Heading level 1: they are pages
- Heading level 2: we specify
RoworColumn - Heading level 3: tabs
Now for anchors, it seems that we can only set them for heading level 1. As we can see it in this article.
My question is, it is possible to create anchors for tabs (so heading level 3)?
I tried to find a solution. For example, with the following code:
Page 4
=====================================
## Row {.tabset}
### tab 1 {#test1}
### tab 2 {#test2}
The anchor is automatically created for "Page 4" which is #page-4. For "tab 1", I tried to add {#test1}, but it doesn't work.
EDIT: solution with javascript
Another solution that would work for me is to use javascript, to go the the next tab.
First we can add a javascript
<script type="text/javascript">
$('.btnNext').click(function(){
$('.nav-tabs > .active').next('li').find('a').trigger('click');
});
$('.btnPrevious').click(function(){
$('.nav-tabs > .active').prev('li').find('a').trigger('click');
});
</script>
Then, we can create buttons to navigate
<a class="btn btn-primary btnNext">Next</a>
<a class="btn btn-primary btnPrevious">Previous</a>
But I testd in R Markdown, it doesn't work.