try{// Go to top $('.btn-go-to-top').remove(); $('body').append(''); if($(window).scrollTop() > 600){ $('.btn-go-to-top').stop(true,false).fadeIn(100); }else{ $('.btn-go-to-top').stop(true,false).fadeOut(100); } $(window).scroll(function(){ if($(window).scrollTop() > 600){ $('.btn-go-to-top').stop(true,false).fadeIn(100); }else{ $('.btn-go-to-top').stop(true,false).fadeOut(100); } }); $('.btn-go-to-top').click(function(){ $('body').animate({scrollTop: 30},0).animate({scrollTop: 0},200); }); //live tooltip $('body').on('mouseenter', '[data-toggle="tooltip"]', function(){ var el = $(this); if (el.data('tooltip') === undefined) { el.tooltip({ placement: el.data("placement") || "top", container: 'body' }); } el.tooltip('show'); }); $('body').on('mouseleave', '[data-toggle="tooltip"]', function(){ $(this).tooltip('hide'); });}catch(e){}