Script needed involving a javascript array

I've got a small javascript project using jquery. I would like to replace text on our webpage (provided by our vendor) with the text plus links. These pieces of text represent library locations. There are a 27 possible library locations that link to an information page for each library.

Using Jquery, I've been able to make this work for a single location:

$('[url removed, login to view]:not(:has(>div))').each(function() {

$(this).html($(this).html().replace("Central", "<a href='[url removed, login to view]' target='_blank'>Central</a>"));


You can see what I am doing here, but I've got 27 locations and I'm sure the best way to handle the replace function for these locations is looping through some kind of javascript array checking for matches on the location name, but I'm not sure how to handle it.

I need a script that will loop through the array and return variables that will return not only one of 27 possible library names (e.g, Central) based on what appears on the page, but also a particular ID parameter of the url (e.g.,6).

The ID parameter is always a number between 1 and 27 and is unique to each library location. I could set up the ID to match the index number in the array, but I'm not sure how that would work combined with the library name unless it's a hash of some sort.

If you can help me I would greatly appreciate it.

Skills: Javascript, jQuery / Prototype, Website Design

See more: array javascript array jquery, the best webpage, sort array c, single match, jquery libraries, how to make a website using html, how to design a website in asp, c plus plus array, c library sort, best webpage design, a. m. best, what is a javascript, small javascript project, make loop, jquery script, javascript small project html, jquery html sort, text hash, asp small script, replace text html, text javascript, javascript single page, http javascript, jquery index, javascript text

About the Employer:
( 4 reviews ) Milwaukee, United States

Project ID: #1133121

Awarded to:


Please see PM.

$30 USD in 1 day
(80 Reviews)

5 freelancers are bidding on average $30 for this job


Details in PMB

$30 USD in 0 days
(95 Reviews)

Check PMB pls! Ready to start now!

$30 USD in 1 day
(99 Reviews)

Hello! Check PMB for my offer ! Thank you !

$30 USD in 0 days
(3 Reviews)

Ready to start

$30 USD in 0 days
(10 Reviews)