• Resolved coleatkinson1

    (@coleatkinson1)


    I have some widgets on a page (masonry and some others), which work fine in the page by itself, but I am using a shortcode in another page that dynamically loads the page inside a div (AJAX).

    The siteorigin CSS and JS files are loaded correctly, but the masonry grid is not displaying correctly, ie. The the positioning css is not being added to the grid items.

    I’ve searched google and this support forum but I cannot find an answer.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter coleatkinson1

    (@coleatkinson1)

    I’ve found a solution, which is to append <script> tags to the dynamically loaded content, with src set to the appropriate siteorigin JS files.

    If there is no other preferred method, then this can be marked as solved.

    Plugin Contributor alexgso

    (@alexgso)

    Hi coleatkinson1,

    The solution you’ve found is how I would personally recommend doing this. Another option would be to manually trigger the setup_widgets event after loading your content to trigger the setup of certain SiteOrigin widgets that rely on JavaScript.

    Kind regards,
    Alex

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Widgets not working on dynamically loaded content’ is closed to new replies.