Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kinlane/5564715 to your computer and use it in GitHub Desktop.
Save kinlane/5564715 to your computer and use it in GitHub Desktop.
Federal Agency Digital Strategy 7.1 Listing
<!-- Being Federal Agency Digital Strategy 7.1 Listing --->
<table id="agency71Listing">
<tbody>
<tr>
<td colspan="2">
<table cellpadding="1" width="100%">
<tbody>
<tr>
<td width="80%" align="left"><strong>Federal Agency Digital Strategies</strong></td>
<td width="10%" align="center"><a href="https://gist.github.com/kinlane/5564677" target="_blank" title="Script for Display"> <img src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-code.png" border="0" width="25" /> </a></td>
<td width="10%" align="center"><a href="https://raw.github.com/kinlane/federal-government/gh-pages/data/federal-agencies-digital-strategy-7-1-2-with-social.json" target="_blank" title="Raw JSON Data"> <img src="https://s3.amazonaws.com/kinlane-productions/bw-icons/bw-json-data-store.png" border="0" width="25" /> </a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<script id="agencyStrategy71ListingTemplate" type="text/template">
<tr>
<td width="75" align="center" valign="middle">
<a href="{{url}}" target="_blank">
<img src="{{logo}}" width="75" align="center" style="padding: 15px; padding-left: 40px;" />
</a>
</td>
<td>
<ul style="padding-left: 25px; font-size: 11px; list-style: round;" id="seven-{{agency_id}}"></ul>
</td>
</tr>
<tr>
<td colspan="2"><hr /></td>
</tr>
</script>
<script type="text/javascript">
function listAgencies71DigitalStrategy()
{
$.getJSON('federal-agencies-digital-strategy.json', function(data) {
item72count = 0;
$.each(data['agencies'], function(key, val) {
agency_id = val['agency_id'];
var template = $('#agencyStrategy71ListingTemplate').html();
var html = Mustache.to_html(template, val);
$('#agency71Listing').append(html);
seven = val['7.2'];
$.each(seven, function(key, val) {
name = val['name'];
description = val['description'];
if(name.length>2)
{
$('#seven-'+agency_id).append('<li style="list-style: circle;">' + name+ '</li>');
item72count++;
}
});
$('#AgencyDigitalStrategy72Count').html(item72count);
});
});
}
listAgencies71DigitalStrategy();
</script>
<!-- End Federal Agency Digital Strategy 7.1 Listing --->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment