JQuery show() nach dem ausblenden()

HTML:

<table id="table1">
    <tr>
        <th>1</th>
        <th>2</th>
        <th>3</th>
    </tr>
    <tr>
        <td class="table1column1"><input type="text" id="idInput1" /></td>
        <td class="table1column2"><input type="text" id="idInput2" /></td>
        <td class="table1column3"><input type="text" id="idInput3" /></td>
        </tr>
</table>
<button>Hide-Text-Show</button>

JQuery:

$(document).ready(function() {
    $('button').click(function() {
        $('#idInput1').hide();
        $('.table1column1').text('Test');
        $('#idInput1').show();
    });
});

http://jsfiddle.net/QNxyG/

Ich verstehe nicht warum, wenn ich einen text im td-element der show () - Methode nicht funktioniert?

Dank

  • Die unten aufgeführten Antworten sind richtig, aber in der Zukunft, wenn Sie herausfinden wollen, für Ihr selbst, was passiert, dann schlage ich vor, beispielsweise firebug in firefox oder die Developer tools im Chrome oder IE.
  • Ich entschied sich schließlich für diese Lösung: jsfiddle.net/QNxyG/3
InformationsquelleAutor user1889867 | 2012-12-09
Schreibe einen Kommentar