2013-11-28 28 views
1

我使用opentip,我尝试使用自定义造型设计opentip。Opentip造型不起作用

这些是我的咖啡里面的代码。

Opentip.styles.orangetip = { 
    stem: true, 
    borderColor: "#ffa358", 
    borderWidth: "50", 
    background: "#ffa358", 
    fixed: true, 
    stemLength: "10" 
    } 

而且我甚至使用这个块来使我的造型成为默认,但它仍然不起作用。

Opentip.defaultStyle = "orangetip" 

这是我的脚本来调用样式。

tip1 = new Opentip("#testong", "Optional content", { 
    style: "orangetip", 
    showOn: "mouseover" 
}) 

样式不加载,但showOn正在工作。例如,如果我将“鼠标悬停”改为“点击”,容器将显示点击,而不是悬停。

任何人都知道为什么样式不加载?谢谢。

回答

2

我已经找到答案了。

问题是因为我使用“”作为整数值。

所以,它必须是:

Opentip.styles.orangetip = { 
    stem: true, 
    borderColor: "#ffa358", 
    borderWidth: 50, 
    background: "#ffa358", 
    fixed: true, 
    stemLength: 10 
}