question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTML change for multiple class

See original GitHub issue

I have an html tooltip

<div id="home-tooltip-templates" style="display: none;">
    <img src="" alt="BBLand">
    <span class="title"></span>
    <span class="postex"></span>
</div>

and multi boxwr (.boxwr). I using jQuery to change html every hover. But it’s not working.

const tip = tippy('.boxwr', {
            html: template,
            arrow: true,
            theme: 'light',
            animation: 'fade',
            wait(show, event) {
                const popper = tip.getPopperElement(el);
                // const refData = tip.getReferenceData(template);
                // $("#home-tooltip-templates img").attr("src",event.currentTarget.dataset.src);
                // $("#home-tooltip-templates .title").text(event.currentTarget.dataset.title);
                // $("#home-tooltip-templates .postex").text(event.currentTarget.dataset.description);
                template.innerHTML = '<img src="${event.currentTarget.dataset.src}" alt="BBLand">
  <span class="title">${event.currentTarget.dataset.title}</span>
  <span class="postex">${event.currentTarget.dataset.description}</span>';
                
                tip.update(popper);
                // show();        
});

Please help

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
atomikscommented, Jun 26, 2017
0reactions
mrtungdevcommented, Jun 26, 2017

Wow, awesome. Thank you so so much

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to assign multiple classes to an HTML container? [closed]
To assign multiple classes to an html element, include both class names within the quotations of the class attribute and have them separated ......
Read more >
How to add multiple classes to HTML elements
Any HTML element can have as many different classes as needed to style the element using CSS effectively. To assign multiple classes to...
Read more >
HTML Global class Attribute - W3Schools
Attribute Values ; classname, Specifies one or more class names for an element. To specify multiple classes, separate the class names with a...
Read more >
CSS FAQ - Learn web development | MDN
HTML elements can be assigned multiple classes by listing the classes in the class attribute, with a blank space to separate them.
Read more >
How to apply styles to multiple classes at once - GeeksforGeeks
Note: This approach is mostly used to apply different CSS styles when the same class name is available in the different elements. Example...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found