Difference between revisions of "Template:NYU Shanghai"

Line 178: Line 178:
 
<script type="text/javascript">
 
<script type="text/javascript">
 
document.onscroll=function(){
 
document.onscroll=function(){
                document.getElementById("testdiv").style.backgroundColor = "blue";
 
                document.getElementById("testdivP1").innerHTML = document.body.scrollLeft;
 
 
                 document.getElementById("nav").style.marginLeft = "-" + String(document.body.scrollLeft) + "px";
 
                 document.getElementById("nav").style.marginLeft = "-" + String(document.body.scrollLeft) + "px";
 
};
 
};
Line 358: Line 356:
 
</div>
 
</div>
 
<div style="width: 982px; height: 80px;"></div>
 
<div style="width: 982px; height: 80px;"></div>
<div id="testdiv" style="height: 100px; width: 100px; background-color: lime; margin: 0 auto;"><p id="testdivP1"></p><p id="testdivP2"></p></div>
 
 
</body>
 
</body>
 
</html>
 
</html>

Revision as of 03:47, 25 August 2015