Hi there,
You could do it like this: var path = $('img').attr('src'); var fileName = path.slice(path.lastIndexOf('/')+1); --Karl ____________ Karl Swedberg www.englishrules.com www.learningjquery.com On Jun 11, 2008, at 7:36 PM, yo2lux 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!