function bsVersion() { const ver = $.fn.tooltip.Constructor.VERSION; const a = ver.split('\.'); return a[0]; // Major }
// Which class should I use to make something not show? function bsGetNoShowClass() { return bsVersion() <= 3 ? 'hidden' : 'd-none'; }
function exampleUse() { $('#mything).addClass(bsGetNoShowClass()); }