I am trying to change the class of a element with Javascript using the below code:
parent.document.getElementById('<?php echo $markid ?>').class = 'unlistened';
Not having much luck though. How do I do this properly?
Use jQuery...
$("tagname").addclass("unlistened");
http://docs.jquery.com/Attributes/addClass