WordPress.org

Support

Support » Plugins and Hacks » Inline Ajax Comments » [Resolved] Doesnt work when multiple commentforms on one page…

[Resolved] Doesnt work when multiple commentforms on one page…

  • Hey,

    great plugin. Just one problem: I use it more than once on a page, and it doesnt work there…

    Go to http://www.outfitya.com/de/, create 3 or more test outfits and then go to “meine outfitfits”. U see then the comments load everywhere. just when submitting the a comment on the second or third comment field, it doesn’t load the newest comment into the correct spot…

    I think it has to do with this code:

    $.ajax({
                data: data,
                global: false,
                success: function( msg ){
                    inline_comments_ajax_load_template({
                        "target_div": "#inline_comments_ajax_target",
                        "template": $( '#inline_comments_ajax_handle' ).attr( 'data-template' ),
                        "post_id": $( '#inline_comments_ajax_handle' ).attr( 'data-post_id' ),
                        "security": $( '#inline_comments_nonce' ).val()
                    }, false );
                    $('textarea').val('');
                    $this.css('opacity','1');
                }

    “target_div”: “#inline_comments_ajax_target”, exists more than once on my page… So thats why it cannot append the new comment correctly.
    Maybe something like
    “target_div”: $(this).closest().”#inline_comments_ajax_target”, would work…

    Would love see it working for multiple comment section on one page…

    Greets,
    Dom

    http://wordpress.org/extend/plugins/inline-ajax-comments/

Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘[Resolved] Doesnt work when multiple commentforms on one page…’ is closed to new replies.
Skip to toolbar