Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. // I modified the widget so each entry will have a data-id attribute with the url for the detail view.
  2. var html = '<table>';
  3. $('table.archive-list tr').each(function() {
  4. var url = $(this).find('span:first').attr('data-id');
  5. var name = $(this).find('td a').text();
  6. html += '<tr><td>' + name + '</td><td>' + url + '</td></tr>';
  7. });
  8. $('body').html(html + '</table>');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement