Better way to validate the value of span
<p>All, I am a newbie for jquery, I found sometimes I need write some code for validate the element value. like below. </p>

<pre><code>var selectedLayOutIdx=$("#spanSelectedLayout").html();
if (selectedLayOutIdx!=undefined &amp;&amp; selectedLayOutIdx!="") {
    alert("The value is null, please check it.");
    return;
} else {
    //keep going.
} 
</code></pre>

<p>I found this code looks like verbose, I believe there must be a better way to make code work more fun in jquery. So far, I just haven't found it.</p>

<p>Please help me . thanks.</p>
