Hello. Got a question:
Suppose we have several links with data-attributes. For example:
<a href="#manual-modal" class="to_modal" data-desc="Descr #1" data-name="Name #1"></a> <a href="#manual-modal" class="to_modal" data-desc="Descr #2" data-name="Name #2"></a> <a href="#manual-modal" class="to_modal" data-desc="Descr #3" data-name="Name #3"></a> By clicking, I need to get the data from the data-attributes in order to display them in a modal window. But here's the problem: the id of the links is the same. How, then, to get the data from the link on which the click occurred?
Thanks for answers.
id у ссылок один и тот же- id or nonetheless class . If id is better then redo it, otherwise you won’t get any problems - Alexey Shimansky