Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

jquery-expander - how to force collapse when another segment is expanded

Featured Replies

I'm using jquery expander (http://plugins.learningjquery.com/expander/) which is all good and working fine, though I can't see a way that I can customise to be able to have an expanded section automatically collapse if another section is expanded.

 

I would like it to work rather like it does on this page:

 

http://architectureforlondon.co.uk/london-architects/

 

I think it's neater this way and doesn't allow the user to completely upset the page style/look.

 

Many thanks

Can you paste in the code your using to a fiddle and link it here? I had to make a similar effect recently and may be able to help but no promises. Will give it a shot.

  • Author

Thanks for replies, I've not used jsfiddle before and cannot get it to link to 2 separate ,js files - & learning/getting a workaround to this kinda adds another problem rather than helps with the original if you see what I mean!

 

The code/demo files are all at the links provided if that helps?

 

As for accordion, thanks, I'll bear it in mind but as I've got Expander working nicely, apart from one this one minor issue, I'd rather stick with it.

  • Author

Can you paste in the code your using to a fiddle and link it here? I had to make a similar effect recently and may be able to help but no promises. Will give it a shot.

Ok sorted uploading it, codepen worked perfectly where jsfiddle wouldn't, here:

 

http://codepen.io/beelzebomb/pen/GFevC

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.