• Resolved dgirona

    (@dgirona)


    Hello,
    I use a Astra Theme width sidebar off canvas for woocommerce for mobile devices.
    I need close de sidebar when the use apply any filter off YITH WooCommerce Ajax Product Filter.

    Any idea?

    Thanks : )

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Andrea Grillo

    (@agengineering)

    Hi there,

    thanks for contacting us.
    To doing that you should try to contact Astra Theme developers, I think they can provide to you a code to doing that.
    After a filter was applied we trigger a js event called
    yith-wcan-ajax-filtered

    $( document ).trigger( 'yith-wcan-ajax-filtered', [ response, filters ] ).trigger( 'yith_wcwl_reload_fragments' );

    the Astra author should use it to close the sidebar after a filter was applied.
    Let me know if need more details about that, please.

    Thread Starter dgirona

    (@dgirona)

    Thanks Andrea, for the answer ajax goes well. Is there another trigger for the apply filter button?
    Thanks again : )

    Thread Starter dgirona

    (@dgirona)

    This code works fine : )

    jQuery(document).on(‘yith-wcan-ajax-filtered’,function(){
    // close off canvas sidebar of astra theme
    jQuery(“html”).removeClass(“ast-off-canvas-overlay”);
    });

    Plugin Support Andrea Grillo

    (@agengineering)

    Thanks to share this with us! I think can help other forum users ??

    I set this to resolved!
    Bye

    Thread Starter dgirona

    (@dgirona)

    Hello Andrea,

    It is necessary to add another code to recover the scroll of the page, since otherwise it is deactivated.

    jQuery(document).on(‘yith-wcan-ajax-filtered’,function(){

    // hide sidebar off canvas
    jQuery(“html”).removeClass(“ast-off-canvas-overlay”);

    // enable scroll
    jQuery(“html”).css({“overflow”:”visible”});

    });`

    Sorry : )

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘close sidebar canvas of astra theme when apply filter’ is closed to new replies.