jquery history of input select (easy)
<p>I have an input field called email class keyup-an. I validate it easy with this, but it works or when an individual inputs the field manually. How do i make it work also for selecting historical data. when you click email and yesterday you put test@test.com, the history list drops down and you can select it, but its not a keyup. </p>

<p>I TRIED the same function after but with .change or .click and it didnt work. Can you guys please suggest?VALID</p>

<pre><code>$('.keyup-an').keyup(function() {
    $('span.error-keyup-1').hide();
    var inputVal = $(this).val();
    var numericReg = /^[a-zA-Z0-9_ ]{2,30}$/;
    if(!numericReg.test(inputVal)) {
        $(this).css('background', '#FAC3C3');
        $(this).after('&lt;span class="error error-keyup-1"&gt;Validationfail&lt;/span&gt;');
    } 
    else {
        $(this).css('background', 'lightgreen');
    }
});
</code></pre>

<p><img src="http://i.stack.imgur.com/Uq4pN.png" alt="jquery history"></p>
