PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Wed Sep 18, 2019 3:11 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Mar 31, 2016 4:08 pm 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4434
Location: United Kingdom

This is similar to what I need.
We look after a flooring website and they want to have a link that says "Closeup" and one that says "Slab", so they can view either images. I don't want to toggle the link - I want two separate links.
But I want them to control what is shown in the DIV. So either clicking them changes the content of the div, or might be better if clicking the links, chose which DIV to show. That way I can control the layout of each div (As the images in them may be different sizes).

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Thu Mar 31, 2016 5:40 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
It's basically the same approach. Rather than passing two divs to swap, each link toggles the visibility of its related element.

_________________


Top
 Profile  
 
PostPosted: Thu Mar 31, 2016 5:49 pm 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6425
Location: Montreal, Canada
Very simple example: https://jsfiddle.net/wgnpm4zb/

_________________


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group