colorbox icon indicating copy to clipboard operation
colorbox copied to clipboard

Why not show title

Open hamedmoody opened this issue 8 years ago • 1 comments

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

hamedmoody avatar Jul 28 '16 03:07 hamedmoody

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.

jackmoore avatar Jul 28 '16 04:07 jackmoore