Я пытаюсь восстановить height/width
из Bootstrap popover динамически. У меня есть контекст, который я пытаюсь захватить height/width
:Получить высоту/ширину бутстрапа 4 popover?
console.log(context);
console.log(context.getBoundingClientRect().height);
console.log(context.getBoundingClientRect().width);
Это выводит Bootstrap элемент:
<div class="popover fade bs-tether-element bs-tether-enabled bs-tether
element-attached-middle bs-tether-element-attached-left bs-tether-target
attached-middle bs-tether-target-attached-right in" role="tooltip"
id="popover537457" style="top: 0px; left: 0px; position: absolute; transform:
translateX(904px) translateY(227px) translateZ(0px);"><h3 class="popover
title"></h3><div class="popover-content"><div class="tooltip-content">To learn
more about naming convention please <a href="#">click here</a></div></div
</div>
height/width
однако, что я console log
выше возвращения 0. Кто-нибудь знает, как я могу выполнить извлечение height/width
Bootstrap 4 popover?
Добавьте свой html, css и javascript в jsfiddle ... вам будет лучше понять и помочь. –