Giter Club home page Giter Club logo

Comments (4)

nk-o avatar nk-o commented on June 26, 2024

Hey.

How this is related to our plugin? If 3rd-party lightboxes don't support AJAX loaded content, this is no our plugin problem.

from visual-portfolio.

Sidelity avatar Sidelity commented on June 26, 2024

If you've confirmed that it's a 3rd party issue, then fine. However, I've tried using 3 very popular WP lightbox plugins (Simple Lightbox, Responsive Lightbox & Gallery, WP Featherlight), none of which work. I'd assume that the top lightboxes would support AJAX loading.

WP Featherlight specifically mentions supporting AJAX content "by adding data attributes to your content". I've confirmed that only the first loaded images get the correct data-featherlight="image" attribute, while the paginated images do not. Now, I'm too much of a rookie to be able to say who's to blame here, if it's the lightbox plugin that fails to add attributes, or if it's Visual Portfolio that forgets to notify Wordpress or whatever that new content has been added. I'm sure you know best.

A suggestion would be to maybe allow the user to add custom attributes? Like how you allows the user to add a "Rel" attribute?

from visual-portfolio.

nk-o avatar nk-o commented on June 26, 2024

@Kartug01 some of these plugins support manual initialization methods, that you can use after AJAX loaded by our plugin. I don't see any reason why we should make an integration with plugins, that our plugin does not need. Since we have built-in lightbox features, these plugins are redundant.

If you still want to use these plugins, you will need to manually add scripts. Our jQuery event endLoadingNewItems.vpf may help with it https://visualportfolio.co/documentation/developers/jquery-events/

from visual-portfolio.

Sidelity avatar Sidelity commented on June 26, 2024

Thanks for pointing me in the right direction. You were absolutely right, I was able to trigger the lightbox by entering a custom jQuery event in the lightbox plugin. My bad!

from visual-portfolio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.