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?
if ($('#popupdialog > p').is(':empty')) {
// we're empty. do stuff.
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With