Created
October 31, 2012 19:41
-
-
Save danny-englander/3989332 to your computer and use it in GitHub Desktop.
Unique Colorbox classes for better theming
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function (){ | |
// element-1 and element-2 are hrefs that trigger any given colorbox | |
$(".element-1").click(function() { | |
$('#colorbox').addClass("cb1").removeClass('cb2'); //add a custom class to #colorbox | |
}); | |
$(".element-2").click(function() { | |
$('#colorbox').addClass("cb2").removeClass('cb1'); //add a custom class to #colorbox | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Then, in CSS, you can fine tune various elements of of your specific Colorboxes. | |
e.g. | |
*/ | |
#colorbox.cb1 { | |
/* custom css here...*/ | |
} | |
#colorbox.cb2 { | |
} | |
#colorbox.cb1 #cboxContent { | |
} | |
#colorbox.cb2 #cboxContent { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment