I'm new to the Bootstrap Twitter framework, and I need to use bootstrap-typeahead.js for autocomplete but I need also to get the value selected by the user for the typeahead.
This is my code:
<input type="text" class="span3" style="margin: 0 auto;"
data-provide="typeahead" data- items="4"
data-source='["Alabama","Alaska"]'>
How can I add a listener to get the selected value from type typeahead and pass it in a function? For example when I use ExtJs, I apply this structure:
listeners: {
select: function(value){
........
}
}
How can I do something similar with a typeahead?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…