Skip to content

Instantly share code, notes, and snippets.

@asaladino
Created February 20, 2017 19:01
Show Gist options
  • Select an option

  • Save asaladino/79551d662cc7a7bd529253e80aeb1465 to your computer and use it in GitHub Desktop.

Select an option

Save asaladino/79551d662cc7a7bd529253e80aeb1465 to your computer and use it in GitHub Desktop.
Extract all the faculty staff entries from the faculty staff widget.
// I modified the widget so each entry will have a data-id attribute with the url for the detail view.
var html = '<table>';
$('table.archive-list tr').each(function() {
var url = $(this).find('span:first').attr('data-id');
var name = $(this).find('td a').text();
html += '<tr><td>' + name + '</td><td>' + url + '</td></tr>';
});
$('body').html(html + '</table>');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment