mirror of
https://github.com/discourse/wp-discourse.git
synced 2025-10-03 08:59:21 +08:00
Use an id instead of a class for wpdc-comments div
This commit is contained in:
parent
801c944ac5
commit
ebfbbbc958
2 changed files with 3 additions and 5 deletions
|
@ -6,18 +6,16 @@
|
|||
$( document ).ready(
|
||||
function () {
|
||||
var commentsURL = wpdc.commentsURL,
|
||||
$commentArea = $( '.wpdc-comments' ),
|
||||
$commentArea = $( '#wpdc-comments' ),
|
||||
postId = $commentArea.data( 'post-id' );
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url: commentsURL + '?post_id=' + postId,
|
||||
success: function (response) {
|
||||
if (0 !== response) {
|
||||
$commentArea.html( response );
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
)
|
||||
|
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
global $post;
|
||||
|
||||
echo '<div class="wpdc-comments" data-post-id="' . $post->ID . '">discourse comments</div>';
|
||||
echo '<div id="wpdc-comments" data-post-id="' . $post->ID . '"></div>';
|
Loading…
Add table
Add a link
Reference in a new issue