• Hi again

    I have problem with image title, the lightbox will show only title for files that have uppercase extension (.JPG) and for files with lowercase (.jpg) the title is not vissible (through the title=”something..” is visible in the sourcecode in a href tag.

Viewing 1 replies (of 1 total)
  • Thread Starter Tomperys

    (@tomperys)

    Ok I find the issue, when I put this code to the header the title wasnt visible for the extensions that are listed:

    <script>
    jQuery(document).ready(function($) {
    jQuery( ‘a[href$=”.jpg”], a[href$=”.jpeg”], a[href$=”.gif”], a[href$=”.png”]’ ).each( function () {
    var imageTitle = ”;
    if ( jQuery( this ).next().hasClass( ‘wp-caption-text’ ) ) {
    imageTitle = jQuery( this ).next().text();
    }

    jQuery( this ).attr( ‘title’, imageTitle );
    });
    });
    </script>

    When I removed the a[href$=”.jpg”] from the list in this code, the title is visible now….

    • This reply was modified 9 years, 8 months ago by Tomperys.
Viewing 1 replies (of 1 total)

The topic ‘Image title’ is closed to new replies.