Q:

How to open reply box under parent comments using jQuery

I am implementing comments system in php, jquery. I am listing comments I need to open reply form or box under parent comment. My code is below
HTML COde are
<div id="record-1" class="friends_area">
    <a href="javascript:;">
        <img width="40" height="40" border="0" alt="" style="float:left; padding-right:9px;" src="">
    </a>
    <label class="name" style="float:left; width:390px;">
        <span>
            <span style="padding-left:10px;"> 59 minutes ago </span>
            <br clear="all">
            <div class="name" style="text-align:justify;float:left;">
                <em> Dsffdfdfd</em>
                <br clear="all">
                <div style="height:10px;">
                    <a id="post_id1" class="showCommentBox" href="javascript: void(0)">Reply</a>
                    -
                    <span id="like-panel"> </span>
                </div>
            </div>
    </label>
    <a class="delete_p" href="#" style="color:#ff0000;"> Image </a>
    <br clear="all">
    <div id="CommentPosted1">
        <div id="loadComments1" style="display:none"></div>
    </div>
    <div id="commentBox-1" class="commentBox" align="right" style="display:none"> </div>
</div>
<div id="record-1" class="friends_area">
    <a href="javascript:;">
        <img width="40" height="40" border="0" alt="" style="float:left; padding-right:9px;" src="">
    </a>
    <label class="name" style="float:left; width:390px;">
        <span>
            <span style="padding-left:20px;"> 59 minutes ago </span>
            <br clear="all">
            <div class="name" style="text-align:justify;float:left;">
                <em> Dsffdfdfd</em>
                <br clear="all">
                <div style="height:20px;">
                    <a id="post_id2" class="showCommentBox" href="javascript: void(0)">Reply</a>
                    -
                    <span id="like-panel"> </span>
                </div>
            </div>
    </label>
    <a class="delete_p" href="#" style="color:#ff0000;"> Image </a>
    <br clear="all">
    <div id="CommentPosted2">
        <div id="loadComments2" style="display:none"></div>
    </div>
    <div id="commentBox-2" class="commentBox" align="right" style="display:none"> </div>
</div>
   My Reply Box 
<div id="replymsgbox" style="display: none;">
    <form id="frmComment" novalidate="novalidate" method="POST" name="frmComment">
        <div>
            <textarea id="comment_text" class="" name="comment[text]"></textarea>
            <div id="error_text"> </div>
        </div>
        <div>           
            <input type="hidden" value="0" name="Parent_id" id=""Parent_id>             
            <input type="submit" value="Post" name="Submit">
        </div>
    </form>
</div>   

My Jquery : 
//showCommentBox
$('a.showCommentBox').livequery("click", function(e){

var getpID = $(this).attr('id').replace('post_id','');

$('#replymsgbox', $(this).parents().next()).slideToggle('fast')

});

Any assistance appreciated!

A:

You need to specify a selector in .parents() or else it won't return anything.
Or you could simply use .parent() if you want to access the direct parent of the element.
Documentation is here
Also, since you're using .livequery, I'm assuming it's because you're using the plugin and didn't want to use the default .click() or .live() methods.

