Difference between revisions of "Template:Freiburg/MenubarTest"

Line 21: Line 21:
 
/* ==== End General Settings ==== */
 
/* ==== End General Settings ==== */
  
 
@media screen and (min-width: 850px){
 
  
 
#naviconwrapper {
 
#naviconwrapper {
Line 158: Line 156:
 
}
 
}
 
/* ==== End classes for icons ==== */
 
/* ==== End classes for icons ==== */
 +
 +
@media screen and (min-width: 850px){
  
 
/* ==== Begin running chip ==== */
 
/* ==== Begin running chip ==== */
Line 440: Line 440:
  
 
@media screen and (max-width: 849px){
 
@media screen and (max-width: 849px){
 +
 +
#header{
 +
  top: -9000px;
 +
  opacity: 0;
 +
}
  
 
}
 
}
Line 445: Line 450:
 
</style>
 
</style>
 
<script type="text/javascript">
 
<script type="text/javascript">
 
+
        $(document).ready(function(){
 
+
    $(document).ready(beecode);
+
    $(window).on('resize',beecode);
+
 
+
    function beecode() {
+
        var windowWidth = $(window).width();
+
        if (windowWidth > 850) {
+
            console.log('if');
+
 
// make submenus appear //
 
// make submenus appear //
 
             $("#home").hover(function(){
 
             $("#home").hover(function(){
Line 554: Line 551:
 
                 $("#notebook-sub") .hide();
 
                 $("#notebook-sub") .hide();
 
             });
 
             });
         } // closes if-statement
+
         });
        else {
+
            console.log('else');
+
            $("#notebook-sub") .show();
+
            $("#project-sub") .hide();
+
            $("#team-sub") .hide();
+
            $("#results-sub") .hide();
+
            $("#policy-sub") .hide();
+
        } // closes else-statement
+
    } // closes beecode
+
 
+
 
</script>
 
</script>
  

Revision as of 09:21, 16 September 2015

""