質問編集履歴

3

整合性を直す

2018/04/05 06:26

投稿

poge
poge

スコア15

test CHANGED
File without changes
test CHANGED
@@ -42,7 +42,7 @@
42
42
 
43
43
  0. タッチする前、タッチ対象の要素のクラスは「target-class」のみ(touchedクラスは設定されていない)
44
44
 
45
- 0. タッチを行い、タッチイベントが発生し、冒頭のevent.preventDefault()でブレイクすると、何故か$(this)のクラスは「target-class touched」になっている(touchedが付与されている)
45
+ 0. タッチを行い、タッチイベントが発生し、冒頭のhasClass('touched')でブレイクすると、何故か$(this)のクラスは「target-class touched」になっている(touchedが付与されている)
46
46
 
47
47
  0. 上記事象により、初回タッチ時に、$(this).hasClass('touched') === trueが正になり、ulが表示されない
48
48
 

2

evtを削除

2018/04/05 06:26

投稿

poge
poge

スコア15

test CHANGED
File without changes
test CHANGED
@@ -12,11 +12,7 @@
12
12
 
13
13
  ```javascript
14
14
 
15
- $('.target-class').on('touchstart', function(evt) {
15
+ $('.target-class').on('touchstart', function() {
16
-
17
- event.preventDefault();
18
-
19
-
20
16
 
21
17
  if ( $(this).hasClass('touched') === true){
22
18
 

1

誤字訂正

2018/04/05 02:10

投稿

poge
poge

スコア15

test CHANGED
File without changes
test CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  ### 実現したいこと
10
10
 
11
- 以下のコードにより、タッチイベント毎にulの表示をトグルしのでが、
11
+ 以下のコードにより、タッチイベント毎にulの表示をトグルしようとして
12
12
 
13
13
  ```javascript
14
14