質問編集履歴
6
削除
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
誤った投稿であるため削除します。
|
test
CHANGED
@@ -1,63 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
実際コーディングしたデータは手元にないため、最大限状況を還元しますが、何か不明な点があれば追記でお聞きください。
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
1.mouseoverでtooltipの出現位置に関して、ネットで検索した物を改造して普通に使えるようになりましたが、出現位置がmouseoverで指定した物を密接して真下に出ます。訳あって真下ではなく左側に出現させたくて、色々試しましたが、全部だめでした。以下は私のjs及びcssファイルでtooltipに関するコードです(mouseover mouseoutでshow hide以外)。
|
8
|
-
|
9
|
-
jsの中:最下部の空白地代に以下のように書いています
|
10
|
-
|
11
|
-
```jquery
|
12
|
-
|
13
|
-
$(".tooltip").css({opacity:"0.9",display:"none"})
|
14
|
-
|
15
|
-
```
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
css:ほぼネットから引っ張ってきた物を多少改造してこうなりました。
|
20
|
-
|
21
|
-
```css
|
22
|
-
|
23
|
-
.tooltip{position:right center}
|
24
|
-
|
25
|
-
.tooltip{
|
26
|
-
|
27
|
-
line-height:1;
|
28
|
-
|
29
|
-
color:#333;
|
30
|
-
|
31
|
-
width:140px;
|
32
|
-
|
33
|
-
background:#fff;
|
34
|
-
|
35
|
-
border:2px solid #333;
|
36
|
-
|
37
|
-
padding:1em;
|
38
|
-
|
39
|
-
font-size:small;}
|
40
|
-
|
41
|
-
.tooltip{position: {my: "left+5 center",at: "right center"}}
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
```
|
46
|
-
|
47
|
-
恐らく不用のコードも混じっていると思いますが、結局上記のすべてがなした結果、tooltipは密接して真下に出ます。何とかして左に出せないでしょうか。
|
48
|
-
|
49
|
-
②某ページのjsファイルの空白部分にこのようなコードを書いています
|
50
|
-
|
51
|
-
```jquery
|
52
|
-
|
53
|
-
$(window).mousemove(function{if(localStorage.abc=("hello"))
|
54
|
-
|
55
|
-
{alert('遷移する');window.location.assign('index.html')}})
|
56
|
-
|
57
|
-
```
|
58
|
-
|
59
|
-
要するにmousemoveする時に随時localStorage.abcをチェックし、helloになったらそのままindexに遷移されることになる。別のタブを開き、別のページでlocalStorage.abcをhelloに書き換え、こっちのページに戻ってmousemoveしたら確かに作動しますが、なぜかalertメッセージが連続二回でます。このコードで何故二回出るでしょうか。一回だけ出現させ、遷移する方法はあるでしょうか。
|
60
|
-
|
61
|
-
③ctrl+pで印刷画面を出したらどうもレイアウトがおかしい。cssで元々の項目のwidthを調節しても効果は薄いです。何か他の方法ありますでしょうか。
|
62
|
-
|
63
|
-
よろしくお願いします
|
1
|
+
誤った投稿であるため削除させていただきます。ご迷惑をおかけして申し訳ありません。
|
5
改行
test
CHANGED
File without changes
|
test
CHANGED
@@ -50,7 +50,9 @@
|
|
50
50
|
|
51
51
|
```jquery
|
52
52
|
|
53
|
+
$(window).mousemove(function{if(localStorage.abc=("hello"))
|
54
|
+
|
53
|
-
|
55
|
+
{alert('遷移する');window.location.assign('index.html')}})
|
54
56
|
|
55
57
|
```
|
56
58
|
|
4
ブロック修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -48,7 +48,11 @@
|
|
48
48
|
|
49
49
|
②某ページのjsファイルの空白部分にこのようなコードを書いています
|
50
50
|
|
51
|
+
```jquery
|
52
|
+
|
51
53
|
$(window).mousemove(function{if(localStorage.abc=("hello")){alert('遷移する');window.location.assign('index.html')}})
|
54
|
+
|
55
|
+
```
|
52
56
|
|
53
57
|
要するにmousemoveする時に随時localStorage.abcをチェックし、helloになったらそのままindexに遷移されることになる。別のタブを開き、別のページでlocalStorage.abcをhelloに書き換え、こっちのページに戻ってmousemoveしたら確かに作動しますが、なぜかalertメッセージが連続二回でます。このコードで何故二回出るでしょうか。一回だけ出現させ、遷移する方法はあるでしょうか。
|
54
58
|
|
3
ブロック改造
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,12 +1,24 @@
|
|
1
1
|
散々自分で試してもうまく行かなかったのでお聞きしたいと思います
|
2
2
|
|
3
|
-
|
3
|
+
実際コーディングしたデータは手元にないため、最大限状況を還元しますが、何か不明な点があれば追記でお聞きください。
|
4
4
|
|
5
|
+
|
6
|
+
|
7
|
+
1.mouseoverでtooltipの出現位置に関して、ネットで検索した物を改造して普通に使えるようになりましたが、出現位置がmouseoverで指定した物を密接して真下に出ます。訳あって真下ではなく左側に出現させたくて、色々試しましたが、全部だめでした。以下は私のjs及びcssファイルでtooltipに関するコードです(mouseover mouseoutでshow hide以外)。
|
8
|
+
|
9
|
+
jsの中:最下部の空白地代に以下のように書いています
|
10
|
+
|
5
|
-
j
|
11
|
+
```jquery
|
6
12
|
|
7
13
|
$(".tooltip").css({opacity:"0.9",display:"none"})
|
8
14
|
|
15
|
+
```
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
css:ほぼネットから引っ張ってきた物を多少改造してこうなりました。
|
20
|
+
|
9
|
-
css
|
21
|
+
```css
|
10
22
|
|
11
23
|
.tooltip{position:right center}
|
12
24
|
|
@@ -28,6 +40,10 @@
|
|
28
40
|
|
29
41
|
.tooltip{position: {my: "left+5 center",at: "right center"}}
|
30
42
|
|
43
|
+
|
44
|
+
|
45
|
+
```
|
46
|
+
|
31
47
|
恐らく不用のコードも混じっていると思いますが、結局上記のすべてがなした結果、tooltipは密接して真下に出ます。何とかして左に出せないでしょうか。
|
32
48
|
|
33
49
|
②某ページのjsファイルの空白部分にこのようなコードを書いています
|
2
文法改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
②某ページのjsファイルの空白部分にこのようなコードを書いています
|
34
34
|
|
35
|
-
$(window).mousemove(function{if(localStorage.abc=("hello")){alert('遷移する');
|
35
|
+
$(window).mousemove(function{if(localStorage.abc=("hello")){alert('遷移する');window.location.assign('index.html')}})
|
36
36
|
|
37
37
|
要するにmousemoveする時に随時localStorage.abcをチェックし、helloになったらそのままindexに遷移されることになる。別のタブを開き、別のページでlocalStorage.abcをhelloに書き換え、こっちのページに戻ってmousemoveしたら確かに作動しますが、なぜかalertメッセージが連続二回でます。このコードで何故二回出るでしょうか。一回だけ出現させ、遷移する方法はあるでしょうか。
|
38
38
|
|
1
文法、詳細を改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,6 +28,8 @@
|
|
28
28
|
|
29
29
|
.tooltip{position: {my: "left+5 center",at: "right center"}}
|
30
30
|
|
31
|
+
恐らく不用のコードも混じっていると思いますが、結局上記のすべてがなした結果、tooltipは密接して真下に出ます。何とかして左に出せないでしょうか。
|
32
|
+
|
31
33
|
②某ページのjsファイルの空白部分にこのようなコードを書いています
|
32
34
|
|
33
35
|
$(window).mousemove(function{if(localStorage.abc=("hello")){alert('遷移する');;window.location.assign('index.html')}})
|