summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/html.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/inc/html.php b/inc/html.php
index 711cd8db6..cdcd166d9 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -937,8 +937,14 @@ function html_list_index($item){
* @return string html
*/
function html_li_index($item){
+ global $INFO;
+
if($item['type'] == "f"){
- return '<li class="level'.$item['level'].'">';
+ // scroll to the current item
+ if($item['id'] == $INFO['id']) {
+ $id = ' id="scroll__here"';
+ }
+ return '<li class="level'.$item['level'].'" '.$id.'>';
}elseif($item['open']){
return '<li class="open">';
}else{