Created
March 27, 2014 14:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* global $,console,document,behanceAPI */ | |
var behancekey = "REPLACE ME"; | |
$(document).ready(function() { | |
//Set my key | |
behanceAPI.setKey(behancekey); | |
behanceAPI.getProjectsForUser("gwilson", function(res) { | |
console.dir(res); | |
var result = ""; | |
for(var i=0;i<res.length; i++) { | |
if(i==0 || i%3 == 0) { | |
result += "<div class='pure-g-r'>\n"; | |
} | |
var image = res[i].covers[115]; | |
result += "<div class='pure-u-1-3'>"+image+"</div>\n"; | |
if((i>0 && (i+1) % 3 == 0) || i == res.length-1) { | |
result += "</div>\n"; | |
} | |
} | |
console.log(result); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment