jQuery: fadeToggle() not change text of link Show / Hide
<p>I have a problem with fade toggle, It works when the div is visible to start with and link "Show QR" change to "Hide QR".
Link "Hide QR" should be clicked and div hidden but link of text not change to "Show QR"</p>

<p>html:</p>

<pre><code>&lt;a class="emotTab" id="qrshow" href="javascript:void(0);"&gt;Show QR&lt;/a&gt;
&lt;div id="div_showqr"&gt;Content.....&lt;/div&gt;
</code></pre>

<p>javasctipt :</p>

<pre><code>$("#qrshow").click(function(){
$("#div_showqr").fadeToggle('slow');
    $('#qrshow').text($('#div_showqr').is(':visible')? 'Hide QR' : 'Show QR');
$('#qrshow').text($('#div_showqr').is('display:none')? 'Show QR' : 'Hide QR');
});
</code></pre>

<p>sorry,, my english is bad :(</p>
