WordPress.org

Forums

Shutter Reloaded Plus
[resolved] link in caption (8 posts)

  1. laCabriole
    Member
    Posted 2 years ago #

    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/

  2. danaila_iulian
    Member
    Plugin Author

    Posted 2 years ago #

    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;
        });
    });
  3. laCabriole
    Member
    Posted 2 years ago #

    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

  4. laCabriole
    Member
    Posted 2 years ago #

    hi again,

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

    that might help

  5. danaila_iulian
    Member
    Plugin Author

    Posted 2 years ago #

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

  6. laCabriole
    Member
    Posted 2 years ago #

    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

  7. danaila_iulian
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  8. laCabriole
    Member
    Posted 2 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Shutter Reloaded Plus
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic