title: if and else statement not working in jquery
body: <p>hello its really weird that a if and else statement is not working in my function even after the value comes in "no" then also the else part is executed instead of if  my code is</p>
  
  <pre><code>(function pollmsg() {
      setTimeout(function () {
          var demon = $('.msgnotimore').val();
          alert(demon);
          var a = $('.gvpgvpxgvp').val();
          $.ajax({
              url: 'modules/notifications/beast.php?nid=' + demon + '&amp;id=' + a,
              success: function (html) {
                  if(html == "no") {
                      alert('no');
                  } else {
                      alert('ok');
                      $('.msgnotimore').val();
                      $('.notiloadmsg').prepend($(html).fadeIn('slow'));
                  }
              },
              dataType: "html",
              complete: pollmsg
          });
      }, 30000);
  })();
  });
  </code></pre>
  
  <p>i alerted html to check the value returning . its "no" but still the else part is working how is this possible ?</p>