If element contains child elements run function
<p>I have a carousel on my site, and if there are no elements my jquery seems to crash. </p>

<p>My HTML output without elements is...</p>

<pre><code>&lt;section class="gallery-viewport-twobedroomapartment viewer"&gt;
     &lt;ul&gt;
     &lt;/ul&gt;
     &lt;a id="simplePrevious"&gt;&lt;img alt="Left Arrow" src="_includes/images/larr.png"&gt;&lt;/a&gt;
     &lt;a id="simpleNext"&gt;&lt;img alt="Right Arrow" src="_includes/images/rarr.png"&gt;&lt;/a&gt;
&lt;/section&gt;
</code></pre>

<p>And my jQuery is...</p>

<pre><code>$('.gallery-viewport-twobedroomapartment').carousel('#simplePrevious', '#simpleNext');
</code></pre>

<p>Is it possible to say if UL contains LI then run the function? </p>
