I usually use firebug to troubleshoot JavaScript.
Other than inserting script like I did below, is there an easy way to view jQuery data() associated with an element using Firefox/Firebug? I am open to other tools such as Chrome if necessary.
<div id='foo' data-bar='hello'></div>
...
$('#foo').data('bar','goodby');
...
console.log($('#foo').data('bar'));
You can enter JavaScript into most debugging consoles; if you type in your code and press enter you will see it's output beneath, like so:

The above example is from Chrome.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With