R
R
Roman2020-10-06 01:34:31
Laravel
Roman, 2020-10-06 01:34:31

How can Laravel livewire hide the list when no input is active?

Using livewire in Laravel 7

<input type="text" wire:model="query">
        <ul>
            @foreach($tops as $top)
                <li>
                    <p>
                        {{ $top->Name }}
                    </p>
                </li>
            @endforeach
        </ul>


How to hide the list while there is no focus on the input. Display the list when there is focus and values ​​are being entered, and hide again when the input is no longer focused?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Kokhan, 2020-10-06
@gagablik

Jquery to help you - https://basicweb.ru/jquery/jquery_event_focus.php

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question