javascript - Silviomoreto bootstrap-select tooltip on options -
silviomoreto bootstrap-select add select "display:none":

, make visible 'ul' this:

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
Post a Comment