I have set up a store where I'm selling products and I wanted to include an Instagram feed on my site.
I decided to use installed and I have it all working except that I'd like the images to open in a new window.
I've looked at some questions on here and tried the templating. The templating stops any images from showing but I'm also seeing no errors in my debugging.
This is what I have:
<script type="text/javascript">
var feed = new Instafeed({
get: 'user',
userId: 'my-user-id-here',
accessToken: 'my-access-token-here',
template: '<a href="{{link}}" target="_blank"><img src="{{image}}" /></a>',
limit:8
});
feed.run();
</script>
I'm a bit stumped. Any ideas?
The best way to do it, would be to use the
templateoption:OR
In your instafeed.js file, look around line 177 and add anchor.setAttribute('target', '_blank'); works beautifully.
OR you can add popUp also:-
Function will take the class being used in the template, after being clicked.