Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 870
  • Last Modified:

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

0
Victor Kimura
Asked:
Victor Kimura
1 Solution
 
leakim971PluritechnicianCommented:
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 KimuraAuthor 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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now