title: Create jquery dialog RactiveJS decorator
body: <p>I would like to create a decorator for jQuery Dialog, in order to open and close a dialog by using data model.
  This is the example code for template:</p>
  
  <pre><code>&lt;div id="dialog-confirm" decorator="jqueryDialog" show="{{dlgShow}}" twoway="true" modal="true" title="File already exists"&gt;
      &lt;p&gt;&lt;span class="ui-icon ui-icon-alert" style="float:left; margin:0 7px 20px 0;"&gt;&lt;/span&gt;File already exists, Do you want to overwrite it?&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;script type="text/javascript"&gt;
  
  var jqueryDialogDecorator = function ( node, content ) {
  
      var isModal = jQuery(node).attr('modal');
  
      var observer = new MutationObserver(function(mutations) {
          mutations.forEach(function(mutation) {
              if (mutation.attributeName == 'show') {             
                  var action = jQuery(node).attr('show') == 'true' ? 'open' : 'close';
                  jQuery(node).dialog(action);
              }
          });    
      });
  
      observer.observe(node, {attributes: true});    
  
      jQuery(node).dialog({
          autoOpen: false,
          modal: isModal,
          close: function( event, ui ) {
              jQuery(node).attr('show', 'false');         
          }
      }); 
  
      return {
          teardown: function () {
  
              observer.disconnect();
  
          }
      }
  
  };
  
  &lt;/script&gt;
  </code></pre>
  
  <p>If I change dlgShow value to true, the dialog show correctly;
  The callback on close function of the dialog change the <strong>show attribute</strong> value to <em>false</em>.
  The problem is the ractive data <strong>dlgShow</strong> doesn't update despite the twoway binding, so the value is still set to true.
   Furthermore, I don't know how to programmatically get the binding name, i.e '<em>dlgShow</em>'.</p>
  
  <p>Any help would be very appreciated, thank you !</p>