下記デモのlightGalleryですが、現在見ているページがサムネイル部で赤枠になると思います。
http://sachinchoolur.github.io/lightGallery/demos/
class="lg-thumb-item"にclass="active"を
付けるか付けないかでその実行をしているようなのですが、
このactiveを付けるjsはどのタイミングで発動するように設定しているのでしょうか?
例えば【←】【→】を押した時に発動・・・など。
(おそらくページ移動、パラメータが変わった時に発動というわけではないと思うのですが。)
記述的にはこのあたりのjsだと思うのですが
addClass("active")
removeClass("active")
(function(c){d.core.s.exThumbImage?b(a(this).attr("href")||a(this).attr("data-src"),a(this).attr(d.core.s.exThumbImage),c):b(a(this).attr("href")||a(this).attr("data-src"),a(this).find("img").attr("src"),c)});d.core.$outer.find(".lg-thumb").html(e),c=d.core.$outer.find(".lg-thumb-item"),c.each(function(){var b=a(this),c=b.attr("data-vimeo-id");c&&a.getJSON("//www.vimeo.com/api/v2/video/"+c+".json?callback=?",{format:"json"},function(a){b.find("img").attr("src",a[0][d.core.s.vimeoThumbSize])})}),c.eq(d.core.index).addClass("active"),d.core.$el.on("onBeforeSlide.lg.tm",function(){c.removeClass("active"),c.eq(d.core.index).addClass("active")}),c.on("click.lg touchend.lg",
あなたの回答
tips
プレビュー