I have a li element that I want to transform to a link. I have a script below that identifies the text - from here I want to make it a link instead. I want to use the string as a value in the link.
The label looks like this:
<li><label>Spårningsnummer</label>JVGL123456789</li>
And I want to append a link inside the label or replace the label with an a element with a link that looks like this:
http://www.dhl.se/sv/express/godssoekning.html?AWB=JVGL123456789&brand=DHL
Where this number is dynamic:
JVGL123456789
Script so far:
<li><label>Spårningsnummer</label>JVGL123456789</li>
if ($('fieldset li:contains("JVGL")').length > 0) {
}
I understand how to append pr replace the element with a static link - but how do I get the value from the string in my link?