If you’re up for editing the plugin and know your way around JavaScript it’s a fairly straight forward fix.
All of the $(...).live(..., function
functions need to be changed to $(...).click(function
, $(...).submit(function
, and $(...).change(function
appropriately.
Then, the the $('.style').submit(function
(originally $('.style').live('submit',
) needs to be moved up into the renderStyles
function editing this line: container.append(...
You should end up with something like this:
let el = $(Mustache.to_html(styleTemplate, data)).data("style", style);
el.submit(function() {
$(this)
.find('input[name="new_style"]')
.val(encodeURIComponent(JSON.stringify($(this).data("style"))));
});
//Add to the last row
container.append(el);