$('img').click(function(){
var add_to_list = $(this);
// database query for element
});
Currently add_to_list
is getting the value 'images/image.jpg'
. I want to replace the 'image/'
to nothing so I only get the name of the picture (with or without the extension). How can I do this? I couldn't find anything. Also please provide me with further reading on string manipulation please.