title: How to add two responses to one onclick function? The onclick in html is
body: <p>I am trying to figure out how to get a click function to do something new if other clicks are used. I have three <code>onclick</code> functions each with individual feedback statements when clicked. The <code>div</code>s they are attached to look like this:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>$('#p26_opt1, #p26_opt2, #p26_opt3').click(function() {
    // check whether this div was selected already
    var wasSelected = $(this).data('selected');
    document.getElementById("p26_feedback1").style.display = 'block';
    document.getElementById("p26_feedback2").style.display = 'none';
  
    // change its selected state to the opposite of what it was before
    $(this).data('selected', !wasSelected);
  
    // keep track of whether any checkboxes are un-checked with a flag
    var anyUnselected;
  
    // iterate through all the divs
    $('#p26_opt1, #p26_opt2, #p26_opt3').each(function() {
      // if there was already an un-selected div, or if this div is
      // un-selected, set our flag
      anyUnselected = anyUnselected || !$(this).data('selected');
    });
    // if our flag indicates any were un-seelcted, stop here
    if (anySelected) return;
  
    // do whatever you want to do when all three are checked.
    $('#p26_feedback3').show();
  });</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;div id="p26_options"&gt;
  
    &lt;div id="p26_opt1"&gt;Periodically review the data stored on your devices to determine what you no longer need&lt;/div&gt;
    &lt;br&gt;
  
    &lt;div id="p26_opt2"&gt;Delete the data and empty the recycle bin&lt;/div&gt;
    &lt;br&gt;
  
    &lt;div id="p26_opt3"&gt;Follow the Defense Department guidelines to get rid of all traces of the data on your computer&lt;/div&gt;
    &lt;br&gt;
  
    &lt;div id="p26_opt4"&gt;Put it on your to do list for next week&lt;/div&gt;
    &lt;br&gt;
  &lt;/div&gt;
  
  &lt;div id="p26_feedback1"&gt;And what else should you do? There are more correct answers.&lt;/div&gt;
  
  &lt;div id="p26_feedback2"&gt;Not quite &amp;ndash; why not do it now instead? Please try again.&lt;/div&gt;
  
  &lt;div id="p26_feedback3"&gt;Yes! To completely dispose of electronic data, you need to review and identify old data, delete it and empty your recycle bin and take further measures to get rid of all traces of it on your device.&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I can select each choice and get separate responses. My question is how do I make a second feedback statement display only if all three are selected at same time?</p>