请问这段代码是什么意思?为什么在discuz的专题页模板里不能正常使用? 20
<scripttype="text/javascript">$(function(){var$window=$(window),window_width=$window....
<script type="text/javascript">
$(function(){
var $window = $(window),
window_width = $window.width();
$('#js_banner, #js_banner_img li').width(window_width);
var urlParam = G.util.parse.url(),
startFrame = 0;
if (urlParam.search && ('banner' in urlParam.search)) {
startFrame = (parseInt(urlParam.search['banner'])-1) || 0;
}
new $.Tab({/*添加圆点按钮*/
target: $('#js_banner_img li'),
effect: 'slide3d',
animateTime: 1000,
stay: 4000,
playTo: startFrame,
autoPlay: true,
merge: true,
prevBtn: $('#js_banner_pre'),
nextBtn: $('#js_banner_next')
});
$('#js_banner_img').css('left','-' + (window_width * startFrame) + 'px');
})
</script> 展开
$(function(){
var $window = $(window),
window_width = $window.width();
$('#js_banner, #js_banner_img li').width(window_width);
var urlParam = G.util.parse.url(),
startFrame = 0;
if (urlParam.search && ('banner' in urlParam.search)) {
startFrame = (parseInt(urlParam.search['banner'])-1) || 0;
}
new $.Tab({/*添加圆点按钮*/
target: $('#js_banner_img li'),
effect: 'slide3d',
animateTime: 1000,
stay: 4000,
playTo: startFrame,
autoPlay: true,
merge: true,
prevBtn: $('#js_banner_pre'),
nextBtn: $('#js_banner_next')
});
$('#js_banner_img').css('left','-' + (window_width * startFrame) + 'px');
})
</script> 展开
1个回答
2014-03-30 · 知道合伙人互联网行家
关注
展开全部
代码修改为
<script type="text/javascript">
jQuery.noConflict();
var jq=jQuery;
jq(function(){
var jqwindow = jq(window),
window_width = jqwindow.width();
jq('#js_banner, #js_banner_img li').width(window_width);
var urlParam = G.util.parse.url(),
startFrame = 0;
if (urlParam.search && ('banner' in urlParam.search)) {
startFrame = (parseInt(urlParam.search['banner'])-1) || 0;
}
new jq.Tab({/*添加圆点按钮*/
target: jq('#js_banner_img li'),
effect: 'slide3d',
animateTime: 1000,
stay: 4000,
playTo: startFrame,
autoPlay: true,
merge: true,
prevBtn: jq('#js_banner_pre'),
nextBtn: jq('#js_banner_next')
});
jq('#js_banner_img').css('left','-' + (window_width * startFrame) + 'px');
})
</script>
新手可以去Discuz模板制作论坛学习www.dz7.com.cn
<script type="text/javascript">
jQuery.noConflict();
var jq=jQuery;
jq(function(){
var jqwindow = jq(window),
window_width = jqwindow.width();
jq('#js_banner, #js_banner_img li').width(window_width);
var urlParam = G.util.parse.url(),
startFrame = 0;
if (urlParam.search && ('banner' in urlParam.search)) {
startFrame = (parseInt(urlParam.search['banner'])-1) || 0;
}
new jq.Tab({/*添加圆点按钮*/
target: jq('#js_banner_img li'),
effect: 'slide3d',
animateTime: 1000,
stay: 4000,
playTo: startFrame,
autoPlay: true,
merge: true,
prevBtn: jq('#js_banner_pre'),
nextBtn: jq('#js_banner_next')
});
jq('#js_banner_img').css('left','-' + (window_width * startFrame) + 'px');
})
</script>
新手可以去Discuz模板制作论坛学习www.dz7.com.cn
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询