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

How to get the arclen between two curve points in Maya? -

git svn - Unignore directories in git-svn (adding directories to a sparse checkout) -

C++ Linked List -