title: handle jQuery widget close method
body: <p>I am new to jQuery widget and trying to learn it, I create a widget for displaying a dialog, the widget's <code>_create()</code> method does the following:</p>
  
  <p>Adds a mask dialog for hiding the user screen.
  Adds a close "button" which is a div with a handler for click event
  Displaying the dialog to the user</p>
  
  <p>When I click the close div I can remove the widget instance with the following command -</p>
  
  <p><code>$(this).parent().remove();</code></p>
  
  <p>I do not find a way to hide the screen masking div I create in the _create method.</p>
  
  <p>Code for the create and close methods follows -</p>
  
  <pre><code>_create: function () {
              var handle = this;
              if (this.options.Height == 0) this.options.Height = this.element.height();
              if (this.options.Width == 0) this.options.Width = this.element.width();
              $(document.body).css({ margin: 0, padding: 0 });
              this.wrapper = $("&lt;div class='wrapperClass'&gt;").css({
                  'height': this.options.Height,
                  'width': this.options.Width,
                  'position': 'absolute',
                  'left': '50%',
                  'margin-left': -1 * this.options.Width / 2,
                  'top': '50%',
                  'margin-top': -1 * this.options.Height / 2,
                  'border': '3px solid red',
                  'border-radius': this.options.Radius,
                  'z-index': this.options.Zindex
              });
              //create the screen masking background 
              this.maskScreen = $('&lt;div /&gt;').css({ 'height': '100%', 'width': '100%', 'position': 'absolute', 'top': 0, 'left': 0, 'background-color': this.options.bgColor, 'z-index': this.options.Zindex - 1, 'display': 'block', 'opacity': this.options.bgOpacity, 'margin': 0, 'padding': 0 });
              $('body').append(this.maskScreen);
              this.element.css('display', 'block');
              this.wrapper.html(this.element);
              $('body').append(this.wrapper);
              if (this.options.addClose) this._addClose();
          },
          _addClose: function () {
              this.closeButton = $('&lt;div /&gt;')
              //add close class
              .addClass("closeClass").css("z-index", this.options.Zindex + 1);
              this.closeButton.on("click", function () {
  
                  $(this).parent().remove();
  
              });
              this.wrapper.append(this.closeButton);
          },
  </code></pre>
  
  <p>How can I reference the <em>screen masking</em> <code>div</code> I created in the <code>_create()</code> method?</p>