$("#floatWindow a.close").click(function(){ $("#floatWindow").fadeOut("fast"); return false; }) $("#floatWindow dl dt").mousedown(function(e){ $("body").bind('selectstart', function(){ return false; }); $("#floatWindow") .data("clickPointX" , e.pageX - $("#floatWindow").offset().left) .data("clickPointY" , e.pageY - $("#floatWindow").offset().top); $(document).mousemove(function(e){ $("#floatWindow").css({ top:e.pageY - $("#floatWindow").data("clickPointY")+"px", left:e.pageX - $("#floatWindow").data("clickPointX")+"px" }) }) }).mouseup(function(){ $("body").unbind('selectstart'); $(document).unbind("mousemove") })
})
</script>
<style type="text/css">
#floatWindow{
display:none;
position:absolute;
width:320px;
height:400px;
top:100px;
left:100px;
}
#floatWindow a.close{
position:absolute;
right:3px;
top:4px;
}
#floatWindow a.close img{
border:none;
}
#floatWindow dl{
width:100%;
height:100%;
border: 2px #CCCCCC solid;
margin:0;
}
- html #floatWindow dl{
background:none;
filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='./images/floatWindow.png',sizingMethod='scale');
}
- html #floatWindow dl *{
position:relative;
}
#floatWindow dl dt{
height:25px;
line-height:25px;
text-indent:1em;
color:white;
font-weight:bold;
cursor:move;
background-color:#3333FF;
}
#floatWindow dl dd{
margin-left:0px;
}
<body></style> </head>
</body> </html><input type="button" class="open" value="検索"> <div id="floatWindow"> <a href="sample2.html" class="close"><img src="./close.png" alt="閉じる" width="20" height="18"/></a> <dl> <dt> <div id="title">検索</div> </dt> <dd> <input type='text' style="margin-top:-3px; width:247px; height:22px;"><input type='button' value='検索' style="width:73px;"> <input type='button' value='日付' style="width:120px;"><input type='button' value='タイトル' style="width:200px;"> <table border='0'> <tr> <td width=115px>2015-05-09</td><td width:197px>試作モデル</td> </tr> </table> </dd> </dl> </div> <div class="work_list" data-role="button" data-inline="true"></div>
上記の内容だと問題なく動くのですが、外部ファイルとするとプログラムが
動かず困っております。何が原因なのでしょうか。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2015/05/09 15:24
2015/05/09 15:26
退会済みユーザー
2015/05/09 15:59