PDA

Просмотр полной версии : jQuery - проблема с scrollFollow


preda1or
31.08.2009, 17:32
<html>
<head>
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="jquery.scrollFollow.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(
function()
{
$('#message_box').scrollFollow( { speed:1000,relativeto: bottom } );
$('#close_message').click(
function()
{
$('#message_box').animate({ top:"+=0px",opacity:0 }, "slow");
}
);
$('#open_message').click(
function()
{
$('#message_box').animate({ top:"+=0px",opacity:1 }, "slow");
}
);
}
);
</script>
<style>
#message_box {
position: absolute;
bottom: 0px; left: 0px;
z-index: 1;
background-image:url('background.png');
padding:0px;
border:0px;
text-align:center;
width:100%;
height:40px;
}
</style>
</head>
<body>
<div>
Здесь остальное содержание Вашей страницы
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<img id="open_message" style="float:right;cursor:pointer" src="cross.png" />
</div>
<div id="message_box">logotypes<img id="close_message" style="float:right;cursor:pointer" src="cross.png"></div>
</body>
</html>

Вопрос, почему "менюшка" не ездит за нижней границей?

FireFenix
31.08.2009, 17:52
не проще юзать стиль position:fixed ?

preda1or
31.08.2009, 17:53
не проще юзать стиль position:fixed ?
решил проблему)