Why not assigned a value in the attribute data-autorNAME?

Trying to adapt this gallery vodkabears.github.io/galereya
Apply it on the page: https://pl-galerie.ru/galerie/
I want to add a new attribute to the picture: data-autorNAME. Value is assigned using PHP. When you view the page's source code shows that the attribute value is not empty.
Tests have shown that the area code
autorNAME:a.autorNAME||""
and on the site
autorNAME:b.getAttribute("autorNAME")||""
in autorNAME is assigned an empty string. What could be wrong?
The previous attributes data-detail data-autorURL handled correctly
June 8th 19 at 16:49
2 answers
June 8th 19 at 16:51
Solution
Alternatively, replace autorNAME:b.getAttribute("autorNAME")||"" on autorNAME:b.getAttribute("data-autorNAME")||""
:)
Sure)) thank you - cheyanne57 commented on June 8th 19 at 16:54
This answer is incorrect - sally_Carro commented on June 8th 19 at 16:57
are , well, true, but not for Feng Shui =) - Lulu_Zulauf71 commented on June 8th 19 at 17:00
isspecification how to call date attributes because I for Shui Shui - sally_Carro commented on June 8th 19 at 17:03
June 8th 19 at 16:53
First, to use need lower case
Secondly, you need to get from the dataset

<div id="b" data-author-name="ivan">
...
</div>


var name = b.dataset.authorName;
alert(name);
This answer is correct - cheyanne57 commented on June 8th 19 at 16:56

Find more questions by tags JavaScript