i have a jquery function which takes place inside a php loop but i am unable to make it work
Jquery.js
$(document).ready(function(){
$("#comment_button").click(function(){
$("#comment_type_area").slideToggle("fast");
});
});
index.php
....
echo"<div id='comment_button'>
Comment
</div>
<div id='comment_type_area'>
<textarea class='commnt' post_id='<?php $shared_id2; ?>' id='text_comment' placeholder='Write a Comment'></textarea><br>
<button id='post_button' type='button'>Post</button>
</div>";
Output
As you can see i am unable to slide down the rest of the comment div Please Help