1
何か間違っているかjqueryバグですか?jqueryで変更css bottom&top more once
だから我々は、例えば、このようなコードを持っており、に層を第三クリックし、両方のtop
とbottom
セットあなたを持っている場合は、再度下 ..
<style type="text/css">
#menu1 {
width:100%;
height:32px;
overflow:hidden;
background:#ff0033;
position:fixed;
left:0px;
cursor:pointer;
bottom:174px;
}
#content1 {
position:fixed;
width:100%;
left:0;
overflow:auto;
background:blue;
height:200px;
bottom:300px;
}
</style>
<script type="text/javascript" src="js/jquery-1.6.1.min.js"></script>
<script type="text/javascript">
$(function(){
var click1=0;
$("#menu1").click(function() {
if (click1==0) {
$("#content1").css({ bottom: "250px", display: "block", position: "fixed" });
click1 = 1;
} else {
$("#content1").css({ top: "100px", "display": "block", display: "block", position: "fixed" });
click1 = 0;
}
});
});
</script>
ありがとう、本当にありがとう! –