var path = $('img').attr('src').replace(/.*\//, '');

Actually, I like Ariel's solution better as it's more readable.  I
just have a personal compulsion to solve every problem with regex.



On Jun 11, 4:36 pm, yo2lux <[EMAIL PROTECTED]> wrote:
> path variable store the following: /themes/mytheme/images/logo.gif:
>
> var path = $('img').attr('src');
>
> is possible to obtain the image name without path ? I need logo.gif
> I need a Javascript or jQuery function to solve this?
>
> Thanks!

Reply via email to