Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#jArchi script to add or update properties on a selection of objects
var propName = window.prompt("Which property do you want to add or update (leave empty to cancel)?", "");
if (propName) {
var propValue = window.prompt("Which value do you want to set for '"+propName+"' (leave empty to cancel)?", "");
if (propValue) {
$(selection).prop(propName, propValue);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment