The usual way to assign color box functionality on a link is like this:
$(\"a.colorbox\").colorbox({ transition: \"elastic\" });
Newly added
I was having the same problem as @sunburst with having to click the trigger link twice. Used the same code, but .delegate()
instead of .live()
. Solved everything and cleaned up my jQuery nicely!
Nice explanation here: http://www.alfajango.com/blog/the-difference-between-jquerys-bind-live-and-delegate/