Hope there’s a simple workaround for this.
I want to select all the html elements with event attributes. For example: onclick, onkeypress etc. Is there an easiest way to do this using Jquery without selecting by each attribute seperately?
Thanks
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.
I believe that the short answer to your question is no.
Different HTML tags support different events, so they should be hardcoded somewhere in the jQuery code. And reading through the jQuery code, I cannot find any reference to onkeypress event, for example.
So, I think you can just rely on Has Attribute Selector
[attribute]: