问题描述
|
我是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以外的所有浏览器中均可完美运行。给出错误“未定义第1行char 1的jQuery”。显然,我具有最新的外部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\',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>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)