Is it possible to read a comment written in HTML? I guess comments do not form part of the DOM therefore selecting them or evening assigning classes or id's might not be an option.
Is there any way to like read the content of the body and obtain an array of comments or something like that? Jquery is ok.
I want to create a plugin or function to do something like this:
<!-- top -->
<div>top stuff</div>
<!-- Content -->
<div>content stuff</div>
<script>
var comments = $('body').getComments();
alert(comments[0]); //returns "top"
alert(comments[1]); //return "Content"
</script>
Thanks.