Created
June 27, 2017 04:54
-
-
Save quyen91/a2decb0bdb513192b717b32451116f55 to your computer and use it in GitHub Desktop.
This file contains 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
$(function(){ | |
$.getJSON('trello_data.json', function(data) { | |
$.each(data.lists, function(i, f) { | |
// display name of all list | |
tr = $('<tr/>'); | |
tr.attr('id', f.id); | |
tr.append("<th>" + f.name + "</th>"); | |
$('table').append(tr) | |
}); | |
$.each(data.cards, function(i, f) { | |
// expand card name in list | |
$('#'+ f.idList).append("<td width='200'>" + f.name + "</td>"); | |
}); | |
//set width for td in table | |
$("td").each(function(index) { | |
var htmlText = "<div style='width:100px;' class='item'>" + $(this).text() +"</div>"; | |
$(this).html(htmlText); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment