danielstocks / jQuery-Collapse

A lightweight (~1kb) jQuery plugin that enables expanding and collapsing content
http://webcloud.se/jQuery-Collapse/
MIT License
679 stars 153 forks source link

I really HATE this plugin! I want TARGET! #61

Closed realrandal closed 10 years ago

realrandal commented 10 years ago

Just joking ;)

Nice plugin, but I cannot understand why it's another accordion-like plug instead free markup one.

        <div class="current-state-class" id="i-want-real-custom-markup" data-collapse="persist">

        <h2>Static element! I don't be toggled. Do not touch me. </h2>

        <button class="toggler">Toggler</button>

        <div class="hide-me">

            I am content which will be hided by class CSS, from parent element.

                .hidden > .hide-me { display: none}
        </div>

    </div>

I want markup like this, but set for many elements (group), not for every single example.

So, primary, I like your plugin because of cookies/storage support. But I want something more usable that 1 - 2 auto-element segments.

By target, I mean solution like you can check here. http://www.getuikit.com/docs/toggle.html

Or Bootstrap Collapse also work this way. But without cookies.

danielstocks commented 10 years ago

You can do this, although it takes just a little bit of custom code, have a look at:

https://github.com/danielstocks/jQuery-Collapse#external-markup-example

danielstocks commented 10 years ago

If you download the repo there's also a working example of this in demo/demo.html

realrandal commented 10 years ago

Thank you very much!