function scrollTo(id) {
$('html,body').animate({
'scrollTop': $('#' + id).offset().top - 60,
}, 800);
}
function copyToClipboard(codeToCopy) {
/* Get the text field */
const copyText = document.getElementById(codeToCopy).textContent;
var textArea = document.createElement('textarea');
textArea.textContent = copyText;
textArea.setAttribute('id', 'temporaryTA');
document.body.append(textArea);
/* Select the text field */
textArea.select();
textArea.setSelectionRange(0, 99999); /*For mobile devices*/
/* Copy the text inside the text field */
document.execCommand('copy');
var tooltip = document.getElementById('myTooltip');
tooltip.innerHTML = 'Code Copied to Clipboard';
textArea.remove();
}
function resetToolTip() {
var tooltip = document.getElementById('myTooltip');
tooltip.innerHTML = 'Copy to Clipboard';
}
var isFF = !!navigator.userAgent.match(/firefox/i);
if(!isFF){
$('.video').on('play', function() {
$(this).parent().children(".playpause").fadeOut();
});
$('.video').on('pause', function() {
$(this).parent().children(".playpause").fadeIn();
});
}