title: 'If'-'else' statement within jQuery function
body: <p>I have the following code in JavaScript and jQuery:</p>
  
  <pre><code>     $("&lt;li /&gt;")
  
       .html('Some HTML')
  </code></pre>
  
  <p>I would like to be able to change the content of .html by using an <code>if</code>-<code>else</code> statement. My code should be something like this, however it's not working.</p>
  
  <pre><code>var showinfo = &lt;?php echo '$action'; ?&gt;
  
  $("&lt;li /&gt;")
  
  if (showinfo == 'action1'){
      .html('Some HTML')
  else {
      .html('Other HTML')
  }
  </code></pre>
  
  <p>How should I change it?</p>