0

Attribute equal to another several attributes

There are several attributes of div. One of them, for example, data-percentage must be equal to another several attributes. So the result will be: data-first="one" data-second="two" data-third="three" data-fourth="one two three" How to get this in jQuery?

11th Jun 2019, 12:10 AM
Bakhrom Akbarov
Bakhrom Akbarov - avatar
1 ответ
0
I thing that is something like this $(function() { var val = $("div").attr("data-first"); alert(val); }); And son on... Here more info: https://www.sololearn.com/learn/jQuery/2794/
7th Jul 2019, 7:01 AM
Cristian Baeza Jimenez
Cristian Baeza Jimenez - avatar