Portfolio loaded through AJAX

1 reply · opened May 29, 2016

AalexvascMay 29, 2016

I have a form with 2 columns (see attached image "canvas-1.png"). The left column contains a filter and the right one contains a portfolio showing the animals's image that satisfied the filter conditions. This form is first loaded withou AJAX (through normal GET).
When I click on an animal image a popup is shown with that image with zoom (attached image "canvas-2.png").
The problem...
When I fill the filter and click at the "Filtrar" button I load the right column via AJAX ($('#divPortfolio').load('...')) with the animals's image that satisfied the new filter conditions.
Now when I click on an animal image the browser window is replaced with that image. No popup appears.

I can see that you initialize many objects within the "functions.js" script when the page loads. I know that the problem I'm having is due to this fact.

I often have problems like this when I load some content through AJAX.

Is there a way to solve this problem?

Thanks.

SSemicolon WebSTAFFMay 29, 2016

Hello,

We Definitely understand your issue and to address these issues we developed the js/functions.js in a very Modular Way. To specifically fix your issue, you will simply need to re-initialize the Lightbox Function by calling the SEMICOLON.initialize.lightbox(); Function after the AJAX is executed successfully. Similarly other Functionalities can be fixed in the same way.

Do let us know if we can help you with anything else or if you find any further issues with Canvas.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard