I have the following scenario.
I show the user some audio files from the server. The user clicks on one, then onFileSelected is eventually executed with both the sel
JQuery follows the CSS-esque declaration:
Instead of doing
function onFileSelected(file, directory) {
jQuery('embed#audio_file').attr('src', '/resources/audio/'+directory+'/'+file);
};
Rather do
function onFileSelected(file, directory) {
jQuery('#audio_file').attr('src', '/resources/audio/'+directory+'/'+file);
};
That way, jQuery only retrieves object of id="audio_file".