Skip to content

Instantly share code, notes, and snippets.

@jbsarrodie
Created September 6, 2018 19:25
Show Gist options
  • Save jbsarrodie/479fde4360eb4187d40022465d28e627 to your computer and use it in GitHub Desktop.
Save jbsarrodie/479fde4360eb4187d40022465d28e627 to your computer and use it in GitHub Desktop.
#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