Instagram 弹出窗口

Instagram popup

情况

我正在使用 instafeed plugin 根据主题标签从 Instagram 加载一些图像。暴跌运作良好。每次单击 Instagram 图片时,我都想在我的网站中打开一个 light-box window 包含图片、标题、用户名等...

var allTagFeed = new Instafeed({
    target: 'instpop',
    get: 'tagged',
    tagName: 'mongolia',
    clientId:'xxxxxxxxxxxx',
    accessToken: 'xxxxxxxxxx',
    limit:'2',
    template: '<div id="caption">{{caption}}  </div><div id="bg"><a href="{{link}}" target="_blank"><img src="{{image}}" /></a>{{likes}}</div>' 
    });

解决方法

创建调用该特定用户信息的函数,以便我可以将其放入模板。

问题

我不知道如何创建该功能。我还想问问是否有人知道另一种方法可以在单独的弹出窗口中包含 Instagram 图片及其信息(就像 instagram.com),因为我不希望用户离开我的页面。

好的,我找到了一个方法:

点击后,此函数将在模板中使用class。

var allTagFeed = new Instafeed({
    target: 'inst1all',
    get: 'tagged',
    tagName: 'mongolia',
    clientId:'xxxxxxxxxxxxxxx',
    accessToken: 'xxxxxxxxxxxxxx',
    limit:'32',

      template: '  <div class="cont" ><a  href="{{link}}" target="_blank"><img  src="{{image}}" /></a><div class="bg"><div class="likes"><img src="./img/likes.png">{{likes}}</div><div class="comments"><img src="./img/likes.png">{{comments}}</div></div><div class="caption">{{caption}}</div></div> '

});

 $( document ).ready(function() {
     //alert('s');
    $("#inst1all").on('click','a', function(){
        var _href = $(this).attr("href");
        alert(_href);

    });

});