Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple use on single page #35

Open
kiwi3685 opened this issue Aug 6, 2016 · 0 comments
Open

Multiple use on single page #35

kiwi3685 opened this issue Aug 6, 2016 · 0 comments

Comments

@kiwi3685
Copy link

kiwi3685 commented Aug 6, 2016

I am using this on pages where there are many blocks of text to be shortened. These are help texts on a configuration page. It works well, but it would be nice if when a second block of text is opened (click "more") any other already opened block was automatically closed. It would save users needing to click 'less' every time before they open a second (or more) block.

Is this possible?

Perhaps something like:
$this.parent().siblings().find(".comment").slideUp();

I realise that exact code will not work here, but the principle of using sibling elements might??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant