colorbox
colorbox copied to clipboard
Why not show title
Hi This is my code:
<div class="colorbox-container-images">
<a class="box thumbnail colorbox-thumbnail" href="http://ircodex.dev/wp-content/uploads/2016/06/phone_apps400.jpg" title="phone_apps400">
<img class="colorbox-image" src="http://ircodex.dev/wp-content/uploads/2016/06/phone_apps400-150x150.jpg">
</a>
<a class="box thumbnail colorbox-thumbnail" href="http://ircodex.dev/wp-content/uploads/2016/06/Color-1.jpg" title="Color 1">
<img class="colorbox-image" src="http://ircodex.dev/wp-content/uploads/2016/06/Color-1-150x150.jpg">
</a>
<a class="box thumbnail colorbox-thumbnail" href="http://ircodex.dev/wp-content/uploads/2015/09/robot-txt.jpg" title="robot-txt">
<img class="colorbox-image" src="http://ircodex.dev/wp-content/uploads/2015/09/robot-txt-150x150.jpg">
</a>
<a class="box thumbnail colorbox-thumbnail" href="http://ircodex.dev/wp-content/uploads/2016/06/ircodex-offline-wordpress-documentation-widget.jpg" title="ircodex-offline-wordpress-documentation-widget">
<img class="colorbox-image" src="http://ircodex.dev/wp-content/uploads/2016/06/ircodex-offline-wordpress-documentation-widget-150x146.jpg">
</a>
<div>
But not show title. when i check code the title is empty Please help
Colorbox will attempt to get the title from the title attribute of the element it was assigned to. I'm assuming you assigned Colorbox to the the img elements, e.g. $('.colorbox-image').colorbox()
, instead of the anchor elements, e.g. $('.colorbox-thumbnail').colorbox()
.
If that's not the issue you'll need to provide more info.