Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Mar 2011
    Posts
    215
    Thanks
    10
    Thanked 1 Time in 1 Post

    Exclamation Hidden div not working as intended - Really starting to panic!

    I have an image map, with hidden divs below so that the lightbox the imagemap triggers will allow you to scroll through more than one image when the lightbox is triggered, this part is not working for some reason and I have no clue what Im doing wrong, how do I fix this?

    my test site is set up at coy-design.com/test/mail.html


    Thanks!
    Last edited by lmorales; 01-26-2012 at 08:14 PM.

  • #2
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,744
    Thanks
    22
    Thanked 1,838 Times in 1,822 Posts
    Hello again Imorales,
    Have a look at what these changes do for you:
    markup -
    Code:
     <div class="hidden">
    		<img src="images/bb/120bb.jpg" title="Buyback Booklet" rel="lightbox[bb]" />
    		<img src="images/bb/bbpostcard.jpg" title="Buyback Postcard" rel="lightbox[bb]" />
            <img src="images/bb/exclusivebb.jpg" title="Exclusive Buyback Booklet" rel="lightbox[bb]" />
            <img src="images/bb/pac.jpg" title="Buyback Mail Pac" rel="lightbox[bb]" />
        <!--end .hidden--></div>
    And a little CSS -
    Code:
    	top: 0px;
    
    }
    
    #container1 {
    
    	 background: none repeat scroll 0 0 transparent;
        height: 768px;
        position: relative;
        top: 0;
    }
    .hidden {display: none;}
    #mailPic{
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • #3
    Regular Coder
    Join Date
    Mar 2011
    Posts
    215
    Thanks
    10
    Thanked 1 Time in 1 Post
    Its still not working am I being reallyyyy freaking dumb here or something? haha

  • #4
    Regular Coder
    Join Date
    Mar 2011
    Posts
    215
    Thanks
    10
    Thanked 1 Time in 1 Post
    Could this be causing the error? I edited the js file slightly as the newer lightbox wasnt coded to work with image maps as i heard.

    Code:
     var imageNum = 0;  
    		 imageLink.rel = imageLink.getAttribute('rel');     
    
            if ((imageLink.getAttribute("rel") == 'lightbox')){
                // if image is NOT part of a set, add single image to imageArray
                this.imageArray.push([imageLink.href, imageLink.title]);

  • #5
    Regular Coder
    Join Date
    Mar 2011
    Posts
    215
    Thanks
    10
    Thanked 1 Time in 1 Post
    The only way I could make it work was to not use a hidden div at all but to copy the image map locations for each group and just layer them ontop of each other, may not be the best way, but haha it worked like a charm. Thanks for your help!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •