When creating websites I often use jQuery’s .data() function to add data to elements.
Is it possible to view all data which is stored with an element in Chrome?
So when I inspect an element it shows the data in Chrome itself.
If not would it be possible to write a plugin to ‘extend’ to Chrome element inspector to also show to data?
Open the inspector, and into the console, type
and then hit return to evaluate the
data()method and show its return value directly.There’s no need to use
console.logunless you’re calling it within non-interactive code.