Home Forums WoodMart support forum Ajax Product Tab After Loading Ajax content callback

Ajax Product Tab After Loading Ajax content callback

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #201645

    [email protected]
    Participant

    Hi XTemos,
    There is the ability to register a JS callback to be run after the ajax call completed successfully.
    This is usefull to meke some external theme plugin for woocommerce to work correctly.

    i see that in the js function var loadTab = function (atts, index, holder, btn, cache, callback)
    the passed callback run at the end of success but there is no way to attach a custom handler.

    The only way is to us the event triggered on the entire Document
    $(document).trigger(‘wood-images-loaded’);
    to run custom javascript initialization for unsupported plugin.

    Why do not add a dom event like $(AjaxProductTabContainer).trigger(‘ajax-product-tab-loaded’) ?

    in this way i can register any custom js initialization to run on the new tab content after it is loaded.

    Any help will be appreciated

    #201690

    Artem Temos
    Keymaster

    Hello,

    Thank you for your question. We understand your request but currently, there is no event after AJAX product tab is loaded. We will add it in our next theme update so you will be able to attach your custom functions to that.

    Kind Regards

    #201967

    [email protected]
    Participant

    ok i’m happy. there is a release date at the moment?

    looking to WordPress documentation should be also a common behavior that is violated in this case.
    on this page: https://codex.wordpress.org/AJAX_in_Plugins is mentioned that after any ajax call that insert content in the document a special event must be fired on the dom jQuery( document.body ).trigger( 'post-load' ); that is intended jut for this scope.
    anyway is better if you throw an event on the container in wich the content is loaded.

    let me now for the release date.

    Kind Regards

    #202007

    Artem Temos
    Keymaster

    We will review this in our next theme update and add some event there for sure.

    #202019

    [email protected]
    Participant

    so you do not have a release date yet or at least a plan?

    I ask this because i nedd to integrate a plugin that has broblem with ajax loaded content.

    #202029

    Artem Temos
    Keymaster

    We will do our best to release an update it 3-5 weeks.

    #202099

    [email protected]
    Participant

    thanks for your effort

    #202217

    Artem Temos
    Keymaster

    You are welcome. Contact us if you will have any questions.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Ajax Product Tab After Loading Ajax content callback’ is closed to new replies.