Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6232585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:08:29+00:00 2026-05-24T10:08:29+00:00

Friends need help to resolve this issue. (function($){ $(‘*’).each(function(){ if ($(this).children().length == 0) {

  • 0

Friends need help to resolve this issue.

(function($){

   $('*').each(function(){

if ($(this).children().length == 0) { 



          $(this).html($(this).html().replace(avidno,'<span id=avidlocal>AvidTrak Tracking Number</span>')); 

     } 



   });



})(jQuery)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:08:30+00:00Added an answer on May 24, 2026 at 10:08 am

    Since the following line is what’s giving you the error:

    $(this).html($(this).html().replace(avidno,'<span id=avidlocal>AvidTrak Tracking Number</span>'));
    

    you should break it up so that only one method is being called per line. This will allow you to further isolate the error. For example:

    var obj = $(this);    
    var currentHTML = obj.html();
    var newHTML = currentHTML.replace(avidno,'<span id=avidlocal>AvidTrak Tracking Number</span>');
    

    If the var currentHTML line is the issue, then $(this) is probably undefined for some reason. Or perhaps you need quotes around the id name “avidlocal”. Hard to say, since this is an IE bug after all, and I don’t see anything specific that I know doesn’t work in IE.

    As a final note, I would strongly advise your friend to find a better way to achieve what he’s aiming. $(‘*’).each will loop through every single element on the page. Does your friend really not have any way of producing HTML that allows the “avidno” text to be more easily replaced, i.e. more easily accessed via jQuery (through a class/id) than by looping through everything and checking if they have children nodes?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey, i need a little help with this django function. I wan't to insert
friends, I need help in sqlite query for check whether the data is already
Hello stack overflow I need help with this problem. Ok, I have a flat
I need some help designing a friends system The mysql table: friends_ list -
I need to help to show wall posts from the friends of the logged
Dear friends, I need your help. I need to send .bmp file to another
Friends a newbie question.........I need help in getting the URL of a specific Menu
Greetings Friends, I need some help! I've built an address finder where you enter
Ok I need help. I need to have a friends system in my website
Friends i need Jquery help below is my requirement. First Step -> Anchor Rollover

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.