WordPress.org

Ready to get started?Download WordPress

Forums

JSJ Gallery Slideshow
[resolved] Request: zoom and hover (11 posts)

  1. Damiaan van Vliet
    Member
    Posted 1 year ago #

    Hello Jorge,
    Your plug-in works like a charm, I am very pleased with it.
    I have two requests. First, is it possible that the image changes on hover instead on mouse click?
    Second, is it also possible that when I hover on the larger image it shows a zoomed version of the image?

    Thank you!

    https://wordpress.org/plugins/jsj-gallery-slideshow/

  2. Jorge Silva-Jetter
    Member
    Plugin Author

    Posted 1 year ago #

    As of right now, none of these two things are possible out of the box.

    For #1:

    This is not implemented, but would not be hard to do with a couple of lines of jQuery. Are you familiar with jQuery?

    If so that could go something like this:

    `
    $('.jsj-gallery-slideshow .gallery-navigation .gallery-button').on('hover', function(){
    if($(this).text().indexOf('next') > 0){
    $(this).parent().parent().find('gallery').cycle('next');
    }
    else {
    $(this).parent().parent().find('gallery').cycle('prev');
    }
    });
    `

    For #2:

    One user (non-developer) added this functionality by himself. You can take a look at this post and see if you can pull it off:

    http://wordpress.org/support/topic/how-to-add-image-caption-for-plugin?replies=11

    If you want to formally request these as features, please do so here:

    http://thejsj.com/jsj-gallery-slideshow-feature-request/

  3. Damiaan van Vliet
    Member
    Posted 1 year ago #

    Morning Jorge,
    First of all, thanks for quick reply! Amazing.
    #1; for the hover I slightly understand your code but have no clue where to add your code to; so which file from your plug-in.

    #2; I will check the link for the image caption but is that an answer to my question about zoom?

  4. Jorge Silva-Jetter
    Member
    Plugin Author

    Posted 1 year ago #

    1. I would suggest actually adding it outside of the plugin, in your own .js files in your theme. That way, when the plugin gets updated, your code would still work.

    2. Concerning zoom, I think that is a very hard feature to implement, so I don't sorry myself implementing it any times soon. Sorry. As an alternative, if you decide to build this feature or get someone else to do it, I might add the code base to the plugin permanently.

  5. Damiaan van Vliet
    Member
    Posted 1 year ago #

    Thank you Jorge for your answer and support. It is clear to me.
    I will find another solution and definitely can use your plug-in at another occasion.
    Thanks!

  6. datiswous
    Member
    Posted 1 year ago #

    Maybe he means something like this:

    http://www.jacklmoore.com/zoom/

  7. Damiaan van Vliet
    Member
    Posted 1 year ago #

    Exact @datiswous! That is what I mean :) I have found a plug-in what almost does what I need but the zoom window is on another position than the original image. And... I am not sure how the support will be.

  8. cielbleu
    Member
    Posted 8 months ago #

    Hi Jorge, I am interested in the image changes on hover as Damiaan suggested. I tried to follow your instruction, but have yet to make it work.
    I have created a new js file with your code above and saved it in my wordpress theme's js folder.

    I know little about jQuery. Can you enlighten me what I need to do next?

    thanks!

  9. Jorge Silva-Jetter
    Member
    Plugin Author

    Posted 8 months ago #

    Hi cielbleu,

    I actually think this feature is pretty complicated and might take a of re-working so I don't really know how to go about it without some time dedicated to it.

    I would look at the demos for this plugin (http://www.jacklmoore.com/zoom/) and try to incorporate their demos into your galleries. Again, not really sure how simple this would be.

  10. cielbleu
    Member
    Posted 8 months ago #

    Jorge, Thank you for your replay. The function i am after is images change on hover on the thumbnail instead of mouse click. (Damiaan's request 1 only). I am sorry that I didn't make my request clear enough.

    I have put wp_register_script and wp_enqueue_script as below in my theme's function.php but nothing has changed.

    function my_js_include_function() {
    wp_register_script('gallery-hover', get_template_directory_uri() . '/js/gallery-hover.js', array( 'jquery' ), '1.0', true);
    wp_enqueue_script('gallery-hover');
    }
    add_action( 'wp_enqueue_scripts', 'my_js_include_function' );

  11. Jorge Silva-Jetter
    Member
    Plugin Author

    Posted 8 months ago #

    Ideas on how to debug this:

    Can you add a console.log to your file and see if it gets output?

    Can you view source and see if it's there?

    Can you add another file and see if it's there?

    Can add an echo 'hello world'; statement in your my_js_include_function to make sure that's running?

    Can you add a echo 'hello world'; statement on top of your add_action to make sure it's running?

    Depending on where this is happening, then you can try to debug it from there. It might be something related to this, or it might be something else.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags