title: Problem with combination of hide(), show() and reset() in shiny
body: <p>I have been having problems combining the hide(), show() and reset() functions from the shinyjs package.
  I have two divs. One div collects data using multiple user inputs and ends with a submit button. Once the submit button is pressed, another div should appear that shows the collected data in a table. In this second div, there is another button that should reset the original giv and show it again so that more data can be collected.</p>
  <p>I tried to produce a reproducible example using some code from the shinyjs help page:</p>
  <pre><code>library(shiny)
  library(shinyjs)
  
  shinyApp(
   ui = fluidPage(
     useShinyjs(),
     div(
       id = &quot;form&quot;,
       textInput(&quot;name&quot;, &quot;Name&quot;, &quot;Dean&quot;),
       radioButtons(&quot;gender&quot;, &quot;Gender&quot;, c(&quot;Male&quot;, &quot;Female&quot;)),
       selectInput(&quot;letter&quot;, &quot;Favourite letter&quot;, LETTERS)
     ),
     div(
       id = &quot;formreset&quot;,
       textInput(&quot;name&quot;, &quot;Newform&quot;, &quot;Dean&quot;),
       radioButtons(&quot;gender&quot;, &quot;Newform&quot;, c(&quot;Male&quot;, &quot;Female&quot;)),
       selectInput(&quot;letter&quot;, &quot;Newform letter&quot;, LETTERS)
     ),
     actionButton(&quot;reset_originalDiv&quot;, &quot;Reset to original div&quot;),
     actionButton(&quot;resetName&quot;, &quot;Reset name&quot;),
     actionButton(&quot;resetGender&quot;, &quot;Reset Gender&quot;),
     actionButton(&quot;change_div&quot;, &quot;Change div&quot;)
   ),
   server = function(input, output) {
     observeEvent(input$resetName, {
       reset(&quot;name&quot;)
     })
     observeEvent(input$resetGender, {
       reset(&quot;gender&quot;)
     })
     observeEvent(input$change_div, {
       hide(&quot;form&quot;)
       show(&quot;formreset&quot;)
     })
     observeEvent(input$reset_originalDiv, {
       reset(&quot;form&quot;)
       hide(&quot;formreset&quot;)
       show(&quot;form&quot;)
     })
   }
  )
  </code></pre>
  <p>As you can see, when clicking the &quot;Reset to original div&quot;, the original div is not shown again.</p>
  <p>Where is my mistake?</p>
  <p>Thank you very much in advance.</p>