Any way to allow users to toggle layer visibility?

Discussion created by alicejarvis on Jan 23, 2014
Latest reply on Feb 28, 2014 by hrubyf
I'm using the Storytelling Text and Legend template. I'd like to show several map layers on a tab and allow the user to turn them on and off - is there any way to do this? e.g. is it possible to use this kind of code: