ja.son-williams.ca/www/themes/jason-williamsca/assets/javascript/common.js

17 lines
485 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)
})
});