Results 1 to 3 of 3

Thread: Prev/Next mouse hover on Lightbox 2.03a

  1. #1
    Join Date
    Apr 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Prev/Next mouse hover on Lightbox 2.03a

    Hi everybody... I hope it's a new question about the marvelous lightbox... If not please pardon me...

    http://www.dynamicdrive.com/dynamici...box2/index.htm

    So...
    Anyone know if there is any possibility to have the "on mouse hover" property only near the buttons (next/prev) and not in all the left or right portion of the image?

    I think the solution is in the attribute "hoverNav" (from line 291 file lightbox.js).

    Many thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That will make that feature much harder for the uninitiated user to discover (it is already a little hard to find for folks unfamiliar with lightbox). But, if you insist - Edit lightbox.css not lightbox.js. Here in lightbox.css (changes/additions red):

    Code:
    #hoverNav{
    	position: absolute;
    	top: 0;
    	left: 0;
    	height: 100px;
    	width: 100%;
    	overflow:hidden;
    	z-index: 10;
    	}
    #imageContainer>#hoverNav{ left: 0;}
    #hoverNav a{ outline: none;}
    
    #prevLink, #nextLink{
    	width: 100px;
    	height: 100%;
    	background: transparent url(../images/blank.gif) no-repeat; /* Trick IE into showing hover */
    	display: block;
    	}
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Apr 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Suuuuuure...
    Why I didn't search here first...

    Sure sure sure...

    And so...
    If you use images prev.gif and next.gif you/we can best use this values:

    For #hoverNav
    120 px height

    For prev/nextLink 70px width.

    Many many thanks to you!

Bookmarks

Posting Permissions

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