You can use the jquery live () function to view clicks on existing and future colorbox channels. In addition, I recommend not using rel
as your selector. This attribute is intended for use in SEO. So in this example, I moved your selector from the rel attribute to the class attribute:
$(document).ready(function() { $('a.open_ajax').live('click', function(){ $.colorbox({ open:true, href: this.href
Then just make sure that everything you want to activate for the new colorbox content has the open_ajax and href classes. For instance:.
<a class="open_ajax" href="colorboxPage.html">Open</a>
Update for jQuery 1.7+
For jQuery 1.7, since live () is deprecated, you need to do it like this:
$(document).on("click", "a.open_ajax", function() {
source share