innerHTML jQuery

How do I use this code:

if (document.getElementById("id").innerHTML != '') {...}

Open in new window


but have the jQuery equivalent. I would like to use jQuery.

Thank you,
Victor

Victor KimuraSEO, Web DeveloperAsked:
Who is Participating?
 
leakim971Connect With a Mentor PluritechnicianCommented:
if( $("#id").html() != "" ) { ... }

Open in new window

0
 
Gurvinder Pal SinghCommented:
if ( $("#id").html() == "" )
{
}
0
 
Gurvinder Pal SinghCommented:
if ( $("#id").html() != "" )
{
}
0
 
daveamourCommented:
Off the top og my head it is $('#id').html().
0
 
Victor KimuraSEO, Web DeveloperAuthor Commented:
Thanks, guys. leakim answered first so I felt I should give him the credit. Thanks, though. I appreciate it as I know you guys have answered other questions I've posted. =)
0
All Courses

From novice to tech pro — start learning today.