There is a project page on which the user:
1. Select a city, displaying the event plan.
2. Selects the event time at the event, displaying the description of the individual event.
In paragraph 2, the formula is used:
... newContent += times[loc][i].title.replace(/ /g, '-') + '">'; ..
which loads the event description by the identifier obtained from the title element of the JSON file with the event event names (here: 3D modeling):
{ "CA": [ { "time": "9:00", "title": "3D-ΠΌΠΎΠ΄Π΅Π»ΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅" }, ...
looks for the corresponding identifier (i.e., <code>3D-ΠΌΠΎΠ΄Π΅Π»ΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅</code>
) in the html file and displays the description on the page (in this case it does not work, because the identifier in Latin is Intro-to-3D-Modeling
):
... <div id="Intro-to-3D-Modeling"> <h3>3D-ΠΌΠΎΠ΄Π΅Π»ΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅</h3> <p>ΠΠΏΠΈΡΠ°Π½ΠΈΠ΅</p> </div> ...
The problem is that if in the JSON file the text in the title elements is specified in Cyrillic, descriptions are not displayed. If the Latin - everything works. JSON Latin can not write, because the same text is displayed on the web page. Naturally, I can not write the values ββof the attributes id in Cyrillic. How to be?