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.

div switcher

Featured Replies

I am doing a website for an office building. Each level in the building has upto 3 different office layout possibilities. I have a page for the floorplan e.g. level 3 office. And on that page I want to have 3 buttons which switch the floorplan (image) and table of measurements for the different office layouts.

 

Basically one page with a div switcher I think? Can anyone help with advice on how to create a way of switching the divs or an alternative method.

 

Thanks

 

Andy

When using something like this, remember to test it and make sure that your site is still usable by those that opt to have JavaScript switched off. As if would be a shame to have a nice site that can't be used :)

  • Author

 

The content I want to swap is laid out in 2 columns. Ideally I would like to have the links to swap the content in the left column above the table of floorplan measurements.

  • Author

Thats a nice thing on css play, but I want something to change on the left column and the right column. Also its a good point you make about having javascript turned off because if all the content showed up at once it would look pretty ugly.

 

Because the site is static and doesn't contain too many pages, I'm considering just making additional pages for each.

 

Seeing as I've spent practically all day umming and aahing over it.

 

Anyhow your thoughts appreciated.

It makes sense just to make the pages, you aren't really achieving anything less by doing that, and that way it is totally usable and in your control :)

Thats a nice thing on css play, but I want something to change on the left column and the right column. Also its a good point you make about having javascript turned off because if all the content showed up at once it would look pretty ugly.

 

Because the site is static and doesn't contain too many pages, I'm considering just making additional pages for each.

 

Seeing as I've spent practically all day umming and aahing over it.

 

Anyhow your thoughts appreciated.

 

With any links to things like javascript you can alwys test the demos with javascript turned off so you can see how they degrade.

 

As far as having things in columns as you suggested, well that's just playing round with the code so it gets presented howveer you want :)

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.