Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #26618

    how do I switch the portfolio thumbnail action from “hover” to “click”?

    (So it changes the big image on click, instead of on hover – while keeping the effect when you do hover on the thumbnail.)

    so close to perfect, thank you!!

    #131046

    Try following – open up wp-contentthemesenfoldjsshortcodes.js and replace

    gallery.on('mouseenter','.avia-gallery-thumb a', function()
    {
    var _self = this;

    big_prev.attr('data-onclick', _self.getAttribute("data-onclick"));
    big_prev.height(big_prev.height());
    big_prev.attr('href', _self.href)

    var newImg = _self.getAttribute("data-prev-img"),
    oldImg = big_prev.find('img').attr('src');

    if(newImg != oldImg)
    {
    var next_img = new Image();
    next_img.src = newImg;

    big_prev.stop().animate({opacity:0}, function()
    {
    big_prev.html(next_img);
    big_prev.animate({opacity:1});
    });
    }
    });

    with

    gallery.on('click','.avia-gallery-thumb a', function()
    {
    var _self = this;

    big_prev.attr('data-onclick', _self.getAttribute("data-onclick"));
    big_prev.height(big_prev.height());
    big_prev.attr('href', _self.href)

    var newImg = _self.getAttribute("data-prev-img"),
    oldImg = big_prev.find('img').attr('src');

    if(newImg != oldImg)
    {
    var next_img = new Image();
    next_img.src = newImg;

    big_prev.stop().animate({opacity:0}, function()
    {
    big_prev.html(next_img);
    big_prev.animate({opacity:1});
    });
    }
    return false;

    });

    #131047

    tried it, doesn’t quite work http://douglasmoyerarchitect.com/dev/portfolio-item/town-lane/

    tested with all plugins disabled…

    #131048

    figured it out, change to mousedown not click

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘portfolio/avia/gallery clicking’ is closed to new replies.