Skip to content

Commit

Permalink
fix footer jump
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaohaoyang committed May 22, 2015
1 parent d2a5f5b commit 86fe73d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 5 deletions.
16 changes: 14 additions & 2 deletions _posts/2015-05-20-scope.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
---
layout: post
title: "JavaScript作用域"
title: "JavaScript 作用域和作用域链"
date: 2015-05-20 14:06:05
categories: Front-end JavaScript
excerpt: JavaScript作用域学习笔记
excerpt: JavaScript作用域和作用域链学习笔记
---

* content
{:toc}

## JavaScript 作用域

作用域就是变量与函数的可访问范围。在JavaScript中,变量的作用域有全局作用域和局部作用域两种。

---

### 全局作用域(Global Scope)

在代码中任何地方都能访问到的对象拥有全局作用域,一般来说以下 3 种情形拥有全局作用域。



参考资料

* [鸟哥:Javascript作用域原理](http://www.laruence.com/2009/05/28/863.html)
Expand Down
4 changes: 3 additions & 1 deletion static/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ nav{
}

/* index main */
.main{
min-height: 800px;
}
.post-area{

background-color:#f8f8fd;
Expand Down Expand Up @@ -204,7 +207,6 @@ footer{
line-height: 50px;
margin-top: 80px;
background: #3f4850;
display: none;
color: #aaa;
text-align: center;

Expand Down
4 changes: 2 additions & 2 deletions static/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ $(document).ready(function() {
* load方法,页面的加载完成后触发
* {fixFooterInit();} 固定Footer栏
*/
$(window).load(function() {
/*$(window).load(function() {
fixFooterInit();
});
});*/


/**
Expand Down

0 comments on commit 86fe73d

Please sign in to comment.