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;
const textArea = document.createElement('textarea');
textArea.textContent = copyText;
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';
}
function resetToolTip() {
var tooltip = document.getElementById('myTooltip');
tooltip.innerHTML = 'Copy to Clipboard';
}