WordPress.org

Ready to get started?Download WordPress

Forums

jQuery Colorbox
[resolved] Working for images,not for YouTube? (4 posts)

  1. crdunst
    Member
    Posted 1 year ago #

    Hi Arne,

    Firstly, thanks for the plugin, I'm always amazed at how much work people put into plugins and the support.

    This leads me onto a question related to a site I'm building. When I use the plugin for images, it works great, and as expected.

    When I try to link to a youtube video however, with a class of 'cboxElement' on the anchor, I get an error in the colorbox overlay: 'This content failed to load.'. Firebug console gives the following message: 'Error: cboxElement missing settings object'.

    I'm not sure if I've missed a setting, missed a class I should have added to the anchor, or have an incorrect youtube link.

    I've tried the following youtube variations, without success:
    http://www.youtube.com/watch?v=CSK1D3bZhRs
    http://www.youtube.com/embed/CSK1D3bZhRs
    http://youtube.com/v/CSK1D3bZhRs/
    http://youtube.googleapis.com/v/CSK1D3bZhRs/

    Any ideas what I'm doing wrong?

    I can provide a link privately if you need it. I'm only loading one version of jquery (version 1.7.2 if that makes a difference?), also no other errors from what I can see.

    Kind thanks,
    Chris

    http://wordpress.org/extend/plugins/jquery-colorbox/

  2. techotronic
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    the correct CSS class for links is "colorbox-link" with an optional parameter to group multiple links (e.g. all links with the class "colorbox-link-1" would be grouped).

    For me, this link works without problems: http://www.youtube.com/v/zCRUPWDIgYM

    See also
    http://www.techotronic.de/plugins/jquery-colorbox/opening-links-colorbox/

    Cheers,
    Arne

  3. crdunst
    Member
    Posted 1 year ago #

    That's great Arne, thanks for getting back to me.

    I did take a look at your site as it happens, so I'm not sure how I missed the demo - thanks for the clarification.

    Cheers,
    Chris

  4. techotronic
    Member
    Plugin Author

    Posted 1 year ago #

    no worries!

    Cheers,
    Arne

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic