I need to know how to delete div individually, after some research I couldn't find nothing concrete. I did a comment system using jquery and it's working like a charm, but now when I logon as admin... I am displaying a link in the corner of the comment that says "delete"
what i want to do is click delete jquery sends delete.php via ajax i know how to do this then div dissapears.... the only problem I'm having is getting the right div into the javascript function, I am very new in jquery and I had a code working with mootools, but now I want all my project to run on jquery alone... Here is sample code for delete using mootools... Comment format: <div id="comment_436"><hr /><a href="javascript:void(0)" onClick="Comment.delete('436')" style="float: right">delete</a><a href="http://192.168.0.5/flog/xmode">xmode</a> @ 28/09/2008 03:02:53<br />asdadad<br /></div> <div id="comment_437"><hr /><a href="javascript:void(0)" onClick="Comment.delete('437')" style="float: right">delete</a><a href="http://192.168.0.5/flog/xmode">xmode</a> @ 28/09/2008 03:05:26<br />sdadad<br /></div> Java: var cmsComment = new Class({ delete: function(id){ new Ajax('http://192.168.0.5/flog/delete.php',{ data: 'id='+id }).request(); new Fx.Style('comment_'+id, 'opacity',{ onComplete: function(){ $('comment_'+id).setStyle('display', 'none'); } }).start(1,0); } }); var Comment = new cmsComment(); how you can see in the function I passed an id to the java which then was passed to delete.php and then div was set to dissapear... is there a simple way of doing this with jquery also??