jQuery(document).ready(function ($) { // extension method: $.fn.classChange = function (cb) { return $(this).each((_, el) => { new MutationObserver((mutations) => { mutations.forEach( (mutation) => cb && cb(mutation.target, $(mutation.target).prop(mutation.attributeName)) ); }).observe(el, { attributes: true, attributeFilter: ["class"], // only listen for class attribute changes }); }); }; if ($(".drts-slider-photos-main")[0]) { slickoptions = $(".drts-slider-photos-main").data("slick-options"); slickoptions.arrows = true; $(".drts-slider-photos-main").data("slick-options", slickoptions); } function removePagination(){ $(".oxy-easy-posts-pages").show(); if($(".oxy-posts.wpgb-enabled .oxy-post").size() < 16){ $(".oxy-easy-posts-pages").show(); } } const $foo = $(".wpgb-facet-1").classChange((el, newClass) => removePagination() ); // setTimeout(function() { // $(".drts-bs-dropdown-menu.drts-bs-show > button:nth-child(1)").text('Company'); // $(".drts-view-entities-sort-selected").text('Sort by: Company'); // }, 200); });