javascript - Bootstrap4 Tooltip toogle -


i'm looking have toggle bootstrap tooltip when video has been watched tooltip has green background, when it's unselected has red backgronund.

i've got half working when start clicking through tabs doesn't update propertly.

full jsfiddle:

https://jsfiddle.net/an437a2l/2/

js:

$(".input-group__btn").on("click", function() {   $(this).children(".fa-arrow-right").toggleclass("fa-arrow-down");   $(this).siblings(".results").fadetoggle(); });  $(".results__selection").on("click", function() {   $(this).children(".fa-check").toggle();   $(this).children(".results__deselect").toggleclass("results__show");   if ($(".results__deselect").hasclass("results__show") && $(this).children(".results__deselect").css("display") === "inline") {     $("body").addclass("tooltip-deselected");   } else {     $("body").removeclass("tooltip-deselected");   } });  // tooltip $(function() {   $('[data-toggle="tooltip"]').tooltip() }) 


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

Laravel mail error `Swift_TransportException in StreamBuffer.php line 269: Connection could not be established with host smtp.gmail.com [ #0]` -

c# SetCompatibleTextRenderingDefault must be called before the first -