|
(function($) {
// MktoForms2.whenRendered(function(form) {
// });
function hideEmptyForm() {
$('.mktoPlaceholder').parent().hide();
}
var mutationObserver = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
if(mutation.type == 'childList') {
// console.log(mutation);
hideEmptyForm();
}
});
});
// Starts listening for changes in the root HTML element of the page.
mutationObserver.observe(document.documentElement, {
attributes: true,
characterData: true,
childList: true,
subtree: true,
attributeOldValue: true,
characterDataOldValue: true
});
// Anchor smooth scroll
$(document).on('click', 'a[href$="-anchor"]', function (event) {
event.preventDefault();
$('html, body').animate({
scrollTop: $($.attr(this, 'href')).offset().top
}, 500);
});
})(jQuery);
|