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

c# SetCompatibleTextRenderingDefault must be called before the first -

c++ - Fill runtime data at compile time with templates -

C#.NET Oracle.ManagedDataAccess ConfigSchema.xsd -