javascript - Silviomoreto bootstrap-select tooltip on options -


silviomoreto bootstrap-select add select "display:none":

enter image description here
, make visible 'ul' this:

enter image description here

i change select dynamically:

for(var key in value) {     $(this)         .append($("<option></option>")         .attr("value", key)         .text(value[key]));  }               $(this).selectpicker('refresh'); 

how can dynamically add tooltip each option?

you'll need add tooltip each generated li element, rather option elements (after bootstrap-select initialized). can access generated li elements using data('selectpicker').

$('#selectid').data('selectpicker').$lis.attr('title', 'new title').tooltip(); 

Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

php - Improving script execution time -

How to provide Authorization & Authentication using Asp.net, C#? -