3
我想爲qtip的多個實例設置一堆默認屬性,但它不工作。有可能或者我做錯了什麼?擴展qtip或其他選擇器插件的屬性
通用屬性
var qtipDefaults = {
show: 'mouseover',
hide: 'mouseout',
position: {
corner: {
target: 'bottomLeft',
tooltip: 'topLeft'
}
},
style: {
name: 'dark'
}
};
實例化#1
$('#sbt_name').qtip({
content: 'This is the Name of the Course'
}).extend(qtipDefaults);
實例化#2
var sbt_name = $('#sbt_name').qtip({
content: 'This is the Name of the Course'
});
$.extend(sbt_name, qtipDefaults);
不錯,就像一個魅力工作,謝謝nrodic。 – SamJackSon
在我的情況下,這有伎倆。我只想傳遞位於'position'數組中的'my'和'at'屬性。感謝您的解釋。 –