I have this code to give me a rollover on submit buttons, and I\'m trying to make it more generic:
$(\'.rollover\').hover(
function(){ // Change
To manipulate the file name and append "-over" you simply have to do some Javascript string manipulation, like this:
function appendOver(srcPath){
var index = s.indexOf('.');
var before = s.substr(0, index);
var after = s.substr(index);
return before + "-over" + after;
}
This should return the original filename (in all possible formats) and add the '-over' string just before the extension dot.