title: Enable crop of image at on click jQuery
body: <p>I have this part of js code:</p>
  
  <pre><code>var bool = 0;
  
  $('#imageToCrop').cropper({
            autoCrop: false,
            movable: false,
            viewMode: 3,
            crop: function(e) {
              // Output the result data for cropping image.
              console.log(e.x);
              console.log(e.y);
              console.log(e.width);
              console.log(e.height);
              console.log(e.rotate);
              console.log(e.scaleX);
              console.log(e.scaleY);
  
            },
            cropend: function (e) {
                if (bool == 0) {
                $('#cropTimetable').toggle();
                $('#clearCrop').toggle();
                $('#downloadTimetable').toggle();
                $('#downloadHDTimetable').toggle();
                bool = 1;
              }
            }          
  
      });
  </code></pre>
  
  <p>This is the initialization code for the crop plugin Cropper that I took <a href="https://fengyuanchen.github.io/cropper/" rel="nofollow noreferrer">here</a>.</p>
  
  <p>I would enable the cropper only if I click on this text (jsp code):</p>
  
  <pre><code>&lt;li id="cropImage" style="cursor: pointer;cursor: hand;" class="col-sm-2 col-xs-1"&gt;
      &lt;a&gt;&lt;span style="vertical-align:top"&gt;Crop Image&lt;/span&gt;&lt;/a&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>I can do this? Enable the crop when I click on the link?</p>