teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

2

誤字

2017/05/04 17:57

投稿

terry3
terry3

スコア30

title CHANGED
File without changes
body CHANGED
@@ -22,7 +22,7 @@
22
22
  </div>
23
23
  <div role="main" class="main">
24
24
  <div id="change">色を変える</div>
25
- <p class="oppai">ああああ</p>
25
+ <p class="color">ああああ</p>
26
26
  </div>
27
27
 
28
28
  <footer data-role="footer" data-position="fixed">

1

コードを載せました

2017/05/04 17:57

投稿

terry3
terry3

スコア30

title CHANGED
File without changes
body CHANGED
@@ -1,13 +1,63 @@
1
1
  ###前提・実現したいこと
2
2
  jQuery.mobile を書きたいが「.js」ファイルになんと書き出せばいいのかわからない。(クッリク機能などは理解しています)。
3
3
  ###発生している問題・エラーメッセージ
4
- JSファイルに
4
+ ```html
5
+ <!DOCTYPE html>
5
- $(function(){
6
+ <html>
7
+ <head>
8
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
9
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
10
+ <meta name="format-detection" content="telephone=no">
11
+ <meta name="msapplication-tap-highlight" content="no">
12
+ <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
13
+ <link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css" />
14
+ <link rel="stylesheet" type="text/css" href="css/index.css">
15
+ <title>BlankCordovaApp1</title>
16
+ </head>
17
+ <body>
18
+ <div data-role="page" id="page1">
19
+ <div data-role="header" class="header">
20
+ <h1 id="app-title">App</h1>
21
+ <a href="/" class="home" rel="external">Home</a>
22
+ </div>
23
+ <div role="main" class="main">
24
+ <div id="change">色を変える</div>
25
+ <p class="oppai">ああああ</p>
26
+ </div>
6
27
 
28
+ <footer data-role="footer" data-position="fixed">
29
+ <h4>Demo</h4>
30
+ </footer>
31
+ </div>
32
+
33
+ <script type="text/javascript" src="cordova.js"></script>
34
+ <script type="text/javascript" src="scripts/platformOverrides.js"></script>
35
+ <script type="text/javascript" src="scripts/index.js"></script>
36
+ <script src="scripts/jquery-1.8.0.min.js"></script>
37
+ <script src="scripts/jquery.mobile-1.4.5.min.js"></script>
38
+ </body>
39
+ </html>
40
+ ```
41
+ ```CSS
42
+ .color{
43
+ color:blue;
44
+ }
45
+
46
+ #change {
47
+ display: inline-block;
48
+ cursor: pointer;
49
+ padding: 12px 80px;
50
+ background-color: #5dca88;
51
+ box-shadow: 0px 5px #279C56;
52
+ border-radius: 3px;
53
+ color: #fff;
54
+ font-size: 12px;
55
+ }
56
+ ```
57
+ ```JS
58
+ $(document).ready(function () {
59
+ $('#change').click(function () {
60
+ $('.color').css('color', 'red');
61
+ });
7
62
  });
8
- と書き出し、間にどんどん書いていこうと
9
-
10
- $('#click').click(function(){
11
- $('.text').css('color','red');
12
- });
63
+ ```
13
- しているがうまく作動しない。