2013-10-28 53 views
2

我有tooltipster安裝程序來顯示我的驗證消息,到目前爲止他們工作得很好,除了一種情況。 我有一組單選按鈕,並從Yes/no中選擇Yes是強制性的。因此,我爲此設置了一個jquery驗證方法。當我通過Firebug進行調試時,我可以看到驗證發生,但閃爍的消息接近是的選項,它掩蓋了沒有選項,因爲它是它的頂部。控制收音機羣組的工具提示器工具提示位置

這裏是如何看起來

enter image description here

這裏是我的tooltipster配置如何查找單選按鈕

$('#iWatchEnabled').tooltipster({ 
    trigger: 'custom', // default is 'hover' which is no good here 
    onlyOne: false, // allow multiple tips to be open at a time 
    position: 'right', // display the tips to the right of the element 
    theme: '.tooltipster-shadow', 
    left:' 850px' 

}); 

最後左:「850像素」是覆蓋位置的嘗試我通過螢火蟲看到。

下面是工具提示單選按鈕

<div class="tooltipster-base tooltipster-shadow tooltipster-fade tooltipster-fade-show" style="transition-duration: 350ms; animation-duration: 350ms; width: 298px; padding-left: 0px; padding-right: 0px; top: 125.5px; left: 675px;"> 
<div class="tooltipster-content">Application has to be onboarded as a pre-requisite</div> 
<div class="tooltipster-arrow-right tooltipster-arrow" style=""> 
<span style="border-color:rgb(236, 236, 236);"></span> 
</div> 
</div> 
螢火蟲細節

解決,這將是great.It看起來看似瑣碎的問題,但我有很長一段時間,試圖獲得這項權利的任何幫助但沒有什麼可以顯示的。

回答

2

我終於找到了答案

現在看來,我的第一個設置是壓倒一切的我的單選按鈕組設置了。

$('#onboardForm input').tooltipster({ 
    trigger: 'custom', // default is 'hover' which is no good here 
    onlyOne: false, // allow multiple tips to be open at a time 
    position: 'right', // display the tips to the right of the element 
    theme: '.tooltipster-shadow' 
}); 

$('#onboardForm input:radio').tooltipster({ 
    trigger: 'custom', // default is 'hover' which is no good here 
    onlyOne: false, // allow multiple tips to be open at a time 
    position: 'right', // display the tips to the right of the element 
    theme: '.tooltipster-shadow', 
    offsetX: 100 
}); 

我增加了一個偏移,但是我必須設置一個單獨的樣式爲其他文本字段 我這樣做

$('#onboardForm input:text').tooltipster({ 
    trigger: 'custom', // default is 'hover' which is no good here 
    onlyOne: false, // allow multiple tips to be open at a time 
    position: 'right', // display the tips to the right of the element 
    theme: '.tooltipster-shadow' 
}); 

$('#onboardForm input:radio').tooltipster({ 
    trigger: 'custom', // default is 'hover' which is no good here 
    onlyOne: false, // allow multiple tips to be open at a time 
    position: 'right', // display the tips to the right of the element 
    theme: '.tooltipster-shadow', 
    offsetX: 100 
}); 

,我添加了一個公告:在我的第一配置文字提示,風格只適用於輸入類型=「文本」元素 和第二個配置(對於我的單選按鈕)我添加了一個偏移量X並將其移開大約100像素