jquery - Retrieving option id with bootstrap-select -


i'm using bootstrap select, here code:

<select class="selectpicker">     <option id="mk12bd">mustard</option>     <option id="tk22fd">ketchup</option>     <option id="mg32br">relish</option>   </select> 

suppose perform $(".selectpicker").val() this: mk12bd or whatever selected.

but when perform:

$('.selectpicker').selectpicker(); 

if perform $(".selectpicker").val() this: "mustard" or whatever selected.

my original layout lost , id's gone it, ui logic uses them call web services, there way keep them in new layout using bootstrap-select?

thanks in advance!


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -