Commit 02c915cd authored by Christopher Guindon's avatar Christopher Guindon
Browse files

Merge branch 'epoirier/main/fix-members-without-websites' into 'master'

Fix members without websites

See merge request !6
parents daa0a980 3a578caf
......@@ -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