Results 1 to 2 of 2

Thread: Help with Lightbox / OnClick events

  1. #1
    Join Date
    Feb 2013
    Thanked 0 Times in 0 Posts

    Default Help with Lightbox / OnClick events

    I have a small image rotator on a clients homepgae that displays thumbnails of video content. It has been requested to have the video's load "into" the homepage when a site visitor clicks on a thumbnail. The most elegant solution that jumped to my mind was to use Lightbox to display the videos when clicked (note, some videos are youtube and some are locally hosted on the clients web server).

    Due to the image rotator, I find myself needing to use an onclick event to redirect visitors to the video content - a href tags will break the rotator (how handy is that?). It seems that all solutions to this I've found online mandate the a href, but sadly, that is not an option. Anyway, I find myself encountering the problem that onclick doesn't appear to be able to pass the required "rel" tag to lightbox so that the links open in LB. Is there a way to accomplish this?

    I'm using Lightbox 2.0.4 (I'm not loyal to this version, and if there is a different or newer version that will let me accomplish my goal, I'm all ears!) the rotator is a modified version of a jquery carousel that - to be honest - I can't even remember where it originated. I am not tied to either solution, I just need a way to cycle through a random amount of images that when clicked will open a related video into a lightbox style solution on the same page. My index is php based, any help or suggestions are greatly appreciated! Thanks in advance!

  2. #2
    Join Date
    Mar 2005
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries


    Lightbox doesn't show videos anyway. Easybox might be what you want:

    Unlike Lightbox 2.04, it uses jQuery which should make integrating it to the carousel easier. It also does do YT and Vimeo videos, and iframes which can contain any page - like for a locally hosted video.

    It may require a link in it's default form. But it shouldn't be too hard using basic jQuery to make it respond to clicks on other elements. If you need help with that part, let me know.
    - John

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

Similar Threads

  1. Two onclick events clashing
    By Schmoopy in forum JavaScript
    Replies: 9
    Last Post: 04-01-2009, 05:43 PM
  2. Replies: 1
    Last Post: 11-16-2007, 09:08 AM
  3. Omni Slide & onclick events ?
    By kwinsor in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 05-08-2007, 01:51 PM
  4. Omnislide Onclick Events for Sliding In and Out?
    By wpthebest in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 03-06-2007, 03:03 PM
  5. Multiple onclick events
    By fambi in forum JavaScript
    Replies: 5
    Last Post: 03-30-2006, 05:01 PM


Posting Permissions

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