I am trying to add a section of code (shown below) to have my audio book picker supply an audio file name, as well as displaying the chapter and chapter number.
How can I make my added code send the second set of returned values to the input field with the id='audio', just as it sends return values to the input with the id='chapter-picker'?
var chapterPicker = myApp.picker({
input: '#chapter-picker',
rotateEffect: true,
formatValue: function (picker, values) {
return values[0] + ' ' + values[1];
},
//Start of what I am trying to add
input: '#audio',
rotateEffect: true,
formatValue: function (picker, values) {
return values[0] + values[1] + '.mp3';
}
//End of what I am trying to add
cols: [
{
textAlign: 'left',
values: ['Genesis', 'Exodus', 'Leviticus'],
onChange: function (picker, book) {
if(picker.cols[1].replaceValues){
picker.cols[1].replaceValues(chapters[book]);
}
}
},
{
values: chapters.Genesis,
width: 160,
},
]
});
Aucun commentaire:
Enregistrer un commentaire