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 1065539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T19:49:00+00:00 2026-05-16T19:49:00+00:00

Let me start by saying that I’m not a power-JavaScript/jQuery programmer, I do very

  • 0

Let me start by saying that I’m not a power-JavaScript/jQuery programmer, I do very basic things with it, yet sometimes things get a little hairy for me, like this one.

My case:

I have a list of testimonials (around 20) and every week (Mondays) I need to updated them.

My problem:

I update them manually. I mean, I open Dreamweaver, update the jQuery code for the corresponding testimonial number, and upload to server.

What I need:

A way to have this be automated… as best as possible.

HTML of testimonials:

<body>
<div class="quotes-container quote-1">
  <div class="quote">Testimonial...</div>
  <div class="author">Author</div>
</div>
<div class="quotes-container quote-2">
  <div class="quote">Testimonial...</div>
  <div class="author">Author</div>
</div>
<div class="quotes-container quote-3">
  <div class="quote">Testimonial...</div>
  <div class="author">Author</div>
</div>
...
</body>

My jQuery used to change the testimonial:

$(function(){
$('#quotes-wrapper').load('/static-files/testimonials.html div.quote-1');
});

As you can see all I need to do is to manually change div.quote-1 to div.quote-2 or div.quote-3 and so on.

But I know there’s got to be a way to have jQuery change these testimonials ‘dynamically’ every Monday (or Tuesday, or any day I choose for that matter), and not have to keep reminders around to not forget to change the testimonials every Monday.

Any ideas how can this be accomplished?

Thanks in advance.

  • 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-16T19:49:01+00:00Added an answer on May 16, 2026 at 7:49 pm

    You could find out the week of year to select the div:

    (got the code from http://javascript.about.com/library/blweekyear.htm)

    Date.prototype.getWeek = function() {
      var onejan = new Date(this.getFullYear(),0,1);
      return Math.ceil((((this - onejan) / 86400000) + onejan.getDay()+1)/7);
    }
    $(function(){
      var today = new Date();
      var weekno = today.getWeek();
      $('#quotes-wrapper').load('/static-files/testimonials.html div.quote-'+weekno);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let me start by saying that I'm not a JavaScript programer or a jQuery
Let me start out by saying that I'm not a JavaScript developer so this
Let me start out by saying that I'm not a C developer and I
Let me start of by saying that I am inexperienced with JavaScript. Here is
Let me start off by saying that I am very new to WPF and
Preface Let me start off by saying that I'm a relatively new programmer and
Let me start off by saying that I am not an expert in C.
Let me start by saying Javascript is not my strong point, and all of
First of all let me start by saying that this question is not about
Let me start by saying that I do not advocate this approach, but I

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.