How do I display, in a ColorBox popup, a caption AND a title (caption from image 'alt' attribute and title from 'title' attribute
Add "colorbox" class to your element. You could also select by document.getElementsByTagName("img"), but we don't really want to select every single img tag.

var cbox = document.getElementsByClassName("colorbox")

for (var i=0, i &lt; cbox.length; i++) {
  cboxTitle = cbox[i].title;
  cboxAlt= cbox[i].alt;

  cboxTitle = "&lt;span class='title'&gt;" + cboxTitle + "&lt;/span&gt; &lt;span class='alt'&gt;" + cboxAlt + "&lt;/span&gt;"
}


You then just got to make colorbox print out the title tag and style it the way you want.