Skip to content

Instantly share code, notes, and snippets.

@zoerooney
Created August 8, 2014 18:41
Show Gist options
  • Save zoerooney/fff54151a624d9b45a71 to your computer and use it in GitHub Desktop.
Save zoerooney/fff54151a624d9b45a71 to your computer and use it in GitHub Desktop.
Instafeed with links opening in new window
<div id="instafeed"></div>
<script>
var feed = new Instafeed({
clientId: 'XXXXXXXXXXXXXXXXXX',
accessToken: 'abcdefghijklmnop',
get: 'user',
userId: 12345678,
limit: 5,
after: function() {
external();
}
});
feed.run();
function external(){
jQuery(document).ready(function($){
$('#instafeed a').attr('target','_blank');
});
}
</script>
@monechevarria
Copy link

Thanks for this! Helped in our site: www.adventurefittravel.com. 👍

@rvizena
Copy link

rvizena commented Aug 20, 2018

just found this and it is still successful in opening a new window. The developers stated this instafeed should be stable 'til 2020. Thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment