Answer the question
In order to leave comments, you need to log in
How to create a complex dynamic modal?
There are several products on the site, for each product there is a “sort of its own modal”, but there is only one, the modal has an image slider and information, I have an idea how to display the information, but the photos in the slider are a little difficult, given that the number -the photos are different everywhere, where to store them? I tried in JSON, but I can't decode it via JSON.parse(), maybe I'm stupid, please tell me if it's not difficult. Thank you.
I do this, when I click on the "details" button for a product, I take its id from the data-modal and make a request to the JSON file. Am I doing the right thing? And what is the error in JSON? Doesn't want to decode.
dveri.commeta.pro/modals.json
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question