Hi I am placing my results in a modal wich work just fine. But I would like to only open the modal if there are results and give a alert if there are no result.
Is there any documentation that you are following?
If I've understood what you want to do, then you would need to modify the solution shown in the other thread so that all of the markup for the modal was moved inside of the wpv-items-found shortcode (so that it was only output when there were results to show, rather than always as it is currently).
Then in the wpv-no-items-found section, you could add a script tag containing an alert command, which would only be added to the page when there are no results to show.
The topic ‘[Closed] JS Frontend Event dependent on results or no results.’ is closed to new replies.