ich habe da ein kleines Problem ich möchte gerne 2 divs mit jquery tauschen und dazu nutze ich jquery animate. klappt auch soweit alles ganz gut nur das problem ist das wenn das div sehr groß wird und man dann bis nach ganz unten an den anschlag scrollt flackert es im FF wenn es sich wieder einschiebt. ich habe mal eine sehr abgespecktes script gemacht:
PHP-Code:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script type="text/javascript">
function maximieren(id)
{
klein= "#info_klein";
gross = "#info_gross";
$(gross).stop();
$(gross).animate({
opacity: 1,
height: '2240px',
width: 740,
marginTop: "10px"
}, 1000, function() {
// Animation complete.
});
$(klein).stop();
$(klein).animate({
opacity: 0,
height: '0',
width: 740,
marginTop: "0px"
}, 1000, function() {
// Animation complete.
});
}
function minimieren(id){
klein= "#info_klein";
gross = "#info_gross";
$(klein).stop();
$(klein).animate({
opacity: 1,
height: '128',
width: 740,
marginTop: "10px"
}, 1000, function() {
// Animation complete.
});
$(gross).stop();
$(gross).animate({
opacity: 0,
height: '0',
width: 740,
marginTop: "0px"
}, 1000, function() {
// Animation complete.
});
}
</script>
</head>
<body>
<div id="info_klein" onclick="maximieren();" style="background-color:green; height:128px; width:740px;">
</div>
<div id="info_gross" onclick="minimieren();" style="background-color:red; height:0; opacity:0; width:740px; filter: alpha(opacity=0);">
</div>
</body>
</html>
Hat jemand ne Idee oder weiss warum es ausschließlich im FireFox so ist?
Gruß Matze
Einen Kommentar schreiben: