I have input text like
<input type=hidden name=xa id=xa data-placeholder=.. style =width: 360px;/>
and i using select2
$(#xa).select2({...});
now, i want to get text when i press 'get text'
$(#gettext).click(function () {
alert($('#xa').val()); // or $('#xa').select2(val);
});
But it get the id of text. It's not text. How can i do it. thanks