Multiple stylesheets for a Lightbox clone.

Posted by Neurofluxation on Stack Overflow See other posts from Stack Overflow or by Neurofluxation
Published on 2010-06-01T09:03:25Z Indexed on 2010/06/01 9:13 UTC
Read the original article Hit count: 224

Filed under:
|
|
|

Hey!

I have a Lightbox clone (colorbox), which works fine and has no real issues. What I would like is an extra arguement that would say:

[pseudocode]

if (linksRel == "lightbox1") {
  add stylesheet1 to this lightbox
} else {
  add stylesheet2 to this lightbox
}

[/pseudocode]

Currently, I have a page with a "colorbox.css" file attached and the" jquery.colorbox.js" file as well - But I want the JS file to import the required CSS dependant on what link was clicked... Urgh, does that make sense?

Does anyone have any ideas? I'm stumped!

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery