Add jQuery colorbox plugin to a dynamically created element

Posted by Jon Winstanley on Stack Overflow See other posts from Stack Overflow or by Jon Winstanley
Published on 2010-03-14T19:43:58Z Indexed on 2010/03/14 20:05 UTC
Read the original article Hit count: 755

Filed under:
|

The usual way to assign colorbox functionality on a link is like this:

$("a.colorbox").colorbox({ transition: "elastic" });

Newly added itmes are not bound in this way though.

How can I add colorbox to dynamically created <a class="colorbox"></a> elements too?

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about colorbox