Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    May 2009
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    $('userPanel').childElements().remove();

    ? looks OK, does not work! again...
    Code:
    $('userPanel').childElements().remove();
    ? error from firefox is "$('userPanel').childElements().remove is not a function."

  • #2
    New Coder
    Join Date
    May 2009
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb

    OK, figured it out, $('userPanel').childElements() is an array (even if it is only a single element).

  • #3
    Regular Coder ohgod's Avatar
    Join Date
    Jun 2008
    Location
    Ohio
    Posts
    579
    Thanks
    6
    Thanked 69 Times in 69 Posts
    right.... so:

    Code:
    $('userPanel').childElements().each(function(s){ s.remove(); });


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •