2013-01-02 43 views
0

我有這樣的:綁定qTip到劍道的Widget

<input id="numeric" title="Numeric Tooltip" type="number" min="0" max="100" /> 

我努力做到以下幾點:

$("#numeric").kendoNumericTextBox(); 

然後

$('#numeric').qtip({ 
    content: { 
     text: $(this).prop("title") 
    } 
}); 

如何綁定這2項相同的元素?

http://jsfiddle.net/uZUjK/167/

回答

0

首先,你需要添加腳本和樣式。

然後將qtip應用於包裝數字文本框的元素 - 因爲輸入元素本身始終不可見,並且工具提示也將不可見。我更新你的小提琴覆蓋這些需求

var kendoNum = $("#numeric").kendoNumericTextBox().data('kendoNumericTextBox'); 
kendoNum.wrapper.qtip({ 
    content: { 
     text: kendoNum.element.prop("title") 
    } 
}); 

Here更新您所提供的鏈接的版本。

0

KendoUI中的輸入字段使用其他HTML元素進行修飾,以便在瀏覽器中兼容。您的原始input被另一個input隱藏,它沒有numeric ID。

用途:

$('#numeric').closest(".k-input-wrapper").qtip({ 
    content: { 
     text: $(this).prop("title") 
    } 
}); 

代替。

注意:不要忘了,包括qtipscriptstyle