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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:28:53+00:00 2026-06-09T18:28:53+00:00

The capitalisation script in an external file: function capitalise(str) { if (!str) return; var

  • 0

The capitalisation script in an external file:

function capitalise(str) {
        if (!str) return;
        var counter = 0;
        var stopWords = ['is','a','an','and','at','but','by','far','from','if','into','in','of','off','on','or','so','the','to','up','with'];
        str = str.replace(/\b\S*[a-z]+\S*\b/ig, function(match) {
            counter++;
            return $.inArray(match, stopWords) == -1 || counter === 1 ? match.substr(0, 1).toUpperCase()+match.substr(1) : match;
        });
        return str;
    }

The inline JavaScript:

<ul class="nav-swap-video">
    <li><a id="nav-content1" class="" href="#st-mv1" onclick="changeVideo('../video/video_arriving.mpg');setTagContents('heading', 'Arriving');switchButton('1')" title="Arriving">Arriving
      <div class="video-nav-bottom"></div>
      </a>
    </li><li><a id="nav-content2" href="#st-mv2" onclick="changeVideo('../video/video_in_bag.mpg');setTagContents('heading', 'In the bag');switchButton('2')" title="In the bag" class="">In the bag
      <div class="video-nav-bottom"></div>
      </a>
      </li><li><a id="nav-content3" href="#st-mv3" onclick="changeVideo('../video/video_getting_ready.mpg');setTagContents('heading', 'Getting ready');switchButton('3')" title="Getting ready" class="nav-on-xx">Getting ready
      <div class="video-nav-bottom"></div>
      </a>
    </li><li><a id="nav-content4" href="#st-mv4" onclick="changeVideo('../video/video_after_swim.mpg');setTagContents('heading', 'After a swim');switchButton('4')" title="After a swim" class="">After a swim
      <div class="video-nav-bottom"></div>
      </a>
    </li></ul>

I need to Capitalise the Set Tag Contents after it has been set.

  • 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-09T18:28:54+00:00Added an answer on June 9, 2026 at 6:28 pm
    $('.nav-swap-video li a').bind('click', function() {
            setTimeout(function() {
            $('#heading').text(capitalise($('#heading').text()));
        }, 0);
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying on do a sum of the column Market Capitalization but I'm
I'm looking for a function to convert a string of text that is in
So I've run into a somewhat maddening bug (perhaps) with Visual Studio database projects,
I've seen the switches below on an rsync script and I just wondered if
I am looking for a way to translate a keypress into the string corresponding
I've used Textmate for a couple of years, but for Objective-C I'm finding that
Not sure how to phrase this question, but here is the problem. I have
Greetings, I want to capitalize each word in a script, for this I have
I'm using two css id with same name in same page but with a
I am pulling values submitted from a form and displaying them in a couple

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.