Skip to content

Instantly share code, notes, and snippets.

@davidsara
Created September 17, 2020 09:47
Show Gist options
  • Save davidsara/0bad09ad4d148b9cbef940b54f4df2e3 to your computer and use it in GitHub Desktop.
Save davidsara/0bad09ad4d148b9cbef940b54f4df2e3 to your computer and use it in GitHub Desktop.
#jArchi - Batch creating or updating properties.
// Batch creating or updating properties.
//
// (c) 2020 David Sara
var key = window.prompt("Please enter the property key", "");
var value = window.prompt("Please enter the property value", "");
$(selection).each(function (obj) {
obj.prop(key, value);
});
console.log("Done");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment