首先,抱歉的傢伙在這裏發佈的問題。 support forum似乎幾乎死亡。qTip:防止隱藏小費連續兩次
所以我遇到了qtip插件或我的代碼中的錯誤。當我連續撥打.qtip('hide')
兩次或更多次時,當撥打.qtip('show')
時,工具提示將隱藏並再次顯示。
的方式重現:
el.qtip('hide');el.qtip('hide');el.qtip('show'); \\ -> bug, the tip is not shown
el.qtip('hide');el.qtip('hide');el.qtip('hide');el.qtip('show'); \\ -> bug, same
連續show
做工不錯...
el.qtip('show');el.qtip('show');el.qtip('hide');el.qtip('show'); \\ -> pass
非 - 連續hide
也工作好:
el.qtip('hide');el.qtip('show');el.qtip('hide');el.qtip('show'); \\ -> pass
的問題是:
如何使事情的工作? qTip api沒有給我一種方法來查找提示是隱藏還是顯示。我怎麼知道?我可以檢查qTip是否隱藏,不要隱藏兩次。
的問題可能的來源:
導致錯誤的qtip是一個相當棘手的方式構建:
qtip({
content: text,
position: {
corner: {
target: 'rightMiddle',
tooltip: 'leftMiddle'
}
},
style: {
tip: {
corner: 'leftMiddle',
},
border: {
radius: 11,
width: 4
},
name: 'red'
},
show: {
delay:0,
ready: true,
fixed:true,
when: { target: false, event:false },
effect: function() {//.stop(true, true)
$(this).effect("drop", { direction: "down", mode: "show" }, 240)
}
},
hide: {
delay:0,
fixed:true,
when: { target: false, event:false },
effect: function() {//.stop(true, true)
$(this).effect("drop", { direction: "down", mode: "hide" }, 240)
}
}
})
爲了測試這一點,你可以去www.buxdial.com/oldo /register.php,在captcha字段中輸入任何內容,轉到調試器並運行測試,用code.TIP
替換
我正在使用qTip開始,但我改變了。現在,我使用TooptisY提供工具提示(這很好)。我使用simpleModal(由我們其中一個創建)獲取更大的內容。 –