私は、このHTMLjQuery .nextすべて動作していませんか?
<tr>
<td>
Main Alliase/Current Alliase:
</td>
<td><input type="text" id="maina" class="countchars" max="30"/><br />
<span class="showchars"></span>
</td>
<td><span id="handle-1" class="selector" title="The Main Alliase with which people know you OR the alliase with which u play most <br /> <b>You'r App would be also named after this only</b>" header="Main Alliase/Current Alliase">?</span></td>
<td><div id="error-1" class="errors"></div></td>
</tr>
を持って、これはJS:
$('#maina').focus(function() {
$(this).closest("tr").find(".selector").qtip('toggle', true);
$(this).nextAll(".errors:first").html("Bla");
$(this).siblings(".showchars").show();
});
が、私は、それは他の2つのことを行いますが、doesntのはerrors
クラスのHTMLを変更するmaina
に焦点を当てたときに。
なぜですか? 何が間違っていますか? 私 おかげ
私はこれを試してみましたが、少しの変化で、私は「TR」の代わりに「DIV」をパット – kritya
あなたがTRを使用している場合は、中クラスのエラーでのdivを取得するのは確実です同じ行 –
しかし、なぜdivが私に同じ結果を与えるのですか? – kritya