mirror of
https://github.com/silverstripe/silverstripe-comments
synced 2024-10-22 11:05:49 +02:00
23 lines
499 B
JavaScript
23 lines
499 B
JavaScript
/**
|
|
* Comment Threading
|
|
* @package comments
|
|
*/
|
|
(function($) {
|
|
$(document).ready(function () {
|
|
|
|
//Replying comments
|
|
$('body').on('click','.replycomment', function(){
|
|
var $this = $(this);
|
|
var $rID = $this.attr('data-id');
|
|
var url = $this.attr('href') + '?ReturnURL=' + location.pathname;
|
|
$.get(url, function(data){
|
|
var holder = $('.replycommentformholder[data-id=' + $rID + ']');
|
|
holder.html($(data));
|
|
$this.hide();
|
|
});
|
|
return false;
|
|
});
|
|
|
|
});
|
|
})(jQuery);
|