Skip to content

Commit baa55b7

Browse files
committed
add jqurey quickstart
1 parent 6eb7a0c commit baa55b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+14695
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# editorconfig.org
2+
root = true
3+
4+
[*]
5+
indent_style = space
6+
indent_size = 4
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
dist
3+
.tmp

.jshintrc

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"node": true,
3+
"browser": true,
4+
"esnext": true,
5+
"bitwise": true,
6+
"camelcase": true,
7+
"curly": true,
8+
"eqeqeq": true,
9+
"immed": true,
10+
"indent": 4,
11+
"newcap": true,
12+
"noarg": true,
13+
"quotmark": "single",
14+
"undef": true,
15+
"unused": "vars",
16+
"strict": true
17+
}

LICENSE

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2014 KISA
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
22+
23+
gulpfile.js
24+
===========
25+
26+
Web Starter Kit
27+
Copyright 2014 Google Inc. All rights reserved.
28+
29+
Licensed under the Apache License, Version 2.0 (the "License");
30+
you may not use this file except in compliance with the License.
31+
You may obtain a copy of the License at
32+
33+
http://www.apache.org/licenses/LICENSE-2.0
34+
35+
Unless required by applicable law or agreed to in writing, software
36+
distributed under the License is distributed on an "AS IS" BASIS,
37+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
38+
See the License for the specific language governing permissions and
39+
limitations under the License

app/favicon.ico

1.12 KB
Binary file not shown.

app/index.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<meta charset="utf-8">
5+
<title>Quckstart for jQuery</title>
6+
<meta name="description" content="">
7+
<link rel="shortcut icon" href="/favicon.ico">
8+
<link rel="stylesheet" href="styles/main.css">
9+
<link rel="stylesheet" href="bower_components/chosen/chosen.css">
10+
</head>
11+
<body>
12+
<div class="container">
13+
<div class="jumbotron">
14+
<h1 id="slogan">Hello, Quick start</h1>
15+
<p class="lead"></p>
16+
</div>
17+
<div class="row">
18+
<h4>Input box</h4>
19+
<input type="text" id="typing"></input>
20+
</div>
21+
<div class="row">
22+
<h4>Select with <a href="http://goo.gl/TgKzj">chosen</a> plugin</h4>
23+
<select class="chosen-select" data-placeholder="Select words..." style="width:350px;" tabindex="1">
24+
<option value=""></option>
25+
<option value="Hello">Hello</option>
26+
<option value="Quickstart">Quickstart</option>
27+
<option value="jQuery">jQuery</option>
28+
<option value="HTML5">HTML5</option>
29+
<option value="WebFrameworks">WebFrameworks</option>
30+
</select>
31+
</div>
32+
</div>
33+
34+
<script src="bower_components/jquery/dist/jquery.js"></script>
35+
<script src="bower_components/chosen/chosen.jquery.js"></script>
36+
<script src="scripts/main.js"></script>
37+
</body>
38+
</html>

app/scripts/main.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// Update slogan text by append method
2+
$('#slogan').append(' with jQuery').show();
3+
4+
// Update slogan text by chosen APIs
5+
$('.chosen-select').chosen().change(function (q, e) {
6+
$('#slogan').text(e.selected);
7+
});
8+
9+
// Update slogan text by input text
10+
$('#typing').keypress('keyup', function(e){
11+
if (e.which == 13) {
12+
$('#slogan').text(this.value);
13+
this.value = '';
14+
}
15+
});

app/styles/main.css

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
html, body {
2+
margin: 0;
3+
padding: 10px;
4+
font-family: "Helvetica Neue", "Helvetica", "Arial", "sans-serif";
5+
}
6+
7+
.container {
8+
padding-right: 15px;
9+
padding-left: 15px;
10+
padding-top: 15px;
11+
margin-right: auto;
12+
margin-left: auto;
13+
max-width: 730px;
14+
}
15+
16+
.jumbotron {
17+
padding-top: 48px;
18+
padding-bottom: 48px;
19+
padding-right: 64px;
20+
padding-left: 64px;
21+
margin-bottom: 30px;
22+
background-color: #eee;
23+
text-align: center;
24+
border-bottom: 1px solid #e5e5e5;
25+
border-radius: 6px;
26+
}
27+
28+
.row {
29+
margin: 30px 0;
30+
}
31+
32+
.row {
33+
position: relative;
34+
min-height: 1px;
35+
padding-right: 15px;
36+
padding-left: 15px;
37+
}
38+
39+
h4 {
40+
font-size: 18px;
41+
margin-top: 10px;
42+
margin-bottom: 10px;
43+
font-family: inherit;
44+
font-weight: 500;
45+
line-height: 1.1;
46+
color: inherit;
47+
}

bower.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"name": "quickstart-jquery",
3+
"private": true,
4+
"dependencies": {
5+
"jquery": "~2.1.1",
6+
"chosen": "https://github.com/harvesthq/chosen/releases/download/v1.1.0/chosen_v1.1.0.zip"
7+
}
8+
}

0 commit comments

Comments
 (0)