0

Highlight searchresults and close button

https://code.sololearn.com/WSrEXLmHXLOZ/?ref=app Need help to make highlighted match from search. Preferrably background color change. The code til now opens every parent detail element that has a text match within it. Background color shpuld change back when new search has been done. I also need a "close" button for the opened details.

19th Mar 2021, 12:43 PM
Adrian Kydland Skaftun
Adrian Kydland Skaftun - avatar
1 Réponse
+ 1
use filter on keydown to get the search result. addEventListener(onkeydown) on input tag and filter the results based on the input
19th Mar 2021, 12:53 PM
Sharique Khan
Sharique Khan - avatar