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

質問編集履歴

3

再修正

2017/11/17 04:10

投稿

pecchan
pecchan

スコア592

title CHANGED
File without changes
body CHANGED
@@ -10,6 +10,8 @@
10
10
 
11
11
  ```html
12
12
  <head>
13
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
14
+
13
15
  <link type="text/css" rel="stylesheet"
14
16
  href="http://code.jquery.com/ui/1.10.3/themes/cupertino/jquery-ui.min.css" />
15
17
  <style type="text/css">
@@ -47,4 +49,47 @@
47
49
  ```
48
50
 
49
51
  エラー内容
50
- ![イメージ説明](5e35854ed297e4a6bb8f8e828d38535b.jpeg)
52
+ ![イメージ説明](5e35854ed297e4a6bb8f8e828d38535b.jpeg)
53
+
54
+
55
+
56
+ 【追記】以下のように修正しました
57
+
58
+ ```html
59
+ <head>
60
+
61
+ <link type="text/css" rel="stylesheet"
62
+ href="http://code.jquery.com/ui/1.10.3/themes/cupertino/jquery-ui.min.css" />
63
+ <style type="text/css">
64
+ table, th, td { border-collapse: collapse; border: solid 1px #000; }
65
+ </style>
66
+ <script type="text/javascript"
67
+ src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
68
+ <script type="text/javascript"
69
+ src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
70
+ <script type="text/javascript">
71
+ $(function() {
72
+ $('#test').sortable();
73
+ });
74
+ </script>
75
+
76
+ </head>
77
+ <table id="aaa">
78
+ <thead>
79
+ <tr>
80
+ <th>No.</th>
81
+ <th>タイトル</th>
82
+ </tr>
83
+ </thead>
84
+ <tbody id="test">
85
+ <tr>
86
+ <td>1</td>
87
+ <td>坊っちゃん</td>
88
+ </tr>
89
+ <tr>
90
+ <td>2</td>
91
+ <td>吾輩は猫である</td>
92
+ </tr>
93
+ </tbody>
94
+ <talbe>
95
+ ```

2

書き直したコードを再掲載

2017/11/17 04:10

投稿

pecchan
pecchan

スコア592

title CHANGED
File without changes
body CHANGED
@@ -10,21 +10,21 @@
10
10
 
11
11
  ```html
12
12
  <head>
13
- <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
13
+ <link type="text/css" rel="stylesheet"
14
-
15
- <link type="text/css" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/cupertino/jquery-ui.min.css" />
14
+ href="http://code.jquery.com/ui/1.10.3/themes/cupertino/jquery-ui.min.css" />
16
15
  <style type="text/css">
17
16
  table, th, td { border-collapse: collapse; border: solid 1px #000; }
18
17
  </style>
18
+ <script type="text/javascript"
19
- <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
19
+ src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
20
+ <script type="text/javascript"
20
- <script type="text/javascript" src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
21
+ src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
21
-
22
-
23
22
  <script type="text/javascript">
24
23
  $(function() {
25
- $('#test').sortable();
24
+ $('#test').sortable();
26
25
  });
27
26
  </script>
27
+
28
28
  </head>
29
29
  <table id="aaa">
30
30
  <thead>

1

2017/11/17 04:04

投稿

pecchan
pecchan

スコア592

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,7 @@
1
1
  [サンプル](http://www.buildinsider.net/web/jqueryuiref/0005)を参考に、表中の行をドラッグで移動する画面を作ろうとしてます。
2
2
 
3
3
  「sortable is not a function」というエラーが出て動作しません。
4
+ ドラッグしても反応しません。
4
5
 
5
6
  分かる方教えていただけないでしょうか?
6
7
 
@@ -8,7 +9,7 @@
8
9
 
9
10
 
10
11
  ```html
11
-
12
+ <head>
12
13
  <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
13
14
 
14
15
  <link type="text/css" rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/cupertino/jquery-ui.min.css" />
@@ -24,7 +25,7 @@
24
25
  $('#test').sortable();
25
26
  });
26
27
  </script>
27
-
28
+ </head>
28
29
  <table id="aaa">
29
30
  <thead>
30
31
  <tr>