Giter Club home page Giter Club logo

Comments (1)

matthewlein avatar matthewlein commented on September 14, 2024

Hello,

Some other people have asked that same thing on http://matthewlein.com/experiments/slots.html

I can imagine 2 scenarios that might want to do this, and I'm not sure which applies to you:

  • Multiple slots that have cosmetic differences. Meaning the slots have the same number of items, same dimensions, they just have different images/colors/numbers/fonts. AKA How can I style the slots differently?

It should be possible, but a little outside the planned design. I would suggest after the .jSlots() is run, you loop through the slots and add unique classes, like jslot--1, slot--2, or slot--even slot--odd. Or alternatively, you could use CSS :n-th child to target different slots.
I should warn you that if your classes change the dimensions of slot items, it may not work right as those values have been calculated already.

  • Multiple slots that have different numbers of items or dimensions.

The script by default will just copy a single UL to make the slots. I suppose it might be possible to create multiple ULs and .jSlot() them separately, but with the same timing numbers, and set them all to trigger on the same event. I haven't tried it, but in my mind that would work. However, then you would have to set up your own system to make them talk to each other and coordinate wins, like the script does now. Certainly seems doable though.

from jquery-jslots.

Related Issues (19)

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.