title: Toggle Class with Data-attribute
body: <p>I am using Data attributes to get an element in jQuery as below</p>
  
  <pre><code>&lt;a class="toggleArrow"&gt;Toggle Me&lt;/a&gt;
  &lt;span class="arrow collapse" data-target="trgt1"&gt;
      &lt;i class=fa fa-arrow-right""&gt;&lt;/i&gt;
  &lt;/span&gt;
  
  &lt;span class="arrow collapse" data-target="trgt2"&gt;
      &lt;i class=fa fa-arrow-left""&gt;&lt;/i&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>JQuery is</p>
  
  <pre><code>$("a.toggleArrow").off().on("click", function () {
      $("span.arrow").each(function () {
          var dataTarget = $(this).data("target");
          if (dataTarget == "tgrt1") {
              dataTarget.toggleClass("collapse expand");
          }
      });
  });
  </code></pre>
  
  <p>Can we use this way but it does not seem to work?</p>