Browse Source

navigation: new tab with right click

Jost Schmithals 8 years ago
parent
commit
b3a8ec781d
2 changed files with 6 additions and 9 deletions
  1. 1 8
      docs/index.css
  2. 5 1
      docs/index.html

+ 1 - 8
docs/index.css

@@ -50,18 +50,11 @@ h3 {
     margin-left: 20px;
     margin-left: 20px;
 }
 }
 
 
-a, li span {
-    color: #2194CE;
-}
-
 a {
 a {
+    color: #2194CE;
     text-decoration: none;
     text-decoration: none;
 }
 }
 
 
-li span {
-    cursor: pointer;
-}
-
 #panel {
 #panel {
     position: fixed;
     position: fixed;
     left: 0px;
     left: 0px;

+ 5 - 1
docs/index.html

@@ -125,7 +125,11 @@
                         var pageURL = pages[ pageName ];
                         var pageURL = pages[ pageName ];
 
 
                         var listElement = createAndAppendDOMElement( { type: 'li', parent: categoryContent } );
                         var listElement = createAndAppendDOMElement( { type: 'li', parent: categoryContent } );
-                        var linkElement = createAndAppendDOMElement( { type: 'span', parent: listElement, content: pageName } );
+                        var linkElement = createAndAppendDOMElement( { type: 'a', parent: listElement, content: pageName } );
+
+                        // The href attribute is only used for the option to create a new tab by right click
+
+                        linkElement.setAttribute( 'href', '#' + pageURL );
 
 
                         addClickHandlers( linkElement, pageURL );
                         addClickHandlers( linkElement, pageURL );