├── .gitignore
├── addr-selector
└── index.html
├── animate
└── parabola.html
├── barrellayout
├── index.html
├── pixabay-es6.html
└── pixabay.html
├── carousel
├── carousel-ajax-jquery.html
├── carousel-css3.html
├── carousel-fade-jquery.html
├── carousel-fullscreen.html
├── carousel-oop.html
├── carousel-slide-jquery-oop.html
├── carousel-slide-jquery.html
├── carousel-slide-zepto-mobile.html
└── js
│ ├── carousel-plain.html
│ ├── mock-min.js
│ └── zepto.min.js
├── css3
├── 3d-carousel.html
├── 3d-walk.html
├── bg.jpg
├── big-cover.html
├── css3-fade-carousel.html
├── dashbord.html
├── loading1.html
├── loading2.html
├── loading3.html
├── lyric.html
├── moving-cube.html
├── moving-cube2.html
├── test.html
└── typing.html
├── cv
├── cv.md
└── resume.html
├── datepicker
└── datepicker.html
├── demo-requirejs
├── build.js
├── dist
│ └── js
│ │ └── merge.js
├── imgs
│ ├── 1.jpg
│ ├── 2.jpg
│ ├── 3.jpg
│ ├── 4.jpg
│ ├── 5.jpg
│ ├── a1.jpg
│ ├── a10.jpg
│ ├── a11.jpg
│ ├── a12.jpg
│ ├── a2.jpg
│ ├── a3.jpg
│ ├── a4.jpg
│ ├── a5.jpg
│ ├── a6.jpg
│ ├── a7.jpg
│ ├── a8.jpg
│ ├── a9.jpg
│ └── blank.jpg
├── index.html
└── src
│ ├── css
│ ├── carousel.css
│ └── index.css
│ └── js
│ ├── app
│ ├── carousel.js
│ ├── event.js
│ ├── exposure.js
│ ├── gotop.js
│ ├── index.js
│ └── tab.js
│ ├── lib
│ └── bower_components
│ │ ├── jquery
│ │ ├── .bower.json
│ │ ├── MIT-LICENSE.txt
│ │ ├── bower.json
│ │ ├── dist
│ │ │ ├── jquery.js
│ │ │ ├── jquery.min.js
│ │ │ └── jquery.min.map
│ │ └── src
│ │ │ ├── ajax.js
│ │ │ ├── ajax
│ │ │ ├── jsonp.js
│ │ │ ├── load.js
│ │ │ ├── parseJSON.js
│ │ │ ├── parseXML.js
│ │ │ ├── script.js
│ │ │ ├── var
│ │ │ │ ├── nonce.js
│ │ │ │ └── rquery.js
│ │ │ └── xhr.js
│ │ │ ├── attributes.js
│ │ │ ├── attributes
│ │ │ ├── attr.js
│ │ │ ├── classes.js
│ │ │ ├── prop.js
│ │ │ ├── support.js
│ │ │ └── val.js
│ │ │ ├── callbacks.js
│ │ │ ├── core.js
│ │ │ ├── core
│ │ │ ├── access.js
│ │ │ ├── init.js
│ │ │ ├── parseHTML.js
│ │ │ ├── ready.js
│ │ │ └── var
│ │ │ │ └── rsingleTag.js
│ │ │ ├── css.js
│ │ │ ├── css
│ │ │ ├── addGetHookIf.js
│ │ │ ├── curCSS.js
│ │ │ ├── defaultDisplay.js
│ │ │ ├── hiddenVisibleSelectors.js
│ │ │ ├── support.js
│ │ │ ├── swap.js
│ │ │ └── var
│ │ │ │ ├── cssExpand.js
│ │ │ │ ├── getStyles.js
│ │ │ │ ├── isHidden.js
│ │ │ │ ├── rmargin.js
│ │ │ │ └── rnumnonpx.js
│ │ │ ├── data.js
│ │ │ ├── data
│ │ │ ├── Data.js
│ │ │ ├── accepts.js
│ │ │ └── var
│ │ │ │ ├── data_priv.js
│ │ │ │ └── data_user.js
│ │ │ ├── deferred.js
│ │ │ ├── deprecated.js
│ │ │ ├── dimensions.js
│ │ │ ├── effects.js
│ │ │ ├── effects
│ │ │ ├── Tween.js
│ │ │ └── animatedSelector.js
│ │ │ ├── event.js
│ │ │ ├── event
│ │ │ ├── ajax.js
│ │ │ ├── alias.js
│ │ │ └── support.js
│ │ │ ├── exports
│ │ │ ├── amd.js
│ │ │ └── global.js
│ │ │ ├── intro.js
│ │ │ ├── jquery.js
│ │ │ ├── manipulation.js
│ │ │ ├── manipulation
│ │ │ ├── _evalUrl.js
│ │ │ ├── support.js
│ │ │ └── var
│ │ │ │ └── rcheckableType.js
│ │ │ ├── offset.js
│ │ │ ├── outro.js
│ │ │ ├── queue.js
│ │ │ ├── queue
│ │ │ └── delay.js
│ │ │ ├── selector-native.js
│ │ │ ├── selector-sizzle.js
│ │ │ ├── selector.js
│ │ │ ├── serialize.js
│ │ │ ├── sizzle
│ │ │ └── dist
│ │ │ │ ├── sizzle.js
│ │ │ │ ├── sizzle.min.js
│ │ │ │ └── sizzle.min.map
│ │ │ ├── traversing.js
│ │ │ ├── traversing
│ │ │ ├── findFilter.js
│ │ │ └── var
│ │ │ │ └── rneedsContext.js
│ │ │ ├── var
│ │ │ ├── arr.js
│ │ │ ├── class2type.js
│ │ │ ├── concat.js
│ │ │ ├── hasOwn.js
│ │ │ ├── indexOf.js
│ │ │ ├── pnum.js
│ │ │ ├── push.js
│ │ │ ├── rnotwhite.js
│ │ │ ├── slice.js
│ │ │ ├── strundefined.js
│ │ │ ├── support.js
│ │ │ └── toString.js
│ │ │ └── wrap.js
│ │ └── requirejs
│ │ ├── .bower.json
│ │ ├── README.md
│ │ ├── bower.json
│ │ └── require.js
│ └── main.js
├── demo-webpack
├── doubanmovie
│ ├── dist
│ │ ├── index.bundle.js
│ │ └── index.html
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ │ ├── helpers
│ │ │ └── util.js
│ │ ├── index.js
│ │ ├── search
│ │ │ ├── index.js
│ │ │ └── style.css
│ │ ├── top250
│ │ │ ├── index.js
│ │ │ └── style.css
│ │ └── usbox
│ │ │ ├── index.js
│ │ │ └── style.css
│ └── webpack.config.js
└── webpack-demo
│ ├── dist
│ ├── app.bundle.js
│ ├── bundle.js
│ ├── cd0bb358c45b584743d8ce4991777c42.svg
│ ├── index.html
│ └── print.bundle.js
│ ├── package-lock.json
│ ├── package.json
│ ├── src
│ ├── index.js
│ ├── logo.svg
│ ├── print.js
│ └── style.css
│ └── webpack.config.js
├── dialog
├── modal-jquery.html
└── muti-modal-jquery.html
├── exposure
└── expourse-basic.html
├── fm
├── task1.html
├── task2.html
├── task3.html
└── task3
│ ├── package.json
│ └── readme.md
├── gotop
└── jquery-gotop.html
├── http
├── demo1
│ └── server.js
└── demo2
│ └── server.js
├── lazyimg
└── jquery-lazyload-img.html
├── logo.svg
├── notification
└── index.html
├── pagination
├── comments.ejs
├── index.html
└── router.js
├── postmessage
├── a.html
└── b.html
├── projects
├── appstore
│ ├── css
│ │ └── recommend.css
│ ├── imgs
│ │ ├── 1_spec.png
│ │ ├── head-app-1-small.png
│ │ ├── head-app-1.png
│ │ ├── head-app-2-small.png
│ │ ├── head-app-3-small.png
│ │ ├── icon-app-big-1.png
│ │ ├── icon-app1.png
│ │ └── icon-app2.png
│ └── recommend.html
├── demos
│ ├── css
│ │ ├── code.css
│ │ ├── demo1.css
│ │ ├── demo2.css
│ │ ├── markdown.css
│ │ └── modal.css
│ ├── demo.html
│ ├── demo1.html
│ ├── demo2.html
│ ├── font
│ │ ├── iconfont.css
│ │ ├── iconfont.eot
│ │ ├── iconfont.svg
│ │ ├── iconfont.ttf
│ │ └── iconfont.woff
│ └── js
│ │ └── modal.js
├── doubanmovie-requirejs
│ ├── dist
│ │ └── js
│ │ │ └── merge.js
│ ├── imgs
│ │ ├── 1.jpg
│ │ ├── 2.jpg
│ │ ├── 3.jpg
│ │ ├── 4.jpg
│ │ ├── 5.jpg
│ │ ├── a1.jpg
│ │ ├── a10.jpg
│ │ ├── a11.jpg
│ │ ├── a12.jpg
│ │ ├── a2.jpg
│ │ ├── a3.jpg
│ │ ├── a4.jpg
│ │ ├── a5.jpg
│ │ ├── a6.jpg
│ │ ├── a7.jpg
│ │ ├── a8.jpg
│ │ ├── a9.jpg
│ │ └── blank.jpg
│ ├── index.html
│ └── src
│ │ └── js
│ │ ├── app.js
│ │ ├── helper.js
│ │ ├── jquery.js
│ │ ├── main.js
│ │ ├── search.js
│ │ ├── top250.js
│ │ └── usbox.js
├── doubanmovie
│ ├── bad.html
│ ├── index.html
│ └── teach.html
├── effects
│ └── snow.html
├── image-bed
│ ├── css
│ │ └── index.css
│ ├── fonts
│ │ ├── iconfont.css
│ │ ├── iconfont.eot
│ │ ├── iconfont.svg
│ │ ├── iconfont.ttf
│ │ ├── iconfont.woff
│ │ └── iconfont.woff2
│ ├── imgs
│ │ └── logo.svg
│ └── index.html
├── img-bed2
│ ├── css
│ │ └── index.css
│ ├── fonts
│ │ ├── iconfont.css
│ │ ├── iconfont.eot
│ │ ├── iconfont.svg
│ │ ├── iconfont.ttf
│ │ ├── iconfont.woff
│ │ └── iconfont.woff2
│ ├── imgs
│ │ └── logo.svg
│ └── index.html
├── jianshu
│ ├── css
│ │ ├── common.css
│ │ ├── font-awesome.min.css
│ │ ├── index.css
│ │ └── ui.css
│ ├── fonts
│ │ ├── FontAwesome.otf
│ │ ├── fontawesome-webfont.eot
│ │ ├── fontawesome-webfont.svg
│ │ ├── fontawesome-webfont.ttf
│ │ ├── fontawesome-webfont.woff
│ │ └── fontawesome-webfont.woff2
│ ├── index.html
│ ├── slides.md
│ ├── ui.html
│ └── www
│ │ └── slides.html
├── loadmore
│ ├── index.html
│ └── server.js
├── meituan
│ ├── index.css
│ └── index.html
├── music
│ ├── index.html
│ ├── index2.html
│ ├── music.css
│ └── music.js
├── sinanews
│ └── index.html
├── stickynotes
│ ├── css
│ │ ├── origin.css
│ │ ├── style.css
│ │ └── style.styl
│ ├── gulpfile.js
│ ├── index.html
│ ├── less
│ │ └── style.less
│ └── package.json
├── task15
│ ├── css
│ │ ├── font-awesome.css
│ │ ├── font-awesome.min.css
│ │ └── index.css
│ ├── fonts
│ │ ├── FontAwesome.otf
│ │ ├── fontawesome-webfont.eot
│ │ ├── fontawesome-webfont.svg
│ │ ├── fontawesome-webfont.ttf
│ │ ├── fontawesome-webfont.woff
│ │ └── fontawesome-webfont.woff2
│ ├── imgs
│ │ └── bg.jpg
│ └── index.html
└── weather
│ ├── css
│ ├── common.css
│ └── index.css
│ ├── index.html
│ └── js
│ └── index.js
├── promise
├── index.html
├── index2.html
├── promise.js
└── test
│ ├── a.txt
│ ├── b.txt
│ ├── c.txt
│ └── index.js
├── stickup
├── stickup-jquery.html
├── stickup-plugin.html
└── stickup2-jquery.html
├── tab
├── tab-basic-object.html
├── tab-basic.html
├── tab-jquery-plugin-extend.html
├── tab-jquery-plugin.html
└── tab-jquery.html
├── timeline
├── css
│ └── index.css
├── demo.html
├── index.html
├── js
│ └── index.js
└── note.md
├── tree
├── .router.js
├── index.html
└── router.js
├── util
├── util-test.html
└── util.js
├── virtual-dom
├── index.html
├── package.json
├── v-dom-es6.js
└── virtualdom.js
├── vue
└── Calendar-component
│ └── index.html
└── waterfall
├── data.txt
├── js
├── expourse.js
└── waterfall.js
├── water-basic.html
├── waterfull-lazyload-ajax.html
└── waterfull-lazyload-ajax2.html
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 |
6 | # Runtime data
7 | pids
8 | *.pid
9 | *.seed
10 |
11 | # Directory for instrumented libs generated by jscoverage/JSCover
12 | lib-cov
13 |
14 | # Coverage directory used by tools like istanbul
15 | coverage
16 |
17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
18 | .grunt
19 |
20 | # node-waf configuration
21 | .lock-wscript
22 |
23 | # Compiled binary addons (http://nodejs.org/api/addons.html)
24 | build/Release
25 |
26 | # Dependency directory
27 | node_modules
28 |
29 | # Optional npm cache directory
30 | .npm
31 |
32 | # Optional REPL history
33 | .node_repl_history
34 | .DS_Store
--------------------------------------------------------------------------------
/animate/parabola.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 抛物线
6 |
18 |
19 |
20 |
21 |
69 |
70 |
--------------------------------------------------------------------------------
/css3/bg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/css3/bg.jpg
--------------------------------------------------------------------------------
/css3/big-cover.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | JS Bin
6 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/css3/css3-fade-carousel.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | html5 css3
6 |
63 |
64 |
65 |
66 |
67 |
68 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/css3/loading1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
html5 css3
6 |
68 |
69 |
70 |
71 |
72 | loading....
73 |
74 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/css3/loading2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
html5 css3
6 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/css3/loading3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
loading
6 |
48 |
49 |
50 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/css3/lyric.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
打字机
6 |
7 |
30 |
31 |
32 |
躺在你学校的操场看星空
33 |
34 |
--------------------------------------------------------------------------------
/css3/moving-cube.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
cube
7 |
80 |
81 |
82 |
83 |
84 |
85 | 1
86 | 2
87 | 3
88 | 4
89 | 5
90 | 6
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/css3/test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Document
6 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/css3/typing.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
歌词效果
6 |
7 |
39 |
40 |
41 |
42 |
躺在你学校的操场看星空
43 |
躺在你学校的操场看星空
44 |
45 |
46 |
--------------------------------------------------------------------------------
/cv/cv.md:
--------------------------------------------------------------------------------
1 |
2 | > 以下简历只是根据课堂学习写的范例,大家只可做为参考,不可完全拷贝
3 | > 写到页面上的内容必须自己真正理解透彻、并且动手实践,否则有可能弄巧成拙
4 |
5 | # 小饥
6 |
7 | 应聘职位:Web前端开发工程师
8 |
9 | 性别:xx
10 |
11 | 年纪:xx
12 |
13 | 微信:xxx
14 |
15 | 邮箱:[xxx@jirengu.com](xxx@jirengu.com)
16 |
17 | 手机:(+86) 170 1234 5678
18 |
19 | Github: [https://github.com/xxx]()
20 |
21 | 个人博客: [http://xxx.github.io]()
22 |
23 | ## 教育背景
24 |
25 | - **xx大学硕士** —— xx专业—— 2013.09 ~ 2016.03
26 | - 主修课程:C++、Java、数据结构..., xx 奖学金、xx 三号学生、xx 奖励、专业前 xx
27 |
28 | - **xx大学本科** —— xx专业—— 2009.09 ~ 2013.06
29 | - 主修课程:。xx 奖学金、xx 三号学生、xx 奖励、专业前 xx
30 |
31 | ## 擅长技能
32 |
33 | * 熟悉HTML(5)/CSS(3),掌握浮动、定位、盒模型、BFC 等CSS核心概念,掌握常见布局方式,对代码可读性、规范性、语义化有一定认识,对CSS 兼容有一定经验,能熟练开发符合W3C规范的常见页面。
34 | * 熟悉原生JavaScript的使用,掌握事件模型、DOM 操作、Ajax、JSONP、跨域、闭包、原型链、继承等相关概念的原理和使用方法,能使用原生JS 封装通用函数库,实现诸如轮播、Tab 切换卡、懒加载、Dialog、表单验证、Ajax 等常见效果
35 | * 熟练jQuery的使用,熟练使用 jQuery 开发常见页面的效果,能够将常见效果封装成 jQuery 插件
36 | * 对设计模式、编写可复用代码方面有一定经验,可对诸如轮播、Tab 切换卡、懒加载、Dialog等常见效果实现组件化封装
37 | * 熟悉 Git、Sublime、Vim 等前端相关工具的使用
38 | * 对前端工程化、模块化有一定认识,能使用 RequireJS 实现模块化开发,能使用 NPM、Gulp 打造基本的自动化流程
39 | * 对前端性能优化有相关经验
40 | * 熟悉常用Linux 常用命令与配置,能编写简单的bash脚本;
41 | * 熟悉互联网产品流程、前端开发流程、前后端协同开发流程
42 | * 对 backbone,less,sass,node 等有一定了解
43 | * 超强的自学能力、对前端深厚的兴趣、毅力
44 |
45 |
46 | ## 工作经历
47 |
48 | **xx公司**
49 |
50 | 前端开发工程师 —— 2014.07 ~ 2014.09
51 |
52 | - 网站的地址是什么,做的什么可以写的更具体一些`
53 | - 如果和前端一点不沾边,可以写在工作中因机缘巧合接触到前端开发,把这份工作经历一笔带过放到不起眼的位置即可
54 |
55 | ## 实习经历
56 |
57 | **xx公司**
58 |
59 | 前端开发实习生 —— 2014.07 ~ 2014.09
60 |
61 | - 网站的地址是什么,做的什么可以写的更具体一些`
62 | - 如果和前端一点不沾边,可以写在工作中因机缘巧合接触到前端开发
63 |
64 |
65 |
66 |
67 |
68 | ## 项目经历
69 | - 学校项目(应届生)
70 | - 在校相关的项目,获了什么奖,和数学相关、和计算机相关都行,主要是在校的表现,如果没有可以不写
71 |
72 | - 工作项目或者自己完成的稍微大一些的项目
73 |
74 | - 封装的 Util 函数库,包括常见的 dom 操作、事件兼容、ajax 封装
75 | - [GitHub 地址]()
76 | - 原生 JS 实现的常见效果,包括轮播、弹窗、事件中心、tab、分页等
77 | - [GitHub 地址](), [查看 Demo]()
78 | - 封装的JQuery 插件,包括轮播、懒加载等
79 | - [GitHub 地址](), [查看 Demo]()
80 | - 封装的常见组件,包括轮播、日历、曝光加载、瀑布流布局等
81 | - [GitHub 地址](), [查看 Demo]()
82 | - 移动端切页
83 | - 微信常见的全屏滑动切页效果
84 | - [效果地址](), GitHub代码地址
85 |
86 | - Hexo + Github搭建的[个人博客]()
87 | - 学习前端心路历程的详细记录
88 |
89 | - 个人作品展示页
90 | - 线上地址:xxxx, GitHub 地址
91 | - 使用 requireJS 作为模块化工具,使用 r.js 作为js打包工具,使用 gulp 作为 HTML、CSS构建工具,可实现自动化打包、一键部署等功能。
92 | - 作品页使用的轮播组件、回到顶部组件、分页组件、懒加载组件、Tab 组件、弹窗组件均为自己实现
93 |
94 |
95 |
96 |
97 | ## 兴趣爱好
98 |
99 | * 英语六级,xx分,能流畅阅读以及翻译英文专业书籍、文档及其他英文资料,参与教程 javascript.info 的部分翻译
100 | * 浪迹于github、stack overflow、quora、segmentfault、知乎等国内外程序员知识社区
101 | * 爱篮球、看电影、dota
102 |
103 |
104 |
--------------------------------------------------------------------------------
/demo-requirejs/build.js:
--------------------------------------------------------------------------------
1 | ({
2 | baseUrl: "./src/js/app",
3 | paths: {
4 | 'jquery': '../lib/bower_components/jquery/dist/jquery.min',
5 | 'main': '../main'
6 | },
7 | name: "main",
8 | out: "dist/js/merge.js"
9 | })
--------------------------------------------------------------------------------
/demo-requirejs/imgs/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/1.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/2.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/3.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/4.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/5.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a1.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a10.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a11.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a11.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a12.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a12.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a2.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a3.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a4.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a5.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a6.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a7.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a8.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/a9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/a9.jpg
--------------------------------------------------------------------------------
/demo-requirejs/imgs/blank.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/jirengu-inc/js-works/ac7d5675faf74ba01f13e38efe5e0d3b9306997b/demo-requirejs/imgs/blank.jpg
--------------------------------------------------------------------------------
/demo-requirejs/src/css/carousel.css:
--------------------------------------------------------------------------------
1 | .carousel {
2 | position: relative;
3 | width: 100%;
4 | height: 100%;
5 | overflow: hidden;
6 | }
7 |
8 | .carousel ul,
9 | .carousel li{
10 | margin: 0;
11 | padding: 0;
12 | list-style: none;
13 | height: 100%;
14 | }
15 |
16 | .carousel .img-ct {
17 | position: absolute;
18 | overflow: hidden;
19 | }
20 | .carousel .img-ct>li {
21 | float: left;
22 | width: 100%;
23 | height: 100%;
24 | background-size: cover;
25 | background-position: center center;
26 | }
27 |
28 |
29 | .carousel .arrow {
30 | position: absolute;
31 | top: 50%;
32 | margin-top: -15px;
33 | display: inline-block;
34 | width: 30px;
35 | height: 30px;
36 | border-radius: 50%;
37 | border: 1px solid #fff;
38 | line-height: 30px;
39 | color: #fff;
40 | text-align: center;
41 | text-decoration: none;
42 | }
43 | .carousel .arrow:hover {
44 | opacity: 0.8;
45 | }
46 | .carousel .pre {
47 | left: 10px;
48 | }
49 |
50 | .carousel .next {
51 | right: 10px;
52 | }
53 |
54 | .carousel .bullet {
55 | position: absolute;
56 | bottom: 10px;
57 | width: 100%;
58 | font-size: 0;
59 | z-index: 1;
60 | text-align: center;
61 | }
62 | .carousel .bullet >li{
63 | display: inline-block;
64 | width: 30px;
65 | height: 5px;
66 | border: 1px solid #ccc;
67 | border-radius: 4px;
68 | margin: 0 3px;
69 | cursor: pointer;
70 | }
71 | .carousel .bullet >li.active{
72 | background-color: #ccc;
73 | }
74 |
--------------------------------------------------------------------------------
/demo-requirejs/src/css/index.css:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 | /**
3 | *
4 | * @authors hunger (hunger@jirengu.com)
5 | * @date 2015-10-21 18:48:30
6 | * @version $Id$
7 | */
8 |
9 | html,body,ul,li{
10 | margin: 0;
11 | padding: 0;
12 | }
13 | ul,li{
14 | list-style: none;
15 | }
16 |
17 | html,body{
18 | height: 100%;
19 | }
20 | #header{
21 | height: 50%
22 | }
23 |
24 |
25 | .layout{
26 | width: 1000px;
27 | margin: 0 auto;
28 | }
29 |
30 |
31 | #jrg-gotop{
32 | width: 32px;
33 | cursor: pointer;
34 | border: 1px solid #ccc;
35 | padding: 10px;
36 | }
37 |
38 |
39 |
40 | .intro p {
41 | text-align: center;
42 | font-size: 40px;
43 | margin: 20px;
44 | color: #E0983B;
45 | }
46 |
47 | .img-cells{
48 | margin-top: 30px;
49 | margin-bottom: 60px;
50 | }
51 | .img-cells ul{
52 | margin-left: -20px;
53 | }
54 | .img-cells li{
55 | float: left;
56 | margin-left: 20px;
57 | margin-top: 20px;
58 | }
59 |
60 | .img-cells li img{
61 | width: 320px;
62 | }
--------------------------------------------------------------------------------
/demo-requirejs/src/js/app/event.js:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * @authors hunger (hunger@jirengu.com)
4 | * @date 2015-10-21 17:43:39
5 | * @version $Id$
6 | */
7 |
8 | define(function(){
9 |
10 | var EventCenter = (function(){
11 |
12 | var events = {};
13 |
14 | function on(evt, handler){
15 | events[evt] = events[evt] || [];
16 |
17 |
18 | /**
19 | * events = {
20 | * 'text-change': []
21 | *
22 | * }
23 | *
24 | */
25 |
26 |
27 | events[evt].push({
28 | handler: handler
29 | });
30 |
31 | /**
32 | * events = {
33 | * 'text-change': [ { handler: function(data){console.log(data) } } ]
34 | *
35 | * }
36 | *
37 | */
38 | }
39 |
40 | function fire(evt, args){
41 | if(!events[evt]){
42 | return;
43 | }
44 | for(var i=0; i
回到顶部 ');
22 | $('body').append(this.$el);
23 | } else {
24 | this.$el = $el;
25 | }
26 | this.$c = $(document);
27 |
28 | this.bind();
29 | },
30 |
31 | bind: function() {
32 | var me = this;
33 |
34 | this.$el.on('click', function() {
35 | me.goToTop();
36 | });
37 |
38 | this.$c.on('scroll', function(){
39 | me.scroll();
40 | });
41 | },
42 |
43 | goToTop: function() {
44 | this.$c.scrollTop(0);
45 | },
46 |
47 | scroll: function(e) {
48 | var scrollTop = this.$c.scrollTop();
49 | if (scrollTop > 100) {
50 | this.$el.show();
51 | } else {
52 | this.$el.hide();
53 | }
54 | }
55 | };
56 |
57 | //new goTop();
58 |
59 |
60 | return goTop;
61 | });
--------------------------------------------------------------------------------
/demo-requirejs/src/js/app/index.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 首页功能
3 | */
4 |
5 | //define(id, ['jquery'], function($){ $('') })
6 | //
7 | //
8 | //CMD
9 | // define(function(require, exports, module){
10 | // var jQuery = require('jquery');
11 | // var GoTop = require('com/gotop');
12 | // console.log(GoTop)
13 |
14 | // new GoTop();
15 | // })
16 |
17 | //AMD
18 |
19 | // define(function(require){
20 | // var $ = require('jquery')
21 | // var Event = require('event')
22 | // return 123
23 |
24 | // })
25 |
26 |
27 |
28 |
29 | define(['jquery','gotop', 'event', 'carousel', 'exposure'], function($, GoTop, Event, Carousel, Exposure) {
30 |
31 |
32 |
33 | new GoTop();
34 | new Carousel($('.carousel'))
35 |
36 | var colors = ['#dfdfdc', '#142829', '#2b2e41', '#172838']
37 | var msgs = ['兴趣很重要', '踏实很重要', '思考很重要', '动手很重要']
38 |
39 | Event.on('carousel:play', function(idx) {
40 | $('body').css('background-color', colors[idx])
41 | $('.intro p').text(msgs[idx])
42 | })
43 |
44 |
45 |
46 | Exposure.one($('.img-cells img'), function(){
47 | var $this = $(this);
48 | $this.attr('src', $this.attr('data-src'));
49 | })
50 |
51 |
52 | });
--------------------------------------------------------------------------------
/demo-requirejs/src/js/app/tab.js:
--------------------------------------------------------------------------------
1 | /**
2 | * tab.js
3 | * @authors hunger (hunger@jirengu.com)
4 | * @date 2015-10-21 17:15:29
5 | * @version $Id$
6 | */
7 |
8 | /*
9 |
10 | html
11 | ------------------------
12 |
13 |
21 |
22 | js
23 | --------------------------
24 | Tab.init($('.tab'), function($panel){
25 | dealWith($panel);
26 | });
27 |
28 | */
29 |
30 | define(function(require) {
31 |
32 | var $ = require('jquery');
33 |
34 | var Tab = (function() {
35 |
36 | var tabList = [];
37 |
38 |
39 | function init($tab, handler) {
40 | $tab.each(function() {
41 | var $cal = $(this);
42 | if ($cal.hasClass('init')) {
43 | return;
44 | }
45 | tabList.push(new Tab($cal, handler));
46 | $cal.addClass('init');
47 | });
48 |
49 | }
50 |
51 | function _Tab($tab, handler) {
52 | this.$tab = $tab;
53 | this.$lis = $tab.find('li');
54 | this.$panels = $tab.find('.panel');
55 | this.handler = handler;
56 | this.bind();
57 | handler && handler(this.$panels.eq(0));
58 | }
59 |
60 | _Tab.prototype = {
61 |
62 | bind: function() {
63 | var me = this;
64 | this.$lis.on('click', function() {
65 | var index = $(this).index();
66 | me.$lis.removeClass('active');
67 | me.$lis.eq(index).addClass('active');
68 |
69 | me.$panels.removeClass('active');
70 | me.$panels.eq(index).addClass('active');
71 |
72 | me.handler && me.handler(me.$panels.eq(index));
73 | });
74 | },
75 |
76 |
77 | };
78 |
79 |
80 | return {
81 | init: init
82 | };
83 |
84 | })();
85 |
86 | return Tab;
87 | });
--------------------------------------------------------------------------------
/demo-requirejs/src/js/lib/bower_components/jquery/.bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery",
3 | "version": "2.1.4",
4 | "main": "dist/jquery.js",
5 | "license": "MIT",
6 | "ignore": [
7 | "**/.*",
8 | "build",
9 | "dist/cdn",
10 | "speed",
11 | "test",
12 | "*.md",
13 | "AUTHORS.txt",
14 | "Gruntfile.js",
15 | "package.json"
16 | ],
17 | "devDependencies": {
18 | "sizzle": "2.1.1-jquery.2.1.2",
19 | "requirejs": "2.1.10",
20 | "qunit": "1.14.0",
21 | "sinon": "1.8.1"
22 | },
23 | "keywords": [
24 | "jquery",
25 | "javascript",
26 | "library"
27 | ],
28 | "homepage": "https://github.com/jquery/jquery",
29 | "_release": "2.1.4",
30 | "_resolution": {
31 | "type": "version",
32 | "tag": "2.1.4",
33 | "commit": "7751e69b615c6eca6f783a81e292a55725af6b85"
34 | },
35 | "_source": "git://github.com/jquery/jquery.git",
36 | "_target": "~2.1.4",
37 | "_originalSource": "jquery",
38 | "_direct": true
39 | }
--------------------------------------------------------------------------------
/demo-requirejs/src/js/lib/bower_components/jquery/MIT-LICENSE.txt:
--------------------------------------------------------------------------------
1 | Copyright 2014 jQuery Foundation and other contributors
2 | http://jquery.com/
3 |
4 | Permission is hereby granted, free of charge, to any person obtaining
5 | a copy of this software and associated documentation files (the
6 | "Software"), to deal in the Software without restriction, including
7 | without limitation the rights to use, copy, modify, merge, publish,
8 | distribute, sublicense, and/or sell copies of the Software, and to
9 | permit persons to whom the Software is furnished to do so, subject to
10 | the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be
13 | included in all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/demo-requirejs/src/js/lib/bower_components/jquery/bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jquery",
3 | "version": "2.1.4",
4 | "main": "dist/jquery.js",
5 | "license": "MIT",
6 | "ignore": [
7 | "**/.*",
8 | "build",
9 | "dist/cdn",
10 | "speed",
11 | "test",
12 | "*.md",
13 | "AUTHORS.txt",
14 | "Gruntfile.js",
15 | "package.json"
16 | ],
17 | "devDependencies": {
18 | "sizzle": "2.1.1-jquery.2.1.2",
19 | "requirejs": "2.1.10",
20 | "qunit": "1.14.0",
21 | "sinon": "1.8.1"
22 | },
23 | "keywords": [
24 | "jquery",
25 | "javascript",
26 | "library"
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/demo-requirejs/src/js/lib/bower_components/jquery/src/ajax/jsonp.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "./var/nonce",
4 | "./var/rquery",
5 | "../ajax"
6 | ], function( jQuery, nonce, rquery ) {
7 |
8 | var oldCallbacks = [],
9 | rjsonp = /(=)\?(?=&|$)|\?\?/;
10 |
11 | // Default jsonp settings
12 | jQuery.ajaxSetup({
13 | jsonp: "callback",
14 | jsonpCallback: function() {
15 | var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) );
16 | this[ callback ] = true;
17 | return callback;
18 | }
19 | });
20 |
21 | // Detect, normalize options and install callbacks for jsonp requests
22 | jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
23 |
24 | var callbackName, overwritten, responseContainer,
25 | jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
26 | "url" :
27 | typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
28 | );
29 |
30 | // Handle iff the expected data type is "jsonp" or we have a parameter to set
31 | if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
32 |
33 | // Get callback name, remembering preexisting value associated with it
34 | callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
35 | s.jsonpCallback() :
36 | s.jsonpCallback;
37 |
38 | // Insert callback into url or form data
39 | if ( jsonProp ) {
40 | s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
41 | } else if ( s.jsonp !== false ) {
42 | s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
43 | }
44 |
45 | // Use data converter to retrieve json after script execution
46 | s.converters["script json"] = function() {
47 | if ( !responseContainer ) {
48 | jQuery.error( callbackName + " was not called" );
49 | }
50 | return responseContainer[ 0 ];
51 | };
52 |
53 | // force json dataType
54 | s.dataTypes[ 0 ] = "json";
55 |
56 | // Install callback
57 | overwritten = window[ callbackName ];
58 | window[ callbackName ] = function() {
59 | responseContainer = arguments;
60 | };
61 |
62 | // Clean-up function (fires after converters)
63 | jqXHR.always(function() {
64 | // Restore preexisting value
65 | window[ callbackName ] = overwritten;
66 |
67 | // Save back as free
68 | if ( s[ callbackName ] ) {
69 | // make sure that re-using the options doesn't screw things around
70 | s.jsonpCallback = originalSettings.jsonpCallback;
71 |
72 | // save the callback name for future use
73 | oldCallbacks.push( callbackName );
74 | }
75 |
76 | // Call if it was a function and we have a response
77 | if ( responseContainer && jQuery.isFunction( overwritten ) ) {
78 | overwritten( responseContainer[ 0 ] );
79 | }
80 |
81 | responseContainer = overwritten = undefined;
82 | });
83 |
84 | // Delegate to script
85 | return "script";
86 | }
87 | });
88 |
89 | });
90 |
--------------------------------------------------------------------------------
/demo-requirejs/src/js/lib/bower_components/jquery/src/ajax/load.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../core/parseHTML",
4 | "../ajax",
5 | "../traversing",
6 | "../manipulation",
7 | "../selector",
8 | // Optional event/alias dependency
9 | "../event/alias"
10 | ], function( jQuery ) {
11 |
12 | // Keep a copy of the old load method
13 | var _load = jQuery.fn.load;
14 |
15 | /**
16 | * Load a url into a page
17 | */
18 | jQuery.fn.load = function( url, params, callback ) {
19 | if ( typeof url !== "string" && _load ) {
20 | return _load.apply( this, arguments );
21 | }
22 |
23 | var selector, type, response,
24 | self = this,
25 | off = url.indexOf(" ");
26 |
27 | if ( off >= 0 ) {
28 | selector = jQuery.trim( url.slice( off ) );
29 | url = url.slice( 0, off );
30 | }
31 |
32 | // If it's a function
33 | if ( jQuery.isFunction( params ) ) {
34 |
35 | // We assume that it's the callback
36 | callback = params;
37 | params = undefined;
38 |
39 | // Otherwise, build a param string
40 | } else if ( params && typeof params === "object" ) {
41 | type = "POST";
42 | }
43 |
44 | // If we have elements to modify, make the request
45 | if ( self.length > 0 ) {
46 | jQuery.ajax({
47 | url: url,
48 |
49 | // if "type" variable is undefined, then "GET" method will be used
50 | type: type,
51 | dataType: "html",
52 | data: params
53 | }).done(function( responseText ) {
54 |
55 | // Save response for use in complete callback
56 | response = arguments;
57 |
58 | self.html( selector ?
59 |
60 | // If a selector was specified, locate the right elements in a dummy div
61 | // Exclude scripts to avoid IE 'Permission Denied' errors
62 | jQuery("").append( jQuery.parseHTML( responseText ) ).find( selector ) :
63 |
64 | // Otherwise use the full result
65 | responseText );
66 |
67 | }).complete( callback && function( jqXHR, status ) {
68 | self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
69 | });
70 | }
71 |
72 | return this;
73 | };
74 |
75 | });
76 |
--------------------------------------------------------------------------------
/demo-requirejs/src/js/lib/bower_components/jquery/src/ajax/parseJSON.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // Support: Android 2.3
6 | // Workaround failure to string-cast null input
7 | jQuery.parseJSON = function( data ) {
8 | return JSON.parse( data + "" );
9 | };
10 |
11 | return jQuery.parseJSON;
12 |
13 | });
14 |
--------------------------------------------------------------------------------
/demo-requirejs/src/js/lib/bower_components/jquery/src/ajax/parseXML.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core"
3 | ], function( jQuery ) {
4 |
5 | // Cross-browser xml parsing
6 | jQuery.parseXML = function( data ) {
7 | var xml, tmp;
8 | if ( !data || typeof data !== "string" ) {
9 | return null;
10 | }
11 |
12 | // Support: IE9
13 | try {
14 | tmp = new DOMParser();
15 | xml = tmp.parseFromString( data, "text/xml" );
16 | } catch ( e ) {
17 | xml = undefined;
18 | }
19 |
20 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
21 | jQuery.error( "Invalid XML: " + data );
22 | }
23 | return xml;
24 | };
25 |
26 | return jQuery.parseXML;
27 |
28 | });
29 |
--------------------------------------------------------------------------------
/demo-requirejs/src/js/lib/bower_components/jquery/src/ajax/script.js:
--------------------------------------------------------------------------------
1 | define([
2 | "../core",
3 | "../ajax"
4 | ], function( jQuery ) {
5 |
6 | // Install script dataType
7 | jQuery.ajaxSetup({
8 | accepts: {
9 | script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
10 | },
11 | contents: {
12 | script: /(?:java|ecma)script/
13 | },
14 | converters: {
15 | "text script": function( text ) {
16 | jQuery.globalEval( text );
17 | return text;
18 | }
19 | }
20 | });
21 |
22 | // Handle cache's special case and crossDomain
23 | jQuery.ajaxPrefilter( "script", function( s ) {
24 | if ( s.cache === undefined ) {
25 | s.cache = false;
26 | }
27 | if ( s.crossDomain ) {
28 | s.type = "GET";
29 | }
30 | });
31 |
32 | // Bind script tag hack transport
33 | jQuery.ajaxTransport( "script", function( s ) {
34 | // This transport only deals with cross domain requests
35 | if ( s.crossDomain ) {
36 | var script, callback;
37 | return {
38 | send: function( _, complete ) {
39 | script = jQuery("