我正在使用一个jCarouselLite插件在我的Django-powered站点的主页上创建两个图片库。带有导航箭头的元素代码是这样动态生成的:
$(document).ready(function ()
{
$('[jq\\:corner]').each(function(index, item)
{
item = $(item); item.corner(item.attr('jq:corner'))
})
$('[jq\\:menu]').each(function (index, item)
{
item = $(item); item.menu(item.attr('jq:menu'))
})
$('[jq\\:carousel]').each(function(index, item)
{
item = $(item); var args = item.attr('jq:carousel').split(/\s+/)
lister = item.parent().attr('class') + '_lister'
item.parent().append('<div id="'+ lister +'"></div>');
$('#' + lister).append("<a class='nav left' href='#'></a><a class='nav right' href='#'></a>");
toparrow = $(item).position().top + $(item).height() - 50;
widtharrow = $(item).width();
$('#' + lister).css({
'display': 'inline-block',
'z-index': 10,
'position': 'absolute',
'margin-left': '-22px',
'top': toparrow,
'width': widtharrow
})
$('#' + lister + ' .nav.right').css({
'margin-left': $('#' + lister).width() + 22
})
item.jCarouselLite({
btnNext: '#' + lister + ' .nav.right',
btnPrev: '#' + lister + ' .nav.left',
visible: parseInt(args[0])
})
})
问题是,如果页面是通过一个url加载的,在地址栏中输入的有些函数无法工作,第二个库显示的参数错误,但如果我通过单击link进入这个页面,一切都会完美地工作。它只在googlechrome(Ubuntu,stable 5.0.360.0)中出现,但在Firefox或Opera中没有。在
原因是什么?在
不知道这是否符合您的问题,但我一直在运行chromeforlinux的dev频道,这个周末在jqueryui1.8发布按钮插件的工作中遇到了问题。后来发现这是一个Chrome错误,更新解决了这个问题。在
相关问题 更多 >
编程相关推荐