title: How to do a shorthand if-then in jQuery? Are these chainable?
body: <p>Actually two questions:</p>
  
  <p>I like the shorthand <em>IF-ELSE</em> in <a href="http://en.wikipedia.org/wiki/JQuery" rel="nofollow">jQuery</a> like so:</p>
  
  <pre><code>var some == true ? "it's true" : "it's false";   
  </code></pre>
  
  <p>Is there a corresponding <em>IF-THEN</em>, because this:</p>
  
  <pre><code>   var some == true ? "it's true" 
  </code></pre>
  
  <p>doesn't seem to work.</p>
  
  <p>Also, would something like this be chainable in regular jQuery? Like so:</p>
  
  <pre><code>  some.addClass("hello")
        .find(".other").css("width","100px").end()
        // chained if
        .hasClass("one") ? some.css("border","1px solid red")
        .removeClass("hello")
  </code></pre>
  
  <p>Now that would be nice, wouldn't it? Is this possible?</p>