Difference between revisions of "Template:SHSBNU China/Sample js"

 
(One intermediate revision by the same user not shown)
Line 63: Line 63:
 
}
 
}
  
function getOffset( el ) {
+
         function back_to_top() {
    var _x = 0;
+
        window.scrollTo(0,0);
    var _y = 0;
+
        }
    while( el && !isNaN( el.offsetLeft ) && !isNaN( el.offsetTop ) ) {
+
         _x += el.offsetLeft - el.scrollLeft;
+
        _y += el.offsetTop - el.scrollTop;
+
        el = el.offsetParent;
+
    }
+
    return { top: _y, left: _x };
+
}
+
 
+
function back_to_top() {
+
window.scrollTo(0,0);
+
}
+

Latest revision as of 02:08, 17 October 2018

function fcova(){ //first classification over document.getElementById('fc_Project').style.backgroundColor='#A0A0A0'; }

function fcoua(){ //first classification out document.getElementById('fc_Project').style.backgroundColor='#606060'; }

function fcovb(){ //first classification over document.getElementById('fc_Experiment').style.backgroundColor='#A0A0A0'; }

function fcoub(){ //first classification out document.getElementById('fc_Experiment').style.backgroundColor='#606060'; }

function fcovc(){ //first classification over document.getElementById('fc_Model').style.backgroundColor='#A0A0A0'; }

function fcouc(){ //first classification out document.getElementById('fc_Model').style.backgroundColor='#606060'; }

function fcovd(){ //first classification over document.getElementById('fc_Human Practice').style.backgroundColor='#A0A0A0'; }

function fcoud(){ //first classification out document.getElementById('fc_Human Practice').style.backgroundColor='#606060'; }

function fcove(){ //first classification over document.getElementById('fc_Demonstrate').style.backgroundColor='#A0A0A0'; }

function fcoue(){ //first classification out document.getElementById('fc_Demonstrate').style.backgroundColor='#606060'; }

function fcovf(){ //first classification over document.getElementById('fc_Safety').style.backgroundColor='#A0A0A0'; }

function fcouf(){ //first classification out document.getElementById('fc_Safety').style.backgroundColor='#606060'; }

function fcovg(){ //first classification over document.getElementById('fc_Attribution').style.backgroundColor='#A0A0A0'; }

function fcoug(){ //first classification out document.getElementById('fc_Attribution').style.backgroundColor='#606060'; }

function fcovh(){ //first classification over document.getElementById('fc_Team').style.backgroundColor='#A0A0A0'; }

function fcouh(){ //first classification out document.getElementById('fc_Team').style.backgroundColor='#606060'; }

       function back_to_top() {
       	window.scrollTo(0,0);
       }