2

Is there any plugin for firebug that lets you inspect data stored on elements using the data() method?

Thanks

Johan
  • 35,120
  • 54
  • 178
  • 293

3 Answers3

2

Found the answer myself: http://firequery.binaryage.com/

Johan
  • 35,120
  • 54
  • 178
  • 293
0

.data() stores the data in an internal cache so there is no easy way to know what is attached to each element. The html5 data attributes, if set, are used for initial values of .data()

Nicola Peluchetti
  • 76,206
  • 31
  • 145
  • 192
0

If you don't feel like installing a plugin, you can use the regular Firebug debugger. Simply copy the data object into a local variable first.

var myDataAll = $("#myElement").data();
// Stop at the next line in the debugger and examine myDataAll.

or

var myDataSpecific = $("#myElement").data("myKey");
// Stop at the next line in the debugger and examine myDataSpecific.
Jeremy Frank
  • 743
  • 1
  • 7
  • 10