bluewalrus
03-23-2011, 01:11 AM
I can't seem to figure out 2 parts of this
alert($($('#' + id_comment).children().get(3)).html())
Is the get(3) a DOM element, I can't find it in Jquery aside from the ajax functionality? I think 'get' is creating an array of the children of the ID specified.
I can am getting the 4th child of the div which is correct but I want to be able to alter the inputs of it. Does anyone have an idea about either of these?
4th child of the div:
<span>Email/username: <input id="name1_1" type="text"></span>
<span>Password: <input id="pwd1_1" type="password"></span>
<a href="javascript: login();" id="post_login_1_1" class="login_ajax">Login and Post your comment</a>
the full div:
<div class="comment_container" style="display:none;" id="reply_show1" class="reply">
<h2>Your commment:</h2>
<textarea id="response_1_1"></textarea>
<div class="identify_box visitor_box">
<span>Name: <input type="text" id="vis_name_1_1" /></span>
<span>Email: <input type="text" id="vis_email_1_1" />
<a href="javascript: login();" id="post_vis_1_1" class="login_ajax">Post your comment as a visitor</a></span>
</div>
<div class="identify_box user_box">
<span>Email/username: <input type="text" id="name1_1" /></span>
<span>Password: <input type="password" id="pwd1_1" /></span>
<a href="javascript: login();" id="post_login_1_1" class="login_ajax">Login and Post your comment</a>
</div>
</div>
My idea once I got the correct elements was I could just do something like
$($('#' + id_comment).children().get(3).children('input')).css('border', '#ff0000 solid 1px')
alert($($('#' + id_comment).children().get(3)).html())
Is the get(3) a DOM element, I can't find it in Jquery aside from the ajax functionality? I think 'get' is creating an array of the children of the ID specified.
I can am getting the 4th child of the div which is correct but I want to be able to alter the inputs of it. Does anyone have an idea about either of these?
4th child of the div:
<span>Email/username: <input id="name1_1" type="text"></span>
<span>Password: <input id="pwd1_1" type="password"></span>
<a href="javascript: login();" id="post_login_1_1" class="login_ajax">Login and Post your comment</a>
the full div:
<div class="comment_container" style="display:none;" id="reply_show1" class="reply">
<h2>Your commment:</h2>
<textarea id="response_1_1"></textarea>
<div class="identify_box visitor_box">
<span>Name: <input type="text" id="vis_name_1_1" /></span>
<span>Email: <input type="text" id="vis_email_1_1" />
<a href="javascript: login();" id="post_vis_1_1" class="login_ajax">Post your comment as a visitor</a></span>
</div>
<div class="identify_box user_box">
<span>Email/username: <input type="text" id="name1_1" /></span>
<span>Password: <input type="password" id="pwd1_1" /></span>
<a href="javascript: login();" id="post_login_1_1" class="login_ajax">Login and Post your comment</a>
</div>
</div>
My idea once I got the correct elements was I could just do something like
$($('#' + id_comment).children().get(3).children('input')).css('border', '#ff0000 solid 1px')