The usual way to assign color box functionality on a link is like this:
$("a.colorbox").colorbox({ transition: "elastic" });
Newly added items are not bound in this way though.
How can I add colorbox to dynamically created <a class="colorbox"></a>
elements too?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…