G
G
gofree2018-02-23 20:23:36
AJAX
gofree, 2018-02-23 20:23:36

How to replace element.attributes in AJAX with .attr()?

size.element.attributes[2].value
size:
5a904dacb5476361215763.png
How to get data from data-* using .attr() instead of the way above?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
po5epT, 2018-02-24
@po5epT

element.attr(data-name);
or
element.data(name);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question