Coder Social home page Coder Social logo

lightbox images goes loop about lightcase HOT 8 CLOSED

cbopp-art avatar cbopp-art commented on May 21, 2024
lightbox images goes loop

from lightcase.

Comments (8)

cbopp-art avatar cbopp-art commented on May 21, 2024

Hi @Fabbryzz
You have a javascript error which can be seen inside the browser console log.
So, when I look to your code where you initialize lightcase, I can see that you passed the arguments (settings) in a wrong way and invalidates your javascript. Actually, arguments needs to be passed within round braces of your lightcase.() function call.

It should look like this:

jQuery(document).ready(function($) {
        $('a[data-rel^=lightcase]').lightcase({'swipe': true});
});

If you have swipe: true you wouldn't need to define it because true is the default. See docs.

Hope this fixes your issue!

from lightcase.

Fabbryzz avatar Fabbryzz commented on May 21, 2024

Thanks for your quick reply cbopp-art, I made a beginner's mistake.. now I have correct the code removing {'swipe': true}, and it seems the code is clean, but it still doesn't work..

from lightcase.

cbopp-art avatar cbopp-art commented on May 21, 2024

Try to use double quotes " for your data-rel selectors. Something like this:

$('a[data-rel="lightcase:myCollection:slideshow"]');

from lightcase.

Fabbryzz avatar Fabbryzz commented on May 21, 2024

mmh.. nothing to do.. it still doesn't work.. It's a really weird thing.. :-\

from lightcase.

cbopp-art avatar cbopp-art commented on May 21, 2024

Could you try with a stable version of jquery (e.g. 2.1.4)?
It also could be that lightcase now got an incompatibility with the new jQuery version or jQuery 3.0.0-alpha which you are using is buggy yet.

from lightcase.

cbopp-art avatar cbopp-art commented on May 21, 2024

@Fabbryzz
No! It seems that the element can't get found:
you need to wrap your call for instance with

jQuery(document).ready(function($) {
 // Call lightcase only if DOM is ready
});

from lightcase.

Fabbryzz avatar Fabbryzz commented on May 21, 2024

I have changed jquery version to 2.1.4 and now it works..!
I have also retrieve the rest of the code at the original version (data-rel without quotes)
The instance - jQuery(document).ready(function($) {... - was already present in the original code, so I don't change nothing else.
It seems that version Alpha of jQuery was the only matter.
Thanks cbopp-art! You've been a great help! ;-)

from lightcase.

cbopp-art avatar cbopp-art commented on May 21, 2024

You're welcome!

from lightcase.

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.