Created
December 29, 2015 19:13
-
-
Save maxkostinevich/cc9d870175958ad1614a to your computer and use it in GitHub Desktop.
JS: Get <img> file name using regexp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var previewImg = $(this); | |
var previewImgSrc=previewImg.attr('src'); | |
var previewImgName=previewImgSrc.match('[^/]*$'); // Get image name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment