Hej Wam !
Mam problem z FloatMenu, które nie działa mi tylko pod przeglądarką Internet Explorer 8. Wszystkie inne takie jak
Internet Explorer 9, Opera, FF, Chrome, Safari, Mozilla poprawnie to "mielą", a ten zacofany IE8 nie chce tego ruszyć. Pytanie tylko czemu nie chce mi to działać pod IE 8 ? Może ktoś wie o co chodzi tej przeglądarce (IMG:
style_emoticons/default/arrowheadsmiley.png) Zauważyłem, że gryzie mi się to z pierwszą cześcią skryptu (podkreślone), ale co tam jest źle skoro pod innymi działa ?
p.s - po usunięciu częsci podkreślonej FloatMenu zaczyna działać pod IE8.
Kod JS + inne rzeczy wygląda tak:
<script type="text/javascript"> $(document).ready(function() {
$('.fancybox').fancybox();
$('.button1, .button2, .button3, .button4, .button5').stop().animate({"backgroundPosition":"0 -100"},1350);
$('.button1, .button2, .button3, .button4, .button5').hover(function() {
$(this).stop().animate({"backgroundPosition":"0 0"},500);
},function() {
$(this).stop().animate({"backgroundPosition":"0 -100"},200);
});
$('.button5, .button6, .button7').stop().animate({"backgroundPosition":"0 -5"},350);
$('.button5, .button6, .button7').hover(function() {
$(this).stop().animate({"backgroundPosition":"0 0"},500);
},function() {
$(this).stop().animate({"backgroundPosition":"0 -5"},200);
});
});
var name = "#floatMenu";
var menuYloc = null;
$(document).ready(function(){
menuYloc = parseInt($(name).css("top").substring(0,$(name).css("top").indexOf("px")))
$(window).scroll(function () {
var offset = menuYloc+$(document).scrollTop();
if( offset < 600 ) offset = 600;
$(name).animate({top:offset+"px"},{duration:500,queue:false});
});
});[/b]
[b]Poniżej kod HTML:
<?php
'<div id="floatMenu">
<ul>
<a href="#oferta"><h2>Oferta</h2></a>
<a href="#zapytanie"><h2>Zapytanie</h2></a>
<a href="#podstawa"><h2>Podstawa prawna</h2></a>
<a href="#referencje"><h2>Referencje</h2></a><br /><br />
<a href="#gora"><h3>do góry</h3></a>
</ul>
</div>'
?>
Oraz styl CSS:
#floatMenu {
position:absolute;
padding-top:0px;
bottom:30px;
top:90px;
margin-left:0px;
max-height:800px;
width:300px;
float:left;
}
Ten post edytował Mega_88 5.09.2011, 00:09:34