javascript - Re-sizing Bootstrap Popover with JS - Multiple Popover Issue -
i have multiple bootstrap popovers
, i'm trying re-size them needed js.
everything works if have 1 of these re-size functions , 1 clicked first work. tried merge them, rename them id
or class
, nothing works me.
my buttons
<a role="button" class="btn-default a" data-container="body" data-toggle="popover" data-placement="left" id="a">button a</a> <a role="button" class="btn-default b" data-container="body" data-toggle="popover" data-placement="bottom" id="b">button b</a>
any way have multiple of these alongside?
// button class var p = $('#a').popover(); p.on("show.bs.popover", function(e) { p.data()["bs.popover"].$tip.css("max-width", "300px"); }); // button class b var p = $('#b').popover(); p.on("show.bs.popover", function(e) { p.data()["bs.popover"].$tip.css("max-width", "500px"); });
btw have tried control size of these popovers
css
styles without luck.
Comments
Post a Comment