Update API for Tanlinell Toggle JS to be more flexible