I'm getting firebug errors (when firebug is open on page refresh) when using the exact same code from the data() docs page:
http://api.jquery.com/data/<div data-role="page" data-hidden="true" data-options='{"name":"John"}'></div>
- $("div").data("role") === "page";
- $("div").data("hidden") === true;
- $("div").data("options").name === "John";
WITH FIREBUG OPEN (new page refresh):
- $("div").data("role") === undefined;
- $("div").data("hidden") === undefined;
- $("div").data("options").name === firebug console error: $("div).data("options") is undefined;
WITH FIREBUG CLOSED (new page refresh)
Everything works like it should.
I HAVE CREATED A TEST PAGEhttp://jsbin.com/osiyi- Load it once with firebug turned off (minimized is fine)
- open firebug, refresh the page
- click to see undefined's and the errors in your console.
I know this affects a very small amount of users, but I can't properly debug with firebug while this is happening.
BUT, IF I SET THE DATA VALUES USING jQUERYhttp://jsbin.com/osiyi/3Everything works whether you have firebug open or not.
Is this the way this is supposed to work, or have I discovered a new bug?