Hello World! I have a question about making a custom tags PART 2... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Hello World! I have a question about making a custom tags PART 2...

So yeah, I have made so many custom tags but I just think that how to make a custom tags with a custom attribute, I searched but it says I got to use the "getAttribute" and the attribute "data-" with it for making a custom tags, I don't wanna use the attribute "data-" for making my custom attributes, and I just got to use the "getAttribute" in JS ( Extra: I don't know what is getAttribute in jQuery tho ), I'm planning to make a new tag and here's the example: ( I don't wanna give the tag name I wanna name 'cause you will already solve it, I wanna learn too ) <count until="500"></count> Just like the counter++ and counter += 1; ... It will keep counting until 500, is that possible?

24th Feb 2021, 11:40 AM
trash
4 Answers
+ 4
https://code.sololearn.com/We41qo6xn6E6/?ref=app
24th Feb 2021, 11:50 AM
SAN
SAN - avatar
+ 2
https://code.sololearn.com/WlDgdnv0q45n/?ref=app in jqeury, getAttribute method is attr(), however I don't think you can use it in HTMLElement custom component.
24th Feb 2021, 10:04 PM
Calviղ
Calviղ - avatar
+ 2
ŚĄŃ Calviղ Thank you for answering the question! I've been working for this since Feb 20 but it seems to doesn't work and can't still find the answers out but this helped me out, thank you! I'm gonna work for removing the "data-" attribute or tags until now on...
25th Feb 2021, 1:32 PM
trash