I have a function that suppose to add a row to a table depending on screen resolution. The problem is that I do not know how to adapt this part $("tblPotrawy > tbody td").... in order to modify appropriate table. I tried $("tblPotrawy..., $("#tblPotrawy... and none of these work.
Can you please advice how can this be used?
function potrawyEdycjaInfo(nazwaPotrawy){
if ($(document).width() < 1400) {
var tblPotrawy = $("#tblPotrawy1280");
}
else {
var tblPotrawy = $("#tblPotrawy1920");
}
$("tblPotrawy > tbody td").each(function(i, el) {
if ($(el).text() === nazwaPotrawy) {
$(el).parent().after('<tr id="edycjaInfo"><td>test</td></tr>');
}
});
}