jQuery grab specific img src folder name
<p>So my img src generates like this <code>img/0001/name0001/img0001.jpg</code> and im trying to grab <code>/name0001/</code> only any idea ? thanks!</p>

<p>my code:</p>

<pre><code>var parent = $('.img');
    $(parent, document).click(function() {

        var dirz = this.src;
            var dirb = dirz.split('/')[2];
            alert(dirb);
});
</code></pre>

<p>it alerts with blank?</p>
