title: jQuery toggle() event is not working in magento 2
body: <p>I am using jQuery toggle() event to change some styling when toggle an input box. My project is developed in Magento 2. But the function is not working properly. The event is triggering in first click, but second click nothing happening. The event will be triggered again in third click. So the problem is the event triggering only in alternative clicks.</p>
  
  <pre><code>&lt;script&gt;
    require([
      'jquery',
      'accordion'
    ], function($) {
      jQuery('.control').toggle(function() {
        console.log(1);
  
        jQuery('.hfb-header').css('margin-bottom', '80px');
      }, function() {
        console.log(2);
  
        jQuery('.hfb-header').css('margin-bottom', '20px');
      });
  
    });
  &lt;/script&gt;
  </code></pre>
  
  <p><strong>Expected Result:</strong> </p>
  
  <p>1st Click : margin-bottom for class hfb-header should be changed to 80px</p>
  
  <p>2nd click : margin-bottom for class hfb-header should be changed to 20px</p>
  
  <p>3rd click : margin-bottom for class hfb-header should be changed to 80px</p>
  
  <p><strong>Actual result :</strong> </p>
  
  <p>1st Click : margin-bottom for class hfb-header changed to 80px</p>
  
  <p>2nd click : no change</p>
  
  <p>3rd click : margin-bottom for class hfb-header changed to 20px</p>