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

  • SEARCH
  • Home
  • 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 8660713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:19:28+00:00 2026-06-12T16:19:28+00:00

This might be a strange idea, hopefully it’s possible. I have a script that

  • 0

This might be a strange idea, hopefully it’s possible. I have a script that dynamically loads a div with different text values (this is a given variable, can’t change anything here). Is it possible to change these values after the page has loaded? This is my idea:

  1. The page is loaded
  2. The script loads the div with text (e. g. one phrase is “Welcome here”
  3. New script changes some of the values displayed (e. g. the previous one becomes “How are you? Welcome!”

Any ideas?

EDIT

Here is the example of the code:

<div id="one" class="one">First text
<div class="two">Second text
<label class="three">Third text</label>
<option value="1">ValueOne</option>
<a>Link text</a>
</div>
</div>

As you can see, there are different types of selectors involved, while some of the phrases don’t have any selectors (this is just a part of the code). After the page loading finishes, this shoud look like this:

<div id="one" class="one">FirstTextChanged
<div class="two">SecondTextChanged
<label class="three">ThirdTextChanged</label>
<option value="1">ValueOneChanged</option>
<a>LinkTextChanged</a>
</div>
</div>
  • 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-06-12T16:19:29+00:00Added an answer on June 12, 2026 at 4:19 pm

    http://jsfiddle.net/UPhUb/1/

    waits 5 seconds after page loads, then changes the text. Simple.

    changeText = function(text, newText){
        var currentText = $('#welcome').html();  
    
        $('#welcome').html(currentText.replace(text,newText));
    };
    
    window.setTimeout(function(){changeText('Welcome.', 'How are you?')}, 5000);
    

    Updated per your comment: now when you call changeText you pass two arguments, the text you want swapped out and the new text you want in. Without seeing your code, this is as close as I think I can get.

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

Sidebar

Related Questions

This might seem a strange idea so bear with me. Every day (Mon-Fri), I
I know the title of this question might be strange, but that was the
Okay, so this might be kind of strange but here's the question: I have
I was hoping someone here might have an idea what causes this sort of
I know this might seem strange on the face on it but, if I
This might seam like a strange question but.... public string MyProperty { get {
This might be a very basic question but it confuses me. Can two different
This might get a little confusing as I have tried everything to make this
This might have to be broken down a bit but what i want to
I have a strange issue, relating to running a BASH script via cron (invoked

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.