title: How to check if a string contains a specific substring
body: <p>I'm working on a simple if/else jquery statement and I ran into some trouble with the variable. What I need it to do is to check if the var is true. In my case I want it to check if the has 'dont push' in it. If it's true, the html must change to 'lol'. If not, it will give a simple alert. Can anybody give me some guidance here? </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
  &lt;meta name="viewport" content="user-scalable=no, width=device-width" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;link href="mobile.css" rel="stylesheet" type="text/css" media="only screen and (max-width: 480px)" /&gt;
  &lt;script type="text/javascript" src="js/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $('#nietklikken').click(function() {
          var n = $(this).html('dont push');
          if (n == "$(this).html('dont push')"){
              $(this).html('lol')     
          } else {
              alert('lolz');
          }
      });
  });
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;button type="button" id="nietklikken"&gt;dont push&lt;/button&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>