ja.son-williams.ca/www/themes/jason-williamsca/assets/javascript/common.js
Jason Williams b5014cae5b Final updates and tweaks in preparation for MVP launch
- Removed unused items from the footer
- Fixed language files to cover all variants of English
- Added Google Analytics tracking code
2020-10-25 12:40:21 -06:00

26 lines
769 B
JavaScript

$(() => {
// Enable any tooltips on the page
$('[data-toggle="tooltip"]').tooltip()
// Enable masonry layout
$('.masonry').each(function() {
var opts = { itemSelector: '.masonry-item' }
if ($(this).hasClass('masonry-horizontal')) opts.horizontalOrder = true
$(this).masonry(opts)
})
// Resize textareas to fit their content
$('textarea').each(function() {
$(this).height($(this)[0].scrollHeight)
})
// Use google analytics in production
if (!window.location.hostname.includes('dev')) {
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-167178542-1');
}
});