Closed efinst0rm closed 7 years ago
You could wrap the $('table').stacktable() code inside a function, like
function startStacktable(){
$('table').stacktable()
}
And then call it again inside the "$(addButton).click()" function, so it generates the mobile version of the table again.
Your code would look like this: http://pastebin.com/Xh8WTdrR
The only issue remaining in your example, when called twice, it duplicates the table. So just remove the first instance, which will make it function properly no matter how many times it's called.
` startStacktable();
if ($('#myTable').find('.stacktable').size() >= 2) { $('#myTable').find('.stacktable:first').remove(); } `
Hello,
I have been using stacktable in my project and it's awesome but today I came across an issue with dynamically created fields in jquery. When you scale the screen down to a smaller size the extra fields created do not show anymore, but when you resize the website to full they appear just fine. Below I've attached the js I'm using to do the dynamic fields. http://pastebin.com/duBWd66F