activate readonly back after editing the input jquery
<p>how can i activate the readonly back after finishing the edit of the input ?</p>

<p>this is my code for now :</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function () {
         $("input").bind('click focus', function(){
                $('input').each(function(){
                        $(this).attr("readonly", false);
                        });
                });
         });
&lt;/script&gt;
</code></pre>

<p>an input like this :</p>

<pre><code>&lt;input type="text"  class="m" readonly="readonly" id="anchor_text"&gt;
</code></pre>

<p>i think something with focusout, i need to put readonly back when i go to the next input, so the edited input can't be change unless i hit again click on it.</p>
