q提示2.我无法添加"position"代码



我对javascript一无所知。有人可以向我解释此代码中有什么问题(这是语法错误)?

$(document).ready(function () {
$('.picture').qtip(
{
    content: {
             text: $(this).next('.tooltiptext')
             }
    position: {
            my: 'bottom center',  // tooltips tip at bottom center...
            at: 'top center', // in relation to the button's top center...
            target: $('.picture') // my target
              }
 });
}); 

非常感谢。

我认为您在QTIP的属性值之间缺少,

尝试:

$(document).ready(function () {
    $('.picture').qtip({
        content: {
            text: $(this).next('.tooltiptext')
        }, // <-- here
        position: {
            my: 'bottom center', // tooltips tip at bottom center...
            at: 'top center', // in relation to the button's top center...
            target: $('.picture') // my target
        }
    });
});