Difference between revisions of "Template:BNU-CHINA/Javascript/index"

 
(9 intermediate revisions by 2 users not shown)
Line 13: Line 13:
 
  */
 
  */
  
 +
$(document).ready(function() {
 +
 
 
/**
 
/**
 
  --  0.0 global
 
  --  0.0 global
 
  */
 
  */
var totalHeight = document.documentElement.clientHeight;
+
 
$(".page-heading").css(
+
  $('#sideMenu').hide();
 +
/*
 +
  var totalHeight = document.documentElement.clientHeight;
 +
  $(".page-heading").css(
 
     "height", totalHeight
 
     "height", totalHeight
 
);
 
);
 
+
*/
$(document).ready(function() {
+
  #('#sideMenu').hide()
+
})
+
  
 
/**
 
/**
Line 41: Line 43:
 
});
 
});
  
console.log($('#sideMenu'))
+
$('.logo_2016').remove()
 +
})

Latest revision as of 13:45, 21 November 2016

/**

* Created by lvxin on 16/9/25.
* Co-worked by Zitan Chen (czt95@icloud.com)
*/


/**----------------------------------------------

>>> Table of Contents:
------------------------------------------------
0.0 global
1.0 navigation bar
------------------------------------------------
*/

$(document).ready(function() {

/**

--  0.0 global
*/
  $('#sideMenu').hide();

/*

  var totalHeight = document.documentElement.clientHeight;
  $(".page-heading").css(
   "height", totalHeight

);

  • /

/**

*  1.0 navigation bar
*/

$(window).scroll(function () {

   if ($(window).scrollTop() >= document.documentElement.clientHeight) {
       $('.nav-container').addClass('scrolled-down');
   }
   if ($(window).scrollTop() < document.documentElement.clientHeight) {
       $('.nav-container').removeClass('scrolled-down');
       $('.nav-container').removeClass('scrolled-top');
   }
   if ($(window).scrollTop() === 0) {
       $('.nav-container').addClass('scrolled-top');
   }

});

$('.logo_2016').remove() })