Skip to content

Commit 86fe73d

Browse files
committed
fix footer jump
1 parent d2a5f5b commit 86fe73d

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

_posts/2015-05-20-scope.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
---
22
layout: post
3-
title: "JavaScript作用域"
3+
title: "JavaScript 作用域和作用域链"
44
date: 2015-05-20 14:06:05
55
categories: Front-end JavaScript
6-
excerpt: JavaScript作用域学习笔记
6+
excerpt: JavaScript作用域和作用域链学习笔记
77
---
88

99
* content
1010
{:toc}
1111

12+
## JavaScript 作用域
13+
14+
作用域就是变量与函数的可访问范围。在JavaScript中,变量的作用域有全局作用域和局部作用域两种。
15+
16+
---
17+
18+
### 全局作用域(Global Scope)
19+
20+
在代码中任何地方都能访问到的对象拥有全局作用域,一般来说以下 3 种情形拥有全局作用域。
21+
22+
23+
1224
参考资料
1325

1426
* [鸟哥:Javascript作用域原理](http://www.laruence.com/2009/05/28/863.html)

static/css/index.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ nav{
6060
}
6161

6262
/* index main */
63+
.main{
64+
min-height: 800px;
65+
}
6366
.post-area{
6467

6568
background-color:#f8f8fd;
@@ -204,7 +207,6 @@ footer{
204207
line-height: 50px;
205208
margin-top: 80px;
206209
background: #3f4850;
207-
display: none;
208210
color: #aaa;
209211
text-align: center;
210212

static/js/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ $(document).ready(function() {
1212
* load方法,页面的加载完成后触发
1313
* {fixFooterInit();} 固定Footer栏
1414
*/
15-
$(window).load(function() {
15+
/*$(window).load(function() {
1616
fixFooterInit();
17-
});
17+
});*/
1818

1919

2020
/**

0 commit comments

Comments
 (0)