• Resolved deamon3489

    (@deamon3489)


    Hy when i am using site reviews plugin shortcode

    Example shortcode – ( [site_reviews assigned_terms=”81″ display=”1″ fallback=”No reviews found. Be the first to write one.” class=”review-out review-all-page” id=”par-page-rev” pagination=”loadmore”] ) in the table cells, the following things are not working for the reviews :-
    1. Loadmore pagination of the review.
    2. Excerpts – ( show more button )

    These 2 things are only working on the first page of the table.
    As in if i were to change the number of rows to be displayed on the first page from 10 to 15, then those 15 rows will have these two things working. The following rows after it doesn’t seem to have this functionality working.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi!

    Thanks for your post and sorry for the trouble!

    This is a consequence of how your Site Reviews plugin’s JavaScript code works.

    For a technical explanation, see https://datatables.net/faqs/index#events

    Essentially, the plugin will need to switch to using “Event Delegation” in its JavaScript code.

    Best wishes,
    Tobias

    Thread Starter deamon3489

    (@deamon3489)

    Thank you for the reply Tobias,
    I have forwarded this to the site review plugin support forum. Hopefully they will be able to help with this.

    Thank you

    • This reply was modified 3 weeks, 2 days ago by deamon3489.
    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    Thanks for that! Yes, this should greatly improve their plugin! I hope that they’ll be able to implement this soon!

    Best wishes,
    Tobias

    Thread Starter deamon3489

    (@deamon3489)

    Hy Tobias, just a little update on this.

    So i managed to solve it :), Using this snippet worked.

    jQuery(document).on('init.dt', 'table.all-petinsurance-prov-rev', function () {
    jQuery(this).on('draw.dt', function () {
    if (typeof GLSR !== 'undefined') {
    GLSR.Event.trigger('site-reviews/init');
    }
    });
    });

    Since the table allows us to insert a custom class, I added check on the document first for the table and once that happens, another even listener for the table once it intializes to re-trigger the site reviews event.

    Posting this here, so it could help someone else as well.

    Thank you for all the help again,
    Cheers.

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    Oh, that’s great news! Thanks for sharing this code snippet! Looks good!

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress in the plugin directory. Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.