Hi guys,

I am currently trying to get my script to present two possible dialog boxes on a click handler, depending on whether a particular ul element is populated and I am trying all sorts of things with no success:

My code is :

Code:
		var $gallery = $( "#gallery" ),
	        $trash = $( "#trash" ); 

		$( "#reorder" ).click(function() {

			if(!$( "ul", $trash ).has("li"))
			{
			           trash();	// present the first dialog

			}
			else 
			{
			          no_trash();	//present the second   
			}
		});
Has doesn't work, I have also tried .length() and !=null, am I missing something?

thanks