showing results for - "js split last occurence"
Issam
05 Aug 2016
1  var lastIndex = src.lastIndexOf('.');
2
3  // Add the string before the last .
4  // Return updated string, this will update the src attribute value
5  return src.substr(0, lastIndex) + '-fx' + src.substr(lastIndex);