Say I have the following:
<img src="http://www.site.com/folder/pic.jpg">
This path could be anything, we basically want to get the "pic.jpg as a variable.
Currently we are doing it like so:
var first_img = $("#thumbnail-area li:first").find("img").attr("title");
Which sets the first_img
variable as the image src, but we want to do a preg match kinda thing like in PHP to grab the "pic.jpg".
This has to work properly, so the path could be: folder/foo/bar/x982j/second822.jpg
and it'd return second822.jpg
How can I do this?