Why is this jquery code snippet failing
<pre><code>$(if($('#errorExplanation').length &gt; 0)){
  $('#venue_details').toggle($('#errorExplanation').length &gt; 0); //if there is at least one errorExplanation element on the page, 
  $("#venue_details").load("/load_events/"+ escape($('#request_artist').val()), successCallback );
    }
</code></pre>

<p>It seems like i am repeating myself with this code. I basically need to show #venue_details and run the load whenever #errorExplanation').length > 0...is there a better way or is my syntax off</p>
