I'm struggling with what I would think would be a rather simple jquery function. I have text with a span around it with the class "commentreply". I'm trying to create a jquery feature that inserts a form directly under the text that users can use to reply to a comment.
For some reason I cannot for the life of me get jquery to select the "commentreply" class in order to manipulate the DOM via a click.
<script type="text/javascript">
$(document).ready(function(){
$(".commentreply").click(function(){
$(this).html( "the form code would go here" );
}
}
</script>
<span class="commentreply">Reply</span>
Does this make sense? It seems rather simple but I've been making small changes trying to get the darn thing to work for about 3.5 hours now.