Skip to content

Change the wrapper/container on the fly? #738

@louiswalch

Description

@louiswalch

Is it possible to dynamically change the wrapper and container element when a link is clicked, to load a sub part of the page?

Back in v1 of Barba this was possible in the linkClicked hook and then resetting it after load is complete. But I can't figure out how to do it in v2.

    Barba.Pjax.Dom.wrapperId        = name + '-wrapper';
    Barba.Pjax.Dom.containerClass   = name + '-container';

(If anyone stumbles on this, the code above is example of how it was done in v1, this isn't a v2 solution)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionquestioning about a functionality or usage

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions