Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Masonry custom size › Reply To: Masonry custom size
March 23, 2023 at 3:37 pm
#41931
Keymaster
The stacking I think can be resolved by triggering a window resize event with a delay, something like this:
add_action('wp_footer', 'asp_add_footer_script', 99999);
function asp_add_footer_script() {
?>
<script>
document.querySelectorAll(".asp_main_container").forEach(function(el){
el.addEventListener("asp_search_start", function(event) {
setTimeout(function(){window.dispatchEvent(new Event("resize"));}, 500);
});
});
</script>
<?php
}
The hover state is a bit more problematic, that will have to be custom coded within the template fie that I sent you earlier. Unfortunately I am not available for custom jobs, I have years and years of work stacked, I am sorry. It should not be too difficult though, the plugin automatically adds a “hovered” subclass to each item whenever they are hovered, so a simple custom positioned DIV with the details should do the trick.