Skip to content

Instantly share code, notes, and snippets.

@EricSeastrand
Created February 7, 2018 18:41
Show Gist options
  • Save EricSeastrand/eee05fe1784c9df17f9f323b014c662e to your computer and use it in GitHub Desktop.
Save EricSeastrand/eee05fe1784c9df17f9f323b014c662e to your computer and use it in GitHub Desktop.
var products = [];
jQuery('.dottedlink:contains("Edit")').each(function(){
var $ = jQuery;
console.log($(this));
var row = $(this).closest('tr');
products.push({
'name' : row.find('td:eq(1)').text(),
'displayname' : row.find('td:eq(2)').text(),
'price' : row.find('td:eq(5)').text(),
'desc' : row.find('td:eq(3)').text(),
'link' : row.find('td:eq(1) a').attr('href'),
'edit' : $(this).attr('href')
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment