I have this executed html:
And I am using this code to make it play the span clicked word :
precode
var pText = ['hello','my','name','is','and','i','like','food','every','day','and','every','night'];
populate(pText);
function populate(pText) {
for(var n=0; n < pText.length; n++)
{
$('[name=p1_1]').append('<span id="s' + n + '"><audio id="a' + n + '" src="https://ssl.gstatic.com/dictionary/static/sounds/de/0/' + pText[n] +'.mp3" type="audio/mpeg"></audio>' + pText[n] + '</span> ');
}
}
$("span").on("click", "#page1_p1_1", function(){
console.log('test');
$(this).find('audio')[0].Play();
});
/code/pre
I am using a full page on the app which is designed under the tablet, and I am unable to see in the console.log(test), or the word 'test' in console when i click on any of the words. Is there any reason for this you can see ?
Thanks