我在我的网站http://www.revolvercreative.com.au/gallery.html# Uncaught TypeError: Cannot read property 'left' of null上不断收到此错误, 无法弄清楚这意味着什么。
subArrowXPos = curMenu.parent().position();
subArrowDestWidth = curMenu.parent().width();
destArrowX = subArrowDestWidth / 2 - parseInt(subArrowUp.css('width'), 10) / 2;
subArrow.jacked({
left: subArrowXPos.left,
width: subArrowDestWidth,
opacity: 1
}, {
duration: 500
});
subArrowUp.jacked({
left: destArrowX
}, {
duration: 500
});
}
function checkMenuWidth() {
var logoWidth = $('.logo').width() + 40;
var availableWidth = contWidth - logoWidth;
var menuWidth = $('.ddsmoothmenu').width();
var mainMenu = $('nav #smoothmenu');
var dropDown = $('nav form');
var arrow = $('#submenuArrow');
if (availableWidth >= menuWidth) {
mainMenu.css({
'visibility': 'visible'
});
dropDown.css({
'display': 'none'
});
arrow.css({
'display': 'inline'
});
} else {
arrow.css({
'display': 'none'
});
mainMenu.css({
'visibility': 'hidden'
});
dropDown.css({
'display': 'inline-block'
});
}
}
请问有什么想法吗?这里是js新手;)