Skip to content

Instantly share code, notes, and snippets.

@tjmaxwell
Created November 22, 2016 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjmaxwell/526a0c5a35031bed2fb37b4a8cdac12c to your computer and use it in GitHub Desktop.
Save tjmaxwell/526a0c5a35031bed2fb37b4a8cdac12c to your computer and use it in GitHub Desktop.
{{ 'instagramlite.min.js' | asset_url | script_tag }}
<div class="h_row_content h_row_5 mb30 animated" data-animation="fadeInUp">
<div class="clearfix">
<h3>{{ 'home_page.sections.instagram_title' | t }}</h3>
</div>
<div id="instafeed" data-client-id="{{ settings.instagram_client_id | strip }}" data-count="{{ settings.instagram_number | strip }}"></div>
</div>
<script type="text/javascript">
$(function() {
var $target = $("#instafeed");
$target.instagramLite({
clientID: $target.data('client-id'),
urls: true,
videos: true,
limit: $target.data('count'),
error: function(errorCode, errorMessage) {
if(errorCode && errorMessage) {
alert(errorCode +': '+ errorMessage);
}
}
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment