Commit 3a578caf authored by Eric Poirier's avatar Eric Poirier
Browse files

Fix members without websites


Signed-off-by: Eric Poirier's avatarEric Poirier <eric.poirier@eclipse-foundation.org>
parent daa0a980
......@@ -22,11 +22,32 @@
success: function (data) {
console.log(data);
$(data).each(function() {
$('.ide-members-slider').append('<div class="featured-members-item item padding-20">' +
'<a target="_blank" href="'+ $(this)[0]['website'] +'">' +
'<img alt="'+ $(this)[0]['name'] +'" class="img-responsive" src="'+ $(this)[0]['logos']['full'] +'">' +
'</a>' +
'</div>');
$featuredMembersItem = $("<div></div>");
$featuredMembersItem.attr({
"class": "featured-members-item item padding-20"
});
$img = $('<img>');
$img.attr({
'alt': $(this)[0]['name'],
'class': 'img-responsive',
'src': $(this)[0]['logos']['full']
});
if ($(this)[0]['website']) {
$link = $("<a></a>");
$link.attr({
'target': '_blank',
'href': $(this)[0]['website']
});
$link.append($img);
$featuredMembersItem.append($link);
}
else {
$featuredMembersItem.append($img);
}
$('.ide-members-slider').append($featuredMembersItem);
});
$(".ide-members-slider").owlCarousel({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment