Ok I have 2 error messages being return which in turn displays 2 messages of the same thing. how can I only show one message?
jQuery.noConflict();
jQuery(document).ready(function(){
if (jQuery("span.errorMessage").length > 0) {
var $this = jQuery("span.errorMessage");
var t = $this.text();
// Clear the text
$this.text('');
// Add new message
$this.text('No search criteria was specified.');
// Change the layout
jQuery('#errorMessage').appendTo(jQuery('#message_display'));
}
});
Adding the HTML for the error's
<span id="errorMessage">
<ul>
<li><span class="errorMessage">No search criteria was specified.</span></li>
<li><span class="errorMessage">No search criteria was specified.</span></li>
</ul>
</span>