• Resolved webwitnl

    (@webwitnl)


    Hi, I use fibosearch with a darkened background on desktop. When you click outside the search container, the container is closed and the page returns to normal.

    Is there a way to trigger this event from my own javascript? I want to do something like “fibosearch->hide()”

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Damian Góra

    (@damian-gora)

    Hi @webwitnl

    The simplest way to do this is to find the first search instance and call disableOverlayDarkened() on it. I believe this will help you:

    jQuery('.dgwt-wcas-search-input').first().data('autocomplete').disableOverlayDarkened();

    Alternative version with checking everything to prevent errors:

    if (window.jQuery) {
    const $input = jQuery('.dgwt-wcas-search-input').first();
    if ($input.length) {
    const fiboAutocomplete = $input.data('autocomplete');
    if (fiboAutocomplete) {
    fiboAutocomplete.disableOverlayDarkened();
    }
    }
    }
    Thread Starter webwitnl

    (@webwitnl)

    Thanks a lot, that did the trick!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Closing the results’ is closed to new replies.