Giter Site home page Giter Site logo

alhadis / accordion Goto Github PK

View Code? Open in Web Editor NEW
32.0 5.0 11.0 86.79 MB

Silky-smooth accordion widgets with no external dependencies.

Home Page: https://www.npmjs.com/package/accordion

License: ISC License

CSS 3.61% JavaScript 96.39%
accordion rollout widget dropdown menu navigation

accordion's People

Contributors

alhadis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

accordion's Issues

To-do list

  • Write documentation
  • Add support for using CSS transforms to establish real smoothness
  • Die a painless death in my sleep

No easy way to add/remove folds after construction

Hi! Is it possible to fully destroy and init again accordion with the same container? (In case if items there have been changed)

When I call just update, it doesn't init recently added folds, and when I init a new accordion, I see the all previous are not deleted.

Deep linking

Do you have an example where you visit a page with a hash in the URL and it opens the appropriate accordion item and scrolls to it?

I am currently not seeing a way to trigger an individual open myself once I get the link element.

Any help would be appreciated!

Great Plugin

Is there an easy way to keep first item expanded by default. Also when expanding a new element collapse the previous one? Thanks.

Responsive heightOffset

Is there any way of making the heightOffset responsive? I usually have a gap that is fluid between tablet and desktop

Enter and spacebar to open/close accordion item

First, thanks for the great package!

So I'm seeing code for

/** Enter: Toggle */
case 13: {
    THIS.open = !THIS.open;
    break;
}

But this doesn't appear to be working, it does not toggle the item to be open and closed. Ideally i'd also like to have the spacebar do the same thing. The right and left arrows work as I'd expect though.

Is this behavior something that could be added? Or do you have a recommendation of adding my own event listener to accomplish this?

Strange type rendering issue with Chrome 55 / Mac 10.10.5

Hi I'm wondering if you can reproduce the issue I'm seeing below:
https://landofwomen.com/pages/united-states-stores

Notice in the screenshot attached "Arizona", the first accordion section title, appears a lighter weight font. It's fairly consistent on this page but I've noticed it elsewhere less consistently. The issue goes away if I resize the browser window or toggle certain .accordion css attributes using the inspector tool (like backface-visibility and transform), but actually commenting them out does nothing after a full page refresh.

screenshot 2017-01-10 12 40 21

I'm running Chrome 55.0.2883.95 on Mac OS 10.10.5.

Let me know if you have any thoughts!

Thanks

Anyway to access the click event?

I want to add buttons to the accordion header. So when there is a click event, I need to be able to figure out whether I clicked the heading or the button in the heading. How do I do this?

Feature: Only open one accordion at a time, collapse others?

Hello,

Somehow it must be possible to only open one accordion at a time whereby if an accordion item is open and you click to expand another accordion item, the open item closes and the clicked item expands.

Any help would be great.

Thanks!

Loaded event?

Is there a way to check if the accordion is completely loaded and on screen?

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.