Checkout @alyssamwilie 's answer to this post. This is the technique you'd want to use to get the info.
Write a function similar to the code below to get the data and add it to the window object:
$(document).ready(function() {
// Declare your table data variable
var tableData = [];
$('#target tr').each(function(index) {
// Add empty array to the tableData variable
tableData.push([]);
// Loop through trs and push values to the array at index
$(this).find('td').each(function(j, el) {
tableData[index].push(el.textContent);
});
});
// Add the tableDato the window object for easy access
window.tableData = tableData;
});
You'll get a data structure like so:
Then write a function that populates the hidden fields in the popup. Somthing like this maybe:
Checkout @alyssamwilie 's answer to this post. This is the technique you'd want to use to get the info.
Write a function similar to the code below to get the data and add it to the window object:
$(document).ready(function() {
// Declare your table data variable
var tableData = [];
$('#target tr').each(function(index) {
// Add empty array to the tableData variable
tableData.push([]);
// Loop through trs and push values to the array at index
$(this).find('td').each(function(j, el) {
tableData[index].push(el.textContent);
});
});
// Add the tableDato the window object for easy access
window.tableData = tableData;
});
You'll get a data structure like so:
Then write a function that populates the hidden fields in the popup. Somthing like this maybe: