I’ve got a site I’m working on and there’s a file path that’s being output in the HTML that needs fixing (I don’t have access to the DB to fix it). I’ve got a div with a class of “header_vs2”. The text shows up (assets/templates/tides/images/no-logo.gif) that is referencing an image but there’s no open and close image tags:
<div class="header_vs2">
<div class="header_vs2_social_media blank">
</div><!-- end .header_vs2_social_media -->
assets/templates/tides/images/no-logo.gif
</div>
How do I write a jQuery statement that when this image path shows up that I insert before the statement an open image tag and close tag after the file path? My goal is to get this:
<div class="header_vs2">
<div class="header_vs2_social_media blank">
</div><!-- end .header_vs2_social_media -->
<img src="assets/templates/tides/images/no-logo.gif" />
</div>
Try this on for size
You can see it in action at this fiddle: http://jsfiddle.net/6PNHj/