I am trying to use some of the jQuery plugins for the Bootstrap framework and they use an attribute named “data-toggle”. I am getting the warning “attribute data toggle is not a valid atribute of a”.
Where does data-toggle come form?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In HTML5, any attribute that starts with
data-is a valid custom attribute. Basically, it’s a way to attach custom data to elements that aren’t explicitly defined in the HTML specification.In earlier versions of HTML, this does not validate, however. Don’t worry about that too much though. Browsers generally just ignore attributes they don’t know about. This doesn’t stop libraries like
jQueryfrom reading them.