Difference between revisions of "Template:Team:DTU-Denmark/index.html"

Line 22: Line 22:
 
         <!-- Hover -->
 
         <!-- Hover -->
 
         <script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/hover-js?action=raw&ctype=text/javascript"></script>  
 
         <script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/hover-js?action=raw&ctype=text/javascript"></script>  
         <!-- Navigationtion, Add to subbar visibility when hovering -->
+
         <!-- Navigationtion, Add to subbar visibility when hovering  
         <script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/nav-js?action=raw&ctype=text/javascript"></script>
+
         <script type="text/javascript" src="https://2016.igem.org/Team:DTU-Denmark/nav-js?action=raw&ctype=text/javascript"></script> -->
 
          
 
          
 
         <!--MeanMenu stylesheet,  source: http://www.meanthemes.com/plugins/meanmenu/-->
 
         <!--MeanMenu stylesheet,  source: http://www.meanthemes.com/plugins/meanmenu/-->
Line 285: Line 285:
 
             }
 
             }
 
              
 
              
             #Topnav a:hover{
+
             #Topnav a:hover,
 +
            #Topnav a.hover{
 
                 background-color: #990000; /*4A0000, 750000,  
 
                 background-color: #990000; /*4A0000, 750000,  
 
                 B81414, DA3535*/
 
                 B81414, DA3535*/
 
                 color: white;
 
                 color: white;
 
             }
 
             }
 
+
/*
 
             #Topnav a.active{
 
             #Topnav a.active{
                 background-color: #750000;
+
                 background-color: #990000;
 
                 border-top-left-radius: 10px;
 
                 border-top-left-radius: 10px;
 
                 border-top-right-radius: 10px;
 
                 border-top-right-radius: 10px;
 
                 color: white;
 
                 color: white;
 
             }
 
             }
 
+
*/
 
             body{
 
             body{
 
                 padding-top: 120px;
 
                 padding-top: 120px;
Line 776: Line 777:
 
if(link_p3.attr('id') == "sub-navigation"){
 
if(link_p3.attr('id') == "sub-navigation"){
 
link_p2[0].className = "active-sub";
 
link_p2[0].className = "active-sub";
position_link[0].style.textDecoration = "underline";
+
position_link[0].style.fontWeight = "bold";
  
 
var head_name = link_p2[0].id;
 
var head_name = link_p2[0].id;
Line 785: Line 786:
 
}
 
}
 
}
 
}
 
if ("ontouchstart" in window)
 
        {
 
            isTouch = true;
 
        } else {
 
            isTouch = false;
 
        }
 
    console.log(isTouch)
 
  
 
// Clear sub menues
 
// Clear sub menues
Line 819: Line 812:
 
});
 
});
  
 
+
// Header menue function on tuch screen
 +
flag = false
 
$(window).bind('touchstart', function(event){
 
$(window).bind('touchstart', function(event){
    var cName = event.target.className
+
    if (!flag) {
open_sub( cName );
+
    flag = true;
 +
    setTimeout(function(){ flag = false; }, 100);
 +
 
 +
    var cName = event.target.className.split(" ")[0]
 +
    var subName = cName + "-sub"
 +
    var subClass = $("#" + subName).attr("class");
 +
 
 +
    if(subClass !== "active-sub"){
 +
event.preventDefault();
 +
$(".hover").removeClass("hover")
 +
open_sub( cName );
 +
var k = $("." + cName).addClass("hover");
 +
console.log(k)
 +
}
 +
    }
 
});
 
});
  
// window.addEventListener('touchstart', function(){
 
//         $(document).click = function(e){
 
// console.log("hello")
 
// };
 
//     });
 
 
 
 
// Open current sub menue when the window opens
 
// Open current sub menue when the window opens

Revision as of 20:36, 9 August 2016

New HTML template for the wiki