title: Jquery script sometimes work, sometimes doesn't
body: <p>I made script for my ASP.net page to validate values of few textboxes. The thing is, sometimes script works, sometimes do not. Here is my script:</p>
  
  <pre><code>    &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
     &lt;script type="text/javascript"&gt;&lt;/script&gt;
     &lt;script&gt;
         $(document).ready(function () {
  
             var _t1 = $(document.getElementById("&lt;%=textbox5.ClientID%&gt;"));
             var _t2 = $(document.getElementById("&lt;%=textbox4.ClientID%&gt;"));
             var _t3 = $(document.getElementById("&lt;%=textbox10.ClientID%&gt;"));
             var _t4 = $(document.getElementById("&lt;%=textbox9.ClientID%&gt;"));
             var _t5 = $(document.getElementById("&lt;%=textbox15.ClientID%&gt;"));
             var _t6 = $(document.getElementById("&lt;%=textbox14.ClientID%&gt;"));
  
             var _tLabel = $(document.getElementById("&lt;%=IsMatch.ClientID%&gt;"));
  
             if (_t1.val() &lt; _t2.val()) {
                 $(_tLabel).fadeIn('fast');
                 $(_tLabel).html('ERROR ');
                 $("#tg-yw4l-1").css("background-color", "red");
             }
             else if (_t3.val() &lt; _t4.val()) {
                 $(_tLabel).fadeIn('fast');
                 $(_tLabel).html('ERROR');
                 $("#tg-yw4l-2").css("background-color", "red");
             }
             else if (_t5.val() &lt; _t6.val()) {
                 $(_tLabel).fadeIn('fast');
                 $(_tLabel).html('ERROR');
                 $("#tg-yw4l-3").css("background-color", "red");
             }
             else {
                 $(_tLabel).fadeOut('fast');
             }
         });
         &lt;/script&gt;
  </code></pre>
  
  <p>What happens is that sometimes if requirements for error are met, it won't show error message and change backround.</p>