This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README.md | Mon Jun 15 02:33:47 -0700 2009 | |
| |
commentdata.js | Mon Jun 15 02:12:40 -0700 2009 |
README.md
commentData.js
commentData allows you to specify JSON metadata for your HTML elements. Data can be retrieved through the commentData function. Example usage:
<div id="something">
<!--{ someData: 123, other: 'foo' }-->
<p>... Other content...</p>
</div>
var something = document.getElementById('something');
var data = commentData( something ); // <= { someData: 123, other: 'foo' }
data.someData; // <= 123
JSON data specified in any comment is tied to the parent element (relative to the comment).
Note: commentData CANNOT be used with self-closing HTML elements, such as <img/>







