<script type="text/javascript" src="jquery-1.1.4.js"></script> <script type="text/javascript">
$(document).ready(function(){ $("#comments span h5 a").click(function(){ var author = $(this).parent("span").next("p").text(); alert(author); }) }); </script> </head> <body> <div id="comments"> <div id="5"><span><h4>Minion</h4><h5>(<a href="#">Reply</a>)</h5></ span><br> <p>Back to normal status</p> </div> </div> I'm trying to figure out how to grab the text between the <p> tags when reply is clicked. I know I got the reply link targeted. I first just had an alert, but tried going further. At first I just had $ (this).next("p").text(); but thought maybe I needed to go to the parent, then move on, but it just shows a blank alert box.