I am creating a search bar where the user can select parameters which creates a chip in the search bar. This chip will be created dynamically for every selection in a div with the class name 'chips'. After submitting the selection, the page redirects based on the selection. As the chips were dynamically created, they will be deleted on page reload. My question: Is there a way to store this dynamic data without deleting it after the page refresh?
<div class="chips" id="createdChips" >
<span> class ='someclass' </span>
<span> class ='someclass' </span>
</div>
You can store your dynamically created data in cookies or session storage. When your page load, search if there's data stored in above storage and draw the chips based on data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With