The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Button Attribute Help!
twmmorgan
post Mar 24 2014, 11:14 AM
Post #1





Group: Members
Posts: 3
Joined: 21-March 14
Member No.: 20,585



I'm updating my portfolio website and need help.
Currently I'm using lightbox but find it a bit dated now and want to change it.

So in the body i have two divs, the left div contains thumbnails and the right div is where I want the image to open.

I'm trying to make a button that will open an image with a click and close it with another.
I feel it should be really simple but cannot for the life of me work it out.

CODE

<!-- start content -->
    <div id="content">
        <div class="post">
            <h2 class="title"><a href="#">Sketchbook</a></h2>
            <p class="credit">*click on the thumbnails below to view examples of work from my sketchbooks</p>
            
          
            
          
          
    <div id="gallery-container">
    <div id="gallery-thumbs">
    
<!-- Put thumbs here! -->  
<a href="images/sketchbook/sketch1.jpg" title="Woman *1"><img src="images/sketchbook/ibut/sbut1.jpg" alt="" /></a>
  
    
    </div>
    
    
    <div id="gallery-preview">
  
<img id="gallery-preview-image" src="images/sketchbook/sketch1.jpg" alt="Preview Image">
        
    
    </div>
    
    
    <div class="clear-fix"></div>
</div>
          
        <div class="post">
            
        </div>
    </div>
    <!-- end content -->
    
        <script src="js/jquery-1.7.2.min.js"></script>
<script src="js/lightbox.js"></script>
<link href="css/lightbox.css" rel="stylesheet" />


    
    <div style="clear: both;">&nbsp;</div>
</div>
</div><!-- end page -->



Attached Image
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Mar 24 2014, 03:22 PM
Post #2


.
********

Group: WDG Moderators
Posts: 7,919
Joined: 10-August 06
Member No.: 7



QUOTE(twmmorgan @ Mar 24 2014, 05:14 PM) *

I'm trying to make a button that will open an image with a click and close it with another.

How should the user select which image to open, with a separate toggle button for each thumbnail?

QUOTE
I feel it should be really simple but cannot for the life of me work it out.

I guess it depends on how the Lightbox script is written, if you want to modify that?

BTW, LINK elements are only allowed inside the HEAD section.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Mar 24 2014, 04:37 PM
Post #3


Don't like donuts. Don't do MySpace.
********

Group: WDG Moderators
Posts: 18,026
Joined: 9-August 06
Member No.: 6



Why are you still using lightbox when you don't want the effect it creates? There are oodles of gallery scripts that do what you want.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd October 2018 - 10:40 AM