Change image source if file exists
<p>I have <a href="http://jsfiddle.net/rcebw/3/">http://jsfiddle.net/rcebw/3/</a></p>

<p>The point of this is I will have numerous of these <code>inlinediv</code> divs. Each one has 2 divs inside it, one which holds an image and one which holds a link. These are generated dynamically from a list of the subsites on another site.</p>

<p>What I want it to do is check each div with the class <code>inlinediv</code>. Get the inner text of the link in div <code>iconLinkText</code> and search for a file with that name at the site. (http://www.mojopin.co.uk/images/ for this test.) If it exists then change the image src to it.</p>

<p>I am probably taking the absolutely wrong route for this but I can't seem to get it to work. When testing it can't even find the <code>inlinediv</code> div! Says it's null.</p>

<p>I'm pretty new to jQuery but does anyone have any advice? (I don't even know if I've explained myself well!)</p>
