Jquery Check if Paragraph is empty

Posted by Gidiyo on Stack Overflow See other posts from Stack Overflow or by Gidiyo
Published on 2010-05-29T06:20:14Z Indexed on 2010/05/29 6:22 UTC
Read the original article Hit count: 273

Filed under:
|
|

Hi,

I would like to check if my paragraph tag is empty using Jquery. Meaning without content.

$(function() {
    $("#popupdialog").dialog();
});

HTML

<div id="popupdialog"> 
<p></p> </div>

Separate Instants.

<div id="popupdialog" title="Basic dialog"> 
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>

If the popupdialog is without content. I would like the dialog box to set as autoOpen: false. How should I do it?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about css