0
我有這樣定義的文本框的網頁...文本框的jQuery插件腹地
<input type="text" hinttext="Here is the hint text" />
我試圖使用tbHinter調用設置控制的「提示」文本,並試圖...
$('input').tbHinter({ text: this.getAttribute('hinttext') });
和
$('input').tbHinter({ text:this.attr('hinttext') });
既不工作。
我知道我錯過了一些明顯的東西。請有人指點我正確的方向嗎?
完美,非常感謝。我曾嘗試過每種版本,但是我使用'this'而不是jQuery $(this)。 'this'只是返回元素,所以沒有tbHinter方法。有道理,謝謝。 – 2011-03-02 18:45:26