Skip to main content
Level 3
Feb 24, 2025 4:18 PM UTC
Question

Target activity with <svg> tag or runtime content

Hi All,

 

We are trying to create activity changing text related with <svg> tag but it's breaking the functionality of it.

it looks like to me that it's kind of runtime thing and changes to it breaks the communication of existing code.

 

 

Is there any work around for this?

1 reply

New Member
Feb 26, 2025 2:27 PM UTC

Hi @rudrawiley

As per your screen shot, you are trying to change to change the SVG attribute which contents tooltip HTML content correct ?

This can be achieved through below script on form based approach.

<script> // Get the popover element var updatePopover = $('.icon-info[data-bs-toggle="popover"]'); // Update the popover customized content and title updatePopover.attr('data-bs-content', 'Customized text content '); updatePopover.attr('data-bs-title', 'Customized text content'); // Update the popover using Bootstrap's API var popoverInstance = new bootstrap.Popover(updatePopover[0]); popoverInstance.update(); var popoverTriggerList = [].slice.call( document.querySelectorAll('[data-bs-toggle="popover"]')) var popoverList = popoverTriggerList .map(function (popoverTriggerEl) { return new bootstrap.Popover(popoverTriggerEl) }) </script>

Hope this helps !

 

Translate