Skip to content

Instantly share code, notes, and snippets.

@jarrodbell
Created March 1, 2012 08:48
Show Gist options
  • Select an option

  • Save jarrodbell/1948409 to your computer and use it in GitHub Desktop.

Select an option

Save jarrodbell/1948409 to your computer and use it in GitHub Desktop.
Manage Object Visibility
var manageItems = ["l1","l2","l3","l4"];
function showItem(joinToShow) {
var hideItems = [];
for (var i = 0; i < manageItems.length; i++) {
if (manageItems[i] != joinToShow) {
hideItems.push({join: manageItems[i], opacity: 0});
}
}
hideItems.push({join: joinToShow, opacity: 1});
CF.setProperties(hideItems);
}
// Then from a button, call something like:
// showItem("l1");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment