I've got a few strings which contain youtube links (different lenghts and positions in the string, not every string contains an URL) and text. These strings will be written into paragraph-tags but i want the URLs to be clickable, so i need anchor tags around the URL.
I managed to find a way to access the paragraph which contains a link:
if($("#facebookFeed p:contains('http')").length){
//do stuff
}
I'm stuck here and not sure if thats the right way to do it.