Are those data attributes part of hmtl5? Are they used by jQuery? I though data- attributes are generic. Why does one bring up a confirmation box and how does the link be converted to POST when data-method is post?
I have searched for these attributes in the web but could not find anything useful. I just saw those attributes are often mentioned with ruby stuff.
Is there any official documentation?
Update:
I found out know that they are used in Yii2. However, it seems that other (ruby) frameworks using those attributes in the same way (example). That seems to be the reason why I've got the impression that it is part of jQuery or html5.
Are those data attributes part of hmtl5?
Data attributes are. Those specific ones are not. The whole point of data attributes is that they are for custom extensions.
Are they used by jQuery?
Only in the sense that it provides an API to interact with data attributes in general.
I though data- attributes are generic.
They are.
Why does one bring up a confirmation box and how does the link be converted to POST when data-method is post?
Because JavaScript code on the page looks for them.
Is there any official documentation?
The spec.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With