In Progress

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: sort array, single match, jquery libraries, make website using html, design website asp, library sort, best webpage design, 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, jquery index, javascript text, jquery replace, using variables url, jquery sort, jquery text sort, sort jquery, javascript url parameter

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

Project ID: #1133121

Awarded to:

rmash

Please see PM.

$30 USD in 1 day
(80 Reviews)
6.2

5 freelancers are bidding on average $30 for this job

VileGnosis

Details in PMB

$30 USD in 0 days
(95 Reviews)
6.1
muzkle

Check PMB pls! Ready to start now!

$30 USD in 1 day
(99 Reviews)
5.9
laleshii

Hello! Check PMB for my offer ! Thank you !

$30 USD in 0 days
(3 Reviews)
3.9
itambassadorz

Ready to start

$30 USD in 0 days
(10 Reviews)
3.9