Yes unfortunately the unique class is needed as there a multiple editable elements on the same page (comments pulled from a database), which you can click to edit in turn. This has worked fine, I just needed to be able to click a link on button instead of the text inself. I meant to remove the <?php echo $comment_id;?> or it should have looked like:
<div class="edit_comment<?php echo $comment_id;?>"><?php echo $comment_content;?></div><span class="trigger">Edit</span></td> <script type="text/javascript"> // <![CDATA[ $(document).ready(function(){ $(".trigger").click(function() { $(this).parent().children(".edit_comment<?php echo $comment_id;?>").click(); }); $(".edit_comment<?php echo $comment_id;?>").editInPlace({ Mika Tuupola wrote: > > > On Mar 14, 2007, at 5:21 PM, strzelecki wrote: > >> Doesn't seem to want to work the same with Daves version. I have: >> <div class="edit_comment"><?php echo $comment_content;?></div><span >> class="trigger">Edit</span></td> >> <script type="text/javascript"> >> // <![CDATA[ >> $(document).ready(function(){ >> $(".trigger").click(function() { >> $(this).parent().children(".edit_comment").click(); >> }); >> $(".edit_comment<?php echo $comment_id;?>").editInPlace({ > > You seem to have unique class for each editable element. Is that > needed. Try to change line above to: > > -cut- > $(".edit_comment").editInPlace({ > -cut- > > -- > Mika Tuupola http://www.appelsiini.net/~tuupola/ > > > > > _______________________________________________ > jQuery mailing list > discuss@jquery.com > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/editInPlace-link-trigger-tf3395144.html#a9492867 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/