JQuery SetAttribute of Input Field on Key Event
<p>I want to set a attribute of Input field if user Enters some characters in to the text/check box. Here is the <a href="http://jsfiddle.net/sirishkumar/dFBzW/51/" rel="nofollow">link</a> to Java Script I am trying. Below is the code</p>

<pre><code>&lt;input type="text" /&gt;
&lt;div id="output"&gt;&lt;/div&gt;
</code></pre>

<p>

<pre><code>$('input').bind('input keyup', function() {
    $('#output').html($(this).val());
    $(this).setAttribute('aria-invalid', 'true');
});
</code></pre>

<p>But it is not working, can someone guide me?</p>
