title: Resizable Modal Popup
body: <p>I am trying to make a modal window resizable by clicking increase and decrease icons. The modal should also be positioned at the middle of the screen after each <strong><em><code>increase/decrease</code></em></strong> click. </p>
  
  <p>So far, only increase is working. Can anyone shed light on what I am doing wrong?</p>
  
  <pre><code>this.increaseModal = function () {
          var maxHeight = ($(window).height() * 90) / 100;
          var maxWidth = ($(window).width() * 90) / 100;
          var height = ($(window).height() * 10) / 100;
          var width = ($(window).width() * 10) / 100;
          if ($('.modal-content').height() &lt;= maxHeight - 100) {
              $('.modal-content').height($('.modal-content').height() + height);
              increaseHeightCount = increaseHeightCount + 1;
          }
          if ($('.modal-content').width() &lt;= maxWidth - 100) {
              $('.modal-content').width($('.modal-content').width() + width);
              increaseWidthCount = increaseWidthCount + 1;
          }
          $('.modal-dialog').draggable();
          $('#myModal').addClass('outPopUp');
      }
  </code></pre>
  
  <p><br/></p>
  
  <pre><code>this.decreaseModal = function () {
      var maxHeight = ($(window).height() * 90) / 100;
      var maxWidth = ($(window).width() * 90) / 100;
      var height = ($(window).height() * 10) / 100;
      var width = ($(window).width() * 10) / 100;
      if (increaseWidthCount &gt; 0) {
          $('.modal-content').width($('.modal-content').width() - width);
          increaseWidthCount = increaseWidthCount - 1;
      }
      if (increaseHeightCount &gt; 0) {
          $('.popup').height($('.popup').height() - height);
          increaseHeightCount = increaseHeightCount - 1;
      }
  }
  </code></pre>
  
  <p><code>outPopUp</code> is the class where I override bootstrap css for changing the modal window position. </p>
  
  <p>As far as I can see in the DOM explorer, .popup is not assigned to the element and hence increase/decrease height is not working.</p>