Answer the question
In order to leave comments, you need to log in
Checking if a js file exists?
I check the existence of the file in the following way:
$.ajax("http://yoursite.ru/your/cool/path/your_cool_file.mp3", {
success: function() {
// Run your mp3 player
},
error: function() {
alert("An error occured. We can not play the audio");
}
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question