Skip to content

Instantly share code, notes, and snippets.

@radosek
Last active October 12, 2021 22:21
Show Gist options
  • Select an option

  • Save radosek/c10a79a5f6575e1e18613a352b96cd70 to your computer and use it in GitHub Desktop.

Select an option

Save radosek/c10a79a5f6575e1e18613a352b96cd70 to your computer and use it in GitHub Desktop.
Synced via Snip
// All styling have to be inside a class
(function ($) {
let repeaterIdName = $(".oxy-dynamic-list").find("*").attr("id");
let repeaterIdCount = 1;
$(function () {
$(".oxy-dynamic-list")
.find("div")
.each(function (i) {
if ($(this).attr("class").includes("ct-div-block")) {
$(this).attr({ id: `${repeaterIdName}-${repeaterIdCount}` });
repeaterIdCount++;
}
});
});
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment