Twitter bootstrap – jQuery Variables or addClass()/removeClass() to Keep Track of Selected Element
My goal is to keep track of an element that has an active Twitter Bootstrap popover. There can be only one such element at the same time. Here's the relevant code: $(document).ready(function() { $(".word").on("click", function(e) { e.stopPropagation(); if (!$(this).hasClass("popover-active")) {…