I have a Breeze plugin generated javascript form that uses <div style="display:none"> to hide/show content based on user selections.

I need to be able to set a cookie if/when what was invisible content is set to display.

I've tried adding a javascript within the <div>, but it sets the cookie when the page is loaded, regardless of whether the form triggers the content to be visible.

Is there a javascript trigger that allows me to set a cookie once css display is set from none to visible?