質問編集履歴

2

URL削除

2015/07/10 03:36

投稿

hiroelegance
hiroelegance

スコア13

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,4 @@
1
1
  保育園のブログ
2
-
3
- [http://asoten.jp/blog/](http://asoten.jp/blog/)
4
2
 
5
3
  で保護者間トラブル回避の為、
6
4
 

1

コードを引用からコードに変更しました。

2015/07/10 03:36

投稿

hiroelegance
hiroelegance

スコア13

test CHANGED
@@ -1 +1 @@
1
- iPhoneのみ画像を保存メニューが出てしまう。
1
+ 画像長押し禁止iPhoneのみ画像を保存メニューが出てしまう。
test CHANGED
@@ -8,53 +8,63 @@
8
8
 
9
9
  CSSに以下のように追加し、
10
10
 
11
- > body {
11
+ ```lang-CSS
12
12
 
13
- > -webkit-touch-callout:none;
13
+ body {
14
14
 
15
- > -webkit-user-select:none;
15
+ -webkit-touch-callout:none;
16
16
 
17
- > user-select:none;
17
+ -webkit-user-select:none;
18
18
 
19
- > -moz-user-select:none;
19
+ user-select:none;
20
20
 
21
- > -khtml-user-select:none;
21
+ -moz-user-select:none;
22
22
 
23
- > -webkit-user-drag:none;
23
+ -khtml-user-select:none;
24
24
 
25
- > -khtml-user-drag:none;
25
+ -webkit-user-drag:none;
26
26
 
27
+ -khtml-user-drag:none;
28
+
29
+ }
30
+
27
- > }
31
+ ```
28
32
 
29
33
 
30
34
 
31
35
  JSを以下のように追加しております。
32
36
 
33
- > $(function(){
37
+ ```lang-JS
34
38
 
35
- > var timer;
39
+ $(function(){
36
40
 
37
- > $("img").on("touchstart",function(){
41
+ var timer;
38
42
 
39
- > timer = setTimeout(function(){
43
+ $("img").on("touchstart",function(){
40
44
 
41
- > alert("画像は保存できません")
45
+ timer = setTimeout(function(){
42
46
 
43
- > },500)
47
+ alert("画像は保存できません!")
44
48
 
45
- > return false;
49
+ },500)
46
50
 
47
- > })
51
+ return false;
48
52
 
49
- > $("img").on("touchend",function(){
53
+ })
50
54
 
51
- > clearTimeout(timer);
55
+ $("img").on("touchend",function(){
52
56
 
53
- > return false;
57
+ clearTimeout(timer);
54
58
 
55
- > })
59
+ return false;
56
60
 
57
- > })
61
+ })
62
+
63
+ })
64
+
65
+ ```
66
+
67
+
58
68
 
59
69
 
60
70