• Resolved laCabriole

    (@lacabriole)


    hy,

    i’m trying to use the caption via the title tag of the img link to show a link underneath the shuttered image. works ok – link shows up … but I tired hard make the link work – it would open the target page only when I use “open in a new window” manually with the mouse. Otherwise it will obviously just close the shuttered image.

    I used the title tag like this:
    <a href="http://www.thedomain.fr/wp-content/uploads/2014/04/the.jpg"><img src="http://www.thedomain.fr/wp-content/uploads/2014/04/the.jpg" title="<div><a href='http://thedomains.fr/the page/' target='_self' > + d'info</a></div>" /></a>

    any idea ? What’s missing? How would I exclude the caption area from the close command of shutter? tried already with z-index etc…

    thanx in advance
    Micky

    https://wordpress.org/plugins/shutter-reloaded-plus/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author danaila_iulian

    (@danaila_iulian)

    The only way to make links work inside the title is to add this bit o code at the end of the JS file:

    $(function(){
        $(document).on('click', '#shTitle>a',function(event){
    		window.location = $(this).attr('href');
    		event.stopPropagation();return false;
        });
    });
    Thread Starter laCabriole

    (@lacabriole)

    Hi Iulian,
    sorry when coming back to this only now.

    I did as you said … added the function to the JS file but no result. The link is still not working.

    Any other advice?
    Thanks
    Micky

    Thread Starter laCabriole

    (@lacabriole)

    hi again,

    the JS code throws an error:
    shutter-reloaded.js:3
    TypeError: ‘undefined’ is not a function (evaluating ‘$’)

    that might help

    Plugin Author danaila_iulian

    (@danaila_iulian)

    Looks like jquery is not loaded anywhere on your page. Can you leave a link to your website?

    Thread Starter laCabriole

    (@lacabriole)

    Sorry for the hassle,

    this is the page where I’d like to add the “caption links”:
    for the moment/try I put the link only on the shutter of the first image top left in the table

    Thanks
    Micky

    Plugin Author danaila_iulian

    (@danaila_iulian)

    I see jquery is loaded, modify the code above to:

    $ = jQuery;
    $(function(){
        $(document).on('click', '#shTitle a',function(event){
    		window.location = $(this).attr('href');
    		event.stopPropagation();return false;
        });
    });

    I have just tested it on your site and it works.

    Thread Starter laCabriole

    (@lacabriole)

    hi ,
    that worked – thanx a lot :-))
    the only disadvantage is in fact the big tooltip with the html in it.
    I tried to hide the tooltip like this

    $('a["title"]').on('mouseenter', function(e){
        e.preventDefault();
    });

    but no success

    MIcky

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘link in caption’ is closed to new replies.