I was wondering if it was possible for jQuery to find a file extension based on a returned string?
A filename (string) will be passed to a function (openFile) and I
You can use a combination of substring and lastIndexOf
Sample
var fileName = "test.jpg"; var fileExtension = fileName.substring(fileName.lastIndexOf('.') + 1);