I’m using jQuery, what would be the best way to get every element with a certain property?
I want to give some elements a ‘tooltip’ property so I can run some jQuery over it and make some special tooltips for specific elements. How can this be done?
I’m using jQuery, what would be the best way to get every element with
Share
Use the attribute selector:
EDIT: Other users have posted tooltip=’tooltip’ – that will select elements with a specific value for tooltip. My suggestion will select any div with a tooltip attribute defined.