Я новичок в мире Jquery и плагинов.Я экспериментировал с плагином serialscroll, как описано здесь: http://flesler.blogspot.com/2008/02/jqueryserialscroll.html. У меня есть простой код, определяющий параметры:
jQuery(function( $ ){
$('#screen').serialScroll({
target:'#sections',
items:'li',
axis:'xy',
navigation:'#navigation li a',
duration:700,
force:true,
});
});
Отлично работает во всех браузерах, кроме IE8.Выдает ошибку "Jquery не определено в строке 1 char 1."Очевидно, у меня есть последний внешний файл serialscroll.js, так что я знаю, что это не проблема.Является ли синтаксис чем-то, что IE8 не устраивает?
Вот полный код:
JQUERY:
// Easing equation, borrowed from jQuery easing plugin
// http://gsgd.co.uk/sandbox/jquery/easing/
jQuery.easing.easeOutQuart = function (x, t, b, c, d) {
return -c * ((t=t/d-1)*t*t*t - 1) + b;
};
jQuery(function( $ ){
$('#screen').serialScroll({
target:'#sections',
items:'li',
axis:'xy',
navigation:'#navigation li a',
duration:700,
force:true,
onBefore:function( e, elem, $pane, $items, pos ){
e.preventDefault();
if( this.blur )
this.blur();
},
onAfter:function( elem ){
}
});
});
CSS:
#screen{
position:relative;
height:700px;
width:925px;
margin-top:40px;
}
#navigation{
position:absolute;
width:883px;
height:77px;
z-index:3;
left: 84px;
top: -17px;
}
#navigation ul{
margin-left:10px !important;
}
#navigation li{
float:left;
padding-left:35px;
}
#navigation a{
font-weight:bolder;
text-decoration:none;
padding-left:25px;
float:left;
}
#sections{
position:absolute;
overflow: hidden;
width:510px;
height:510px;
z-index:3;
left: 169px;
top: 205px;
}
#sections ul{
width:3660px;
}
#sections li{
left: 0px;
top: 0px;
padding-left:0;
margin-left:0;
}
#sections p{
width:550px;
margin:16px 0;
font-size:85%;
line-height:1.4em;}
HTML:
<div id="screen">
<div id="navigation">
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
<li><a href="#">Link 4</a></li>
</div>
<div id="sections"><ul>
<li><p>some text</p></li>
<li><p>some text</p></li>
<li><p>some text</p></li>
<li><p>some text</p></li>
</ul></div>
</div>